Class PropertySchemaImpl

java.lang.Object
org.aksw.jena_sparql_api.schema.PropertySchemaImpl
All Implemented Interfaces:
PropertySchema

public class PropertySchemaImpl extends Object implements PropertySchema
Intensional specification of an RDF graph (a set of triples) based on a predicate and direction.
Author:
raven
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected org.apache.jena.graph.Node
     
    protected Set<NodeSchema>
    The schema of the values reachable via this property spec
  • Constructor Summary

    Constructors
    Constructor
    Description
    PropertySchemaImpl(org.apache.jena.graph.Node predicate, boolean isForward)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    long
    copyMatchingTriples(org.apache.jena.graph.Node source, org.apache.jena.graph.Graph targetGraph, org.apache.jena.graph.Graph sourceGraph)
    Copy triples that match the predicate specification from the source graph into the target graph.
    long
    copyMatchingValues(org.apache.jena.graph.Node source, Collection<org.apache.jena.graph.Node> target, org.apache.jena.graph.Graph sourceGraph)
     
    org.apache.jena.sparql.path.Path
     
    org.apache.jena.graph.Node
     
     
    boolean
     
    boolean
    matchesTriple(org.apache.jena.graph.Node source, org.apache.jena.graph.Triple triple)
     
    Stream<org.apache.jena.graph.Triple>
    streamMatchingTriples(org.apache.jena.graph.Node source, org.apache.jena.graph.Graph sourceGraph)
    Return a stream of the triples in sourceGraph that match this predicate schema for the given starting node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • predicate

      protected org.apache.jena.graph.Node predicate
    • isForward

      protected boolean isForward
    • targetSchemas

      protected Set<NodeSchema> targetSchemas
      The schema of the values reachable via this property spec
  • Constructor Details

    • PropertySchemaImpl

      public PropertySchemaImpl(org.apache.jena.graph.Node predicate, boolean isForward)
  • Method Details

    • getPredicate

      public org.apache.jena.graph.Node getPredicate()
      Specified by:
      getPredicate in interface PropertySchema
    • isForward

      public boolean isForward()
      Specified by:
      isForward in interface PropertySchema
    • getTargetSchemas

      public Set<NodeSchema> getTargetSchemas()
      Specified by:
      getTargetSchemas in interface PropertySchema
    • canMatchTriples

      public boolean canMatchTriples()
      Specified by:
      canMatchTriples in interface PropertySchema
    • matchesTriple

      public boolean matchesTriple(org.apache.jena.graph.Node source, org.apache.jena.graph.Triple triple)
      Specified by:
      matchesTriple in interface PropertySchema
    • copyMatchingValues

      public long copyMatchingValues(org.apache.jena.graph.Node source, Collection<org.apache.jena.graph.Node> target, org.apache.jena.graph.Graph sourceGraph)
      Specified by:
      copyMatchingValues in interface PropertySchema
    • streamMatchingTriples

      public Stream<org.apache.jena.graph.Triple> streamMatchingTriples(org.apache.jena.graph.Node source, org.apache.jena.graph.Graph sourceGraph)
      Return a stream of the triples in sourceGraph that match this predicate schema for the given starting node.
      Specified by:
      streamMatchingTriples in interface PropertySchema
      Parameters:
      source -
      sourceGraph -
      Returns:
    • copyMatchingTriples

      public long copyMatchingTriples(org.apache.jena.graph.Node source, org.apache.jena.graph.Graph targetGraph, org.apache.jena.graph.Graph sourceGraph)
      Copy triples that match the predicate specification from the source graph into the target graph.
      Specified by:
      copyMatchingTriples in interface PropertySchema
      Parameters:
      target -
      source -
    • getPath

      public org.apache.jena.sparql.path.Path getPath()
      Specified by:
      getPath in interface PropertySchema