use of org.vcell.sybil.rdf.pool.RDFObjectSets in project vcell by virtualcell.
the class RDFEvaluator method getProperties.
public <T, T2> RDFObjectSets<T2> getProperties(T subject, RDFObjectPool<T> pool, URI property, RDFObjectPool<T2> pool2) {
RDFValueSets valueSets = getProperties(subject, pool, property);
Set<T2> objects = new HashSet<T2>();
Map<Resource, Set<Resource>> unsupported = new HashMap<Resource, Set<Resource>>();
for (Resource objectResource : valueSets.getResources()) {
Set<Resource> types = getProperties(objectResource, RDF.TYPE).getResources();
try {
T2 object2 = pool2.getOrCreateObject(objectResource, types);
objects.add(object2);
} catch (UnsupportedRDFTypeException e) {
unsupported.put(objectResource, types);
}
}
return new RDFObjectSets<T2>(valueSets, objects, unsupported);
}
Aggregations