Class Rdf4jShaclShapeGraphShapeSource
- java.lang.Object
-
- org.eclipse.rdf4j.sail.shacl.wrapper.shape.Rdf4jShaclShapeGraphShapeSource
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,ShapeSource
public class Rdf4jShaclShapeGraphShapeSource extends java.lang.Object implements ShapeSource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.rdf4j.sail.shacl.wrapper.shape.ShapeSource
ShapeSource.Predicates, ShapeSource.ShapesGraph
-
-
Field Summary
Fields Modifier and Type Field Description private RepositoryConnection
connection
private Resource[]
context
private Repository
repository
private static SchemaCachingRDFSInferencer
shaclVocabulary
private static IRI
shaclVocabularyGraph
-
Fields inherited from interface org.eclipse.rdf4j.sail.shacl.wrapper.shape.ShapeSource
DASH_CONSTANTS
-
-
Constructor Summary
Constructors Modifier Constructor Description Rdf4jShaclShapeGraphShapeSource(RepositoryConnection connection)
private
Rdf4jShaclShapeGraphShapeSource(Repository repository, RepositoryConnection connection, Resource[] context)
Rdf4jShaclShapeGraphShapeSource(SailConnection connection)
-
Method Summary
-
-
-
Field Detail
-
shaclVocabularyGraph
private static final IRI shaclVocabularyGraph
-
shaclVocabulary
private static final SchemaCachingRDFSInferencer shaclVocabulary
-
connection
private final RepositoryConnection connection
-
context
private final Resource[] context
-
repository
private final Repository repository
-
-
Constructor Detail
-
Rdf4jShaclShapeGraphShapeSource
public Rdf4jShaclShapeGraphShapeSource(RepositoryConnection connection)
-
Rdf4jShaclShapeGraphShapeSource
public Rdf4jShaclShapeGraphShapeSource(SailConnection connection)
-
Rdf4jShaclShapeGraphShapeSource
private Rdf4jShaclShapeGraphShapeSource(Repository repository, RepositoryConnection connection, Resource[] context)
-
-
Method Detail
-
forwardChain
private SailRepository forwardChain(RepositoryConnection shapesRepoConnection)
-
forwardChain
private SailRepository forwardChain(SailConnection shapesSailConnection)
-
forwardChain
private SailRepository forwardChain(CloseableIteration<? extends Statement,? extends RDF4JException> statements)
-
createShaclVocabulary
private static SchemaCachingRDFSInferencer createShaclVocabulary()
-
getResourceAsStream
private static java.io.InputStream getResourceAsStream(java.lang.String filename)
-
enrichShapes
private void enrichShapes(RepositoryConnection shaclSailConnection)
-
implicitTargetClass
private void implicitTargetClass(RepositoryConnection shaclSailConnection)
-
withContext
public Rdf4jShaclShapeGraphShapeSource withContext(Resource[] context)
- Specified by:
withContext
in interfaceShapeSource
-
getActiveContexts
public Resource[] getActiveContexts()
- Specified by:
getActiveContexts
in interfaceShapeSource
-
getAllShapeContexts
public java.util.stream.Stream<ShapeSource.ShapesGraph> getAllShapeContexts()
- Specified by:
getAllShapeContexts
in interfaceShapeSource
-
getTargetableShape
public java.util.stream.Stream<Resource> getTargetableShape()
- Specified by:
getTargetableShape
in interfaceShapeSource
-
isType
public boolean isType(Resource subject, IRI type)
- Specified by:
isType
in interfaceShapeSource
-
getSubjects
public java.util.stream.Stream<Resource> getSubjects(ShapeSource.Predicates predicate)
- Specified by:
getSubjects
in interfaceShapeSource
-
getObjects
public java.util.stream.Stream<Value> getObjects(Resource subject, ShapeSource.Predicates predicate)
- Specified by:
getObjects
in interfaceShapeSource
-
getAllStatements
public java.util.stream.Stream<Statement> getAllStatements(Resource id)
- Specified by:
getAllStatements
in interfaceShapeSource
-
getRdfFirst
public Value getRdfFirst(Resource subject)
- Specified by:
getRdfFirst
in interfaceShapeSource
-
getRdfRest
public Resource getRdfRest(Resource subject)
- Specified by:
getRdfRest
in interfaceShapeSource
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceShapeSource
-
-