public class RDFParser
extends java.lang.Object
Parser for the EDOAL syntax. The reader is Jena, input is an EDOALAlignment The input document format shall be consistent with format document
$Id: RDFParser.java 2182 2018-05-22 15:19:26Z euzenat $
Modifier and Type | Field and Description |
---|---|
private EDOALAlignment |
alignment |
private boolean |
isPattern |
(package private) static org.slf4j.Logger |
logger |
private static org.apache.jena.rdf.model.Model |
rDFModel |
private boolean |
speedparse |
Constructor and Description |
---|
RDFParser()
Creates an RDF Parser.
|
RDFParser(int debugMode)
Creates an RDF Parser.
|
Modifier and Type | Method and Description |
---|---|
protected java.net.URI |
getNodeId(org.apache.jena.rdf.model.Resource node) |
static void |
initSyntax()
Initialisation of the structures This creates an RDF Model which contains
all the syntactic elements.
|
EDOALAlignment |
parse(java.io.File file) |
EDOALAlignment |
parse(java.io.InputStream is) |
EDOALAlignment |
parse(org.apache.jena.rdf.model.Model rdfmodel)
Parse the input model.
|
EDOALAlignment |
parse(java.io.Reader is) |
EDOALAlignment |
parse(java.lang.String uri) |
EDOALAlignment |
parseAlignment(org.apache.jena.rdf.model.Resource node)
Parses a mapping document.
|
protected EDOALCell |
parseCell(org.apache.jena.rdf.model.Resource node)
Parses a mapping rule.
|
protected ClassExpression |
parseClass(org.apache.jena.rdf.model.Resource node) |
protected Datatype |
parseDatatype(org.apache.jena.rdf.model.RDFNode nn) |
protected Expression |
parseExpression(org.apache.jena.rdf.model.Resource node) |
static void |
parseExtensions(org.apache.jena.rdf.model.Resource node,
Extensible ext) |
protected InstanceExpression |
parseInstance(org.apache.jena.rdf.model.Resource node) |
protected Linkkey |
parseLinkkey(org.apache.jena.rdf.model.Resource node) |
protected LinkkeyBinding |
parseLinkkeyBinding(org.apache.jena.rdf.model.Resource node) |
protected Ontology<java.lang.Object> |
parseOntology(org.apache.jena.rdf.model.Resource node)
Parse an ontology node
<onto1> or
<onto2> Node to an Ontology object. |
protected PathExpression |
parsePathExpression(org.apache.jena.rdf.model.Resource node) |
protected PropertyExpression |
parseProperty(org.apache.jena.rdf.model.Resource node) |
protected RelationExpression |
parseRelation(org.apache.jena.rdf.model.Resource node) |
protected Transformation |
parseTransformation(org.apache.jena.rdf.model.Resource node) |
protected ValueExpression |
parseValue(org.apache.jena.rdf.model.RDFNode node) |
static final org.slf4j.Logger logger
private static org.apache.jena.rdf.model.Model rDFModel
private boolean isPattern
private boolean speedparse
private EDOALAlignment alignment
public RDFParser()
public RDFParser(int debugMode)
debugMode:
- The value of the debug mode (DEPRECATED)public static void initSyntax()
public EDOALAlignment parse(org.apache.jena.rdf.model.Model rdfmodel) throws AlignmentException
rdfmodel:
- the rdfmodel containing the RDF representation of the
parsed alignmentAlignmentException
- if there is any exception, throw
AlignmentException that include describe infomation and a caused
exception.public EDOALAlignment parse(java.io.File file) throws AlignmentException
AlignmentException
public EDOALAlignment parse(java.io.Reader is) throws AlignmentException
AlignmentException
public EDOALAlignment parse(java.io.InputStream is) throws AlignmentException
AlignmentException
public EDOALAlignment parse(java.lang.String uri) throws AlignmentException
AlignmentException
public EDOALAlignment parseAlignment(org.apache.jena.rdf.model.Resource node) throws AlignmentException
<Alignment>
tag.node
- the alignment resourceAlignmentException
- when something goes wrongpublic static void parseExtensions(org.apache.jena.rdf.model.Resource node, Extensible ext) throws AlignmentException
AlignmentException
protected Ontology<java.lang.Object> parseOntology(org.apache.jena.rdf.model.Resource node) throws AlignmentException
<onto1>
or
<onto2>
Node to an Ontology object. The node must
contain the <onto...>
element.node
- the ontology nodejava.lang.NullPointerException
- if the node is nullAlignmentException
- when something goes wrongprotected EDOALCell parseCell(org.apache.jena.rdf.model.Resource node) throws AlignmentException
<Cell>
tag.node:
- a node of type CellAlignmentException
- when something goes wrongprotected Transformation parseTransformation(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected Linkkey parseLinkkey(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected LinkkeyBinding parseLinkkeyBinding(org.apache.jena.rdf.model.Resource node) throws AlignmentException
node:
- a node corresponding to a link key bindingAlignmentException
- when something goes wrongprotected Expression parseExpression(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected ClassExpression parseClass(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected PathExpression parsePathExpression(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected PropertyExpression parseProperty(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected Datatype parseDatatype(org.apache.jena.rdf.model.RDFNode nn) throws AlignmentException
AlignmentException
protected RelationExpression parseRelation(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected InstanceExpression parseInstance(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
protected ValueExpression parseValue(org.apache.jena.rdf.model.RDFNode node) throws AlignmentException
AlignmentException
protected java.net.URI getNodeId(org.apache.jena.rdf.model.Resource node) throws AlignmentException
AlignmentException
(C) INRIA & friends, 2003-2020