use of org.whole.lang.resources.IResource in project whole by wholeplatform.
the class XsdResourceFactory method createResource.
@Override
public IResource createResource(String uri) {
Resource resource = (Resource) super.createResource(uri);
resource.setNamespace(SchemaUtils.calculateNamespace(uri));
resource.setName(SchemaUtils.calculateName(uri));
resource.setVersion("1.0");
resource.setResourcePersistenceKit(XsdPersistenceKit.instance());
return resource;
}
use of org.whole.lang.resources.IResource in project whole by wholeplatform.
the class XsdRegistry method schemas.
public Collection<Schema> schemas() {
Collection<IResource> resources = getResources(true, new Comparator<IResource>() {
public int compare(IResource s1, IResource s2) {
return s1.getNamespace().compareTo(s2.getNamespace());
}
});
List<Schema> schemas = new ArrayList<Schema>(resources.size());
for (IResource resource : resources) schemas.add(resource.<Schema>getEntity());
return Collections.unmodifiableList(schemas);
}
Aggregations