Package org.aksw.jena_sparql_api.schema
Class PropertySchemaImpl
java.lang.Object
org.aksw.jena_sparql_api.schema.PropertySchemaImpl
- All Implemented Interfaces:
PropertySchema
Intensional specification of an RDF graph (a set of triples)
based on a predicate and direction.
- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected org.apache.jena.graph.Nodeprotected Set<NodeSchema>The schema of the values reachable via this property spec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongcopyMatchingTriples(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.longcopyMatchingValues(org.apache.jena.graph.Node source, Collection<org.apache.jena.graph.Node> target, org.apache.jena.graph.Graph sourceGraph) org.apache.jena.sparql.path.PathgetPath()org.apache.jena.graph.NodebooleanbooleanmatchesTriple(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.
-
Field Details
-
predicate
protected org.apache.jena.graph.Node predicate -
isForward
protected boolean isForward -
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:
getPredicatein interfacePropertySchema
-
isForward
public boolean isForward()- Specified by:
isForwardin interfacePropertySchema
-
getTargetSchemas
- Specified by:
getTargetSchemasin interfacePropertySchema
-
canMatchTriples
public boolean canMatchTriples()- Specified by:
canMatchTriplesin interfacePropertySchema
-
matchesTriple
public boolean matchesTriple(org.apache.jena.graph.Node source, org.apache.jena.graph.Triple triple) - Specified by:
matchesTriplein interfacePropertySchema
-
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:
copyMatchingValuesin interfacePropertySchema
-
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:
streamMatchingTriplesin interfacePropertySchema- 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:
copyMatchingTriplesin interfacePropertySchema- Parameters:
target-source-
-
getPath
public org.apache.jena.sparql.path.Path getPath()- Specified by:
getPathin interfacePropertySchema
-