public Resource createResource(URI uri, String contentType) { Resource.Factory resourceFactory = getResourceFactoryRegistry().getFactory(uri, contentType); if (resourceFactory != null) { Resource result = resourceFactory.createResource(uri); getResources().add(result); return result; } else { return null; } }
public Resource createResource(URI uri, String contentType) { Resource.Factory resourceFactory = getResourceFactoryRegistry().getFactory(uri, contentType); if (resourceFactory != null) { Resource result = resourceFactory.createResource(uri); getResources().add(result); return result; } else { return null; } }
/** * Builds entries for the {@link ResourceLocator#resourceSet resource set's} resource in the {@link #normalizationMap normalized map} and the {@link #resourceMap resource map}. */ protected void buildMaps() { // Clear the maps // normalizationMap.clear(); resourceMap.clear(); // Iterate over the resources. // for (Resource resource : resourceSet.getResources()) { URI uri = resource.getURI(); if (uri != null) { // Compute the normalized URI, cache it, and map it to the resource. // URI normalizedURI = cachedURIConverter.normalize(uri); normalizationMap.put(uri, normalizedURI); map(normalizedURI, resource); } } }
/** * Builds entries for the {@link ResourceLocator#resourceSet resource set's} resource in the {@link #normalizationMap normalized map} and the {@link #resourceMap resource map}. */ protected void buildMaps() { // Clear the maps // normalizationMap.clear(); resourceMap.clear(); // Iterate over the resources. // for (Resource resource : resourceSet.getResources()) { URI uri = resource.getURI(); if (uri != null) { // Compute the normalized URI, cache it, and map it to the resource. // URI normalizedURI = cachedURIConverter.normalize(uri); normalizationMap.put(uri, normalizedURI); map(normalizedURI, resource); } } }
for (Resource r : resourceSet.getResources())
for (Resource r : resourceSet.getResources())
for (Resource resource : getResources())
for (Resource resource : getResources())