The getURI(Accessor) supports resolution of an arbitrary accessor to its registered platform resource URI.
String modelNameToBeResolved = ...; ModelNameAccessor modelNameAccessor = new ModelNameAccessor(modelNameToBeResolved); IResource resolutionContext = ...; ModelResourceResolver resolver = new ModelResourceResolver(resolutionContext); Registration<ModelNameAccessor> registration = resolver.getRegistration(modelNameAccessor); if (registration != null) { try { Resource resolvedResource = resolver.getResource(registration); /* Do something with the resolvedResource or resolvedResource.getContents() */; } catch (IOException e) { /* Report failure to load model */; } }The required resolution is defined by constructing a ModelNameAccessor so that resolution locates a Model Name whose value is modelNameToBeResolved.
A resolver is constructed to perform resolutions with respect to the required context.
The resolver is instructed to return the registration (or null) for the required accessor.
If a registration is found, the resolver is instructed to load the corresponding resource.