Class SubjectMappingUtil

java.lang.Object
org.fcrepo.kernel.api.utils.SubjectMappingUtil

public class SubjectMappingUtil extends Object
Utility for remapping subjects in rdf triples.
Author:
bbpennel
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.