Package org.fcrepo.kernel.api.utils
Class SubjectMappingUtil
java.lang.Object
org.fcrepo.kernel.api.utils.SubjectMappingUtil
Utility for remapping subjects in rdf triples.
- Author:
- bbpennel
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.graph.TriplemapSubject(org.apache.jena.graph.Triple t, String resourceUri, String destinationUri) Maps the subject of t from resourceUri to destinationUri to produce a new Triple.static org.apache.jena.graph.TriplemapSubject(org.apache.jena.graph.Triple t, String resourceUri, org.apache.jena.graph.Node destinationNode) Maps the subject of t from resourceUri to destinationNode to produce a new Triple.
-
Method Details
-
mapSubject
public static org.apache.jena.graph.Triple mapSubject(org.apache.jena.graph.Triple t, String resourceUri, String destinationUri) Maps the subject of t from resourceUri to destinationUri to produce a new Triple. If the triple does not have the subject resourceUri, then the triple is unchanged.- Parameters:
t- triple to be remapped.resourceUri- resource subject uri to be remapped.destinationUri- subject uri for the resultant triple.- Returns:
- triple with subject remapped to destinationUri or the original subject.
-
mapSubject
public static org.apache.jena.graph.Triple mapSubject(org.apache.jena.graph.Triple t, String resourceUri, org.apache.jena.graph.Node destinationNode) Maps the subject of t from resourceUri to destinationNode to produce a new Triple. If the triple does not have the subject resourceUri, then the triple is unchanged.- Parameters:
t- triple to be remapped.resourceUri- resource subject uri to be remapped.destinationNode- subject node for the resultant triple.- Returns:
- triple with subject remapped to destinationNode or the original subject.
-