public class ShExRParser extends Object implements Parser
ShexSchema
from its rdf representation.
This implementation does not support: external definitions, semantic actions and anonymous "start" shapes.
The base IRI for shex object is http://www.w3.org/ns/shex#.Modifier and Type | Field and Description |
---|---|
static List<org.eclipse.rdf4j.rio.RDFFormat> |
RDFFormats |
Constructor and Description |
---|
ShExRParser() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getImports()
Return the list of import declarations found during the last parsing.
|
Map<String,String> |
getPrefixes()
Return the list of import declarations found during the last parsing.
|
Map<Label,ShapeExpr> |
getRules(InputStream is)
Used null as format.
|
Map<Label,ShapeExpr> |
getRules(InputStream is,
org.eclipse.rdf4j.rio.RDFFormat format) |
Map<Label,ShapeExpr> |
getRules(Path path)
Return the set of rules contains in the file.
|
Map<Label,ShapeExpr> |
getRules(org.apache.commons.rdf.api.RDF rdfFactory,
InputStream is)
Return the set of rules contains in the inputstream.
|
Map<Label,ShapeExpr> |
getRules(org.apache.commons.rdf.api.RDF rdfFactory,
InputStream is,
org.eclipse.rdf4j.rio.RDFFormat format) |
Map<Label,ShapeExpr> |
getRules(org.apache.commons.rdf.api.RDF rdfFactory,
Path path)
Used the first format that contains an extension that ends the provided path in the list of RDFFormats.
|
ShapeExpr |
getStart()
Return the start ShapeExpr found during the last parsing.
|
public static final List<org.eclipse.rdf4j.rio.RDFFormat> RDFFormats
public Map<Label,ShapeExpr> getRules(Path path) throws Exception
Parser
public Map<Label,ShapeExpr> getRules(org.apache.commons.rdf.api.RDF rdfFactory, Path path) throws Exception
getRules
in interface Parser
rdfFactory
- the factory used to create the RDF objects.Exception
Parser.getRules(org.apache.commons.rdf.api.RDF,java.nio.file.Path)
public Map<Label,ShapeExpr> getRules(InputStream is) throws Exception
getRules
in interface Parser
Exception
Parser.getRules(org.apache.commons.rdf.api.RDF,java.nio.file.Path)
public Map<Label,ShapeExpr> getRules(org.apache.commons.rdf.api.RDF rdfFactory, InputStream is) throws Exception
Parser
public Map<Label,ShapeExpr> getRules(InputStream is, org.eclipse.rdf4j.rio.RDFFormat format) throws Exception
Exception
public Map<Label,ShapeExpr> getRules(org.apache.commons.rdf.api.RDF rdfFactory, InputStream is, org.eclipse.rdf4j.rio.RDFFormat format) throws Exception
Exception
public List<String> getImports()
Parser
getImports
in interface Parser
public Map<String,String> getPrefixes()
Parser
getPrefixes
in interface Parser
Copyright © 2019. All rights reserved.