use of org.apache.jena.shared.impl.PrefixMappingImpl in project jena by apache.
the class TestSSE_Forms method beforeClass.
@BeforeClass
public static void beforeClass() {
original = SSE.getPrefixMapRead();
PrefixMapping pmaptest = new PrefixMappingImpl().setNsPrefixes(original).removeNsPrefix("").removeNsPrefix("ex");
}
use of org.apache.jena.shared.impl.PrefixMappingImpl in project webofneeds by researchstudio-sat.
the class WonLinkedDataUtils method getConnectionNetwork.
public static Dataset getConnectionNetwork(URI atomURI, URI webId, LinkedDataSource linkedDataSource) {
assert linkedDataSource != null : "linkedDataSource must not be null";
int depth = 5;
int maxRequests = 1000;
List<Path> propertyPaths = new ArrayList<>();
PrefixMapping pmap = new PrefixMappingImpl();
pmap.withDefaultMappings(PrefixMapping.Standard);
pmap.setNsPrefix("won", WON.getURI());
pmap.setNsPrefix("msg", WONMSG.getURI());
propertyPaths.add(PathParser.parse("won:connections", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member", pmap));
return linkedDataSource.getDataForResourceWithPropertyPath(atomURI, webId, propertyPaths, maxRequests, depth);
}
use of org.apache.jena.shared.impl.PrefixMappingImpl in project webofneeds by researchstudio-sat.
the class WonLinkedDataUtils method getFullAtomDataset.
public static Dataset getFullAtomDataset(URI atomURI, LinkedDataSource linkedDataSource) {
assert linkedDataSource != null : "linkedDataSource must not be null";
int depth = 7;
int maxRequests = 1000;
List<Path> propertyPaths = new ArrayList<>();
PrefixMapping pmap = new PrefixMappingImpl();
pmap.withDefaultMappings(PrefixMapping.Standard);
pmap.setNsPrefix("won", WON.getURI());
pmap.setNsPrefix("msg", WONMSG.getURI());
propertyPaths.add(PathParser.parse("won:connections", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:messageContainer", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:messageContainer/rdfs:member", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:messageContainer/rdfs:member/msg:correspondingRemoteMessage", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:messageContainer/rdfs:member/msg:previousMessage", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:sourceAtom", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:sourceAtom/won:messageContainer", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:sourceAtom/won:messageContainer/rdfs:member", pmap));
propertyPaths.add(PathParser.parse("won:connections/rdfs:member/won:sourceAtom/won:messageContainer/rdfs:member/msg:previousMessage", pmap));
return linkedDataSource.getDataForResourceWithPropertyPath(atomURI, atomURI, propertyPaths, maxRequests, depth);
}
use of org.apache.jena.shared.impl.PrefixMappingImpl in project webofneeds by researchstudio-sat.
the class WonLinkedDataUtils method getConversationDataset.
public static Dataset getConversationDataset(URI connectionURI, URI requesterWebId, LinkedDataSource linkedDataSource) {
assert linkedDataSource != null : "linkedDataSource must not be null";
// depth 3 from connection gives us the messages in the conversation
int depth = 5;
int maxRequests = 1000;
List<Path> propertyPaths = new ArrayList<>();
PrefixMapping pmap = new PrefixMappingImpl();
pmap.withDefaultMappings(PrefixMapping.Standard);
pmap.setNsPrefix("won", WON.getURI());
pmap.setNsPrefix("msg", WONMSG.getURI());
propertyPaths.add(PathParser.parse("won:messageContainer", pmap));
propertyPaths.add(PathParser.parse("won:messageContainer/rdfs:member", pmap));
propertyPaths.add(PathParser.parse("won:targetConnection", pmap));
propertyPaths.add(PathParser.parse("won:targetConnection/won:messageContainer", pmap));
propertyPaths.add(PathParser.parse("won:targetConnection/won:messageContainer/rdfs:member", pmap));
return linkedDataSource.getDataForResourceWithPropertyPath(connectionURI, requesterWebId, propertyPaths, maxRequests, depth);
}
use of org.apache.jena.shared.impl.PrefixMappingImpl in project webofneeds by researchstudio-sat.
the class WonLinkedDataUtils method getConversationAndAtomsDataset.
public static Dataset getConversationAndAtomsDataset(URI connectionURI, URI requesterWebId, LinkedDataSource linkedDataSource) {
Objects.requireNonNull(linkedDataSource);
Objects.requireNonNull(connectionURI);
int depth = 5;
int maxRequests = 1000;
List<Path> propertyPaths = new ArrayList<>();
PrefixMapping pmap = new PrefixMappingImpl();
pmap.withDefaultMappings(PrefixMapping.Standard);
pmap.setNsPrefix("won", WON.getURI());
pmap.setNsPrefix("msg", WONMSG.getURI());
propertyPaths.add(PathParser.parse("won:messageContainer", pmap));
propertyPaths.add(PathParser.parse("won:messageContainer/rdfs:member", pmap));
propertyPaths.add(PathParser.parse("won:messageContainer/rdfs:member/msg:previousMessage", pmap));
return linkedDataSource.getDataForResourceWithPropertyPath(connectionURI, requesterWebId, propertyPaths, maxRequests, depth);
}
Aggregations