@ApiStability.Stable public class ShexSchema extends Object
ShapeExprRef
or TripleExprRef
, and the set of rules is stratified.
The set of rules is not modifiable after construction.
All ShapeExpr
and TripleExpr
in the constructed schema have a Label
, allowing to refer to the corresponding expression.
The stratification is a most refined stratification.Constructor and Description |
---|
ShexSchema(Map<Label,ShapeExpr> rules)
Constructs a ShEx schema whenever the set of rules defines a well-defined schema.
|
ShexSchema(Map<Label,ShapeExpr> rules,
ShapeExpr start)
Constructs a ShEx schema whenever the set of rules defines a well-defined schema.
|
ShexSchema(org.apache.commons.rdf.api.RDF rdfFactory,
Map<Label,ShapeExpr> rules)
Constructs a ShEx schema whenever the set of rules defines a well-defined schema.
|
ShexSchema(org.apache.commons.rdf.api.RDF rdfFactory,
Map<Label,ShapeExpr> rules,
ShapeExpr start) |
Modifier and Type | Method and Description |
---|---|
Set<Label> |
getLabelsAtStratum(int i)
Deprecated.
Use
getStratification() instead |
int |
getNbStratums()
Deprecated.
Use
getStratification() instead |
org.apache.commons.rdf.api.RDF |
getRdfFactory() |
Map<Label,ShapeExpr> |
getRules()
The rules of the schema.
|
Map<Label,ShapeExpr> |
getShapeExprsMap()
All the shape expressions that appear in the schema indexed by their label.
|
ShapeExpr |
getStart()
Return the start shapeExpr.
|
Map<Integer,Set<Label>> |
getStratification() |
int |
getStratum(Label label)
Deprecated.
Use
getStratification() instead |
Map<Label,TripleExpr> |
getTripleExprsMap()
All the triple expressions that appear in the schema indexed by their label.
|
String |
toString() |
@ApiStability.Stable public ShexSchema(Map<Label,ShapeExpr> rules) throws UndefinedReferenceException, CyclicReferencesException, NotStratifiedException
GlobalFactory.RDFFactory
for creating the fresh labels.rules
- UndefinedReferenceException
CyclicReferencesException
NotStratifiedException
public ShexSchema(Map<Label,ShapeExpr> rules, ShapeExpr start) throws UndefinedReferenceException, CyclicReferencesException, NotStratifiedException
GlobalFactory.RDFFactory
for creating the fresh labels.rules
- start
- UndefinedReferenceException
CyclicReferencesException
NotStratifiedException
public ShexSchema(org.apache.commons.rdf.api.RDF rdfFactory, Map<Label,ShapeExpr> rules) throws UndefinedReferenceException, CyclicReferencesException, NotStratifiedException
rules
- rdfFactory
- UndefinedReferenceException
CyclicReferencesException
NotStratifiedException
public ShexSchema(org.apache.commons.rdf.api.RDF rdfFactory, Map<Label,ShapeExpr> rules, ShapeExpr start) throws UndefinedReferenceException, CyclicReferencesException, NotStratifiedException
@ApiStability.Stable public Map<Label,ShapeExpr> getRules()
public Map<Label,ShapeExpr> getShapeExprsMap()
public Map<Label,TripleExpr> getTripleExprsMap()
public ShapeExpr getStart()
@Deprecated public Set<Label> getLabelsAtStratum(int i)
getStratification()
insteadi
- @Deprecated public int getNbStratums()
getStratification()
instead@Deprecated public int getStratum(Label label)
getStratification()
insteadlabel
- public org.apache.commons.rdf.api.RDF getRdfFactory()
Copyright © 2019. All rights reserved.