Class LPG2RDFConfigurationImpl
java.lang.Object
se.liu.ida.hefquin.engine.wrappers.lpg.conf.impl.LPG2RDFConfigurationImpl
- All Implemented Interfaces:
LPG2RDFConfiguration
- Direct Known Subclasses:
DefaultLPG2RDFConfigurationImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EdgeLabelMapping
protected final org.apache.jena.graph.Node
protected final NodeLabelMapping
protected final NodeMapping
protected final PropertyNameMapping
-
Constructor Summary
ConstructorsConstructorDescriptionLPG2RDFConfigurationImpl
(NodeMapping nm, NodeLabelMapping nlm, EdgeLabelMapping elm, PropertyNameMapping pm, org.apache.jena.graph.Node labelPredicate) -
Method Summary
Modifier and TypeMethodDescriptiongetEdgeLabelForIRI
(org.apache.jena.graph.Node node) Applies the inverse of the edge label mapping to the given IRI and, thus, returns the edge label that is mapped to the given IRI.org.apache.jena.graph.Node
getIRIForEdgeLabel
(String label) Applies the edge label mapping to the given edge label and, thus, returns the IRI (in the form of a JenaNode
object) that the edge label is mapped to.org.apache.jena.graph.Node
getIRIForPropertyName
(String propertyName) Applies the property name mapping to the given property name and, thus, returns the IRI (in the form of a JenaNode
object) that the property name is mapped to.org.apache.jena.graph.Node
Returns the IRI (in the form of a JenaNode
object) to be used in the predicate position of any RDF triple that captures information about the label of some LPG node.getLPGNodeForRDFTerm
(org.apache.jena.graph.Node node) Applies the inverse of the node mapping to the given RDF term and, thus, returns the LPG node that is mapped to the given RDF term (which must be an IRI or a blank node).getNodeLabelForRDFTerm
(org.apache.jena.graph.Node node) Applies the inverse of the node label mapping to the given RDF term and, thus, returns the node label that is mapped to the given RDF term (which must be an IRI or a literal).getPropertyNameForIRI
(org.apache.jena.graph.Node node) Applies the inverse of the property name mapping to the given IRI and, thus, returns the property name that is mapped to the given IRI.org.apache.jena.graph.Node
getRDFTermForLPGNode
(LPGNode node) Applies the node mapping to the given LPG node and, thus, returns the IRI or blank node (in the form of a JenaNode
object) that the LPG node is mapped to.org.apache.jena.graph.Node
getRDFTermForNodeLabel
(String label) Applies the node label mapping to the given node label and, thus, returns the IRI or literal (in the form of a JenaNode
object) that the node label is mapped to.boolean
isIRIForEdgeLabel
(org.apache.jena.graph.Node n) Returns true if the given IRI is in the image of the edge label mapping and, thus, may be returned byLPG2RDFConfiguration.getIRIForEdgeLabel(String)
for some edge label.boolean
isIRIForPropertyName
(org.apache.jena.graph.Node n) Returns true if the given IRI is in the image of the property name mapping and, thus, may be returned byLPG2RDFConfiguration.getIRIForPropertyName(String)
for some property name.boolean
isRDFTermForLPGNode
(org.apache.jena.graph.Node n) Returns true if the given RDF term is in the image of the node mapping and, thus, may be returned byLPG2RDFConfiguration.getRDFTermForLPGNode(LPGNode)
for some LPG node.boolean
isRDFTermForNodeLabel
(org.apache.jena.graph.Node n) Returns true if the given RDF term is in the image of the node label mapping and, thus, may be returned byLPG2RDFConfiguration.getRDFTermForNodeLabel(String)
for some node label.
-
Field Details
-
nm
-
nlm
-
elm
-
pm
-
labelPredicate
protected final org.apache.jena.graph.Node labelPredicate
-
-
Constructor Details
-
LPG2RDFConfigurationImpl
public LPG2RDFConfigurationImpl(NodeMapping nm, NodeLabelMapping nlm, EdgeLabelMapping elm, PropertyNameMapping pm, org.apache.jena.graph.Node labelPredicate)
-
-
Method Details
-
getRDFTermForLPGNode
Description copied from interface:LPG2RDFConfiguration
Applies the node mapping to the given LPG node and, thus, returns the IRI or blank node (in the form of a JenaNode
object) that the LPG node is mapped to.- Specified by:
getRDFTermForLPGNode
in interfaceLPG2RDFConfiguration
-
getLPGNodeForRDFTerm
Description copied from interface:LPG2RDFConfiguration
Applies the inverse of the node mapping to the given RDF term and, thus, returns the LPG node that is mapped to the given RDF term (which must be an IRI or a blank node). If the given RDF term is not in the image of the node mapping (in which caseLPG2RDFConfiguration.isRDFTermForLPGNode(Node)
returns false), this method throws anIllegalArgumentException
.- Specified by:
getLPGNodeForRDFTerm
in interfaceLPG2RDFConfiguration
-
getRDFTermForNodeLabel
Description copied from interface:LPG2RDFConfiguration
Applies the node label mapping to the given node label and, thus, returns the IRI or literal (in the form of a JenaNode
object) that the node label is mapped to.- Specified by:
getRDFTermForNodeLabel
in interfaceLPG2RDFConfiguration
-
getNodeLabelForRDFTerm
Description copied from interface:LPG2RDFConfiguration
Applies the inverse of the node label mapping to the given RDF term and, thus, returns the node label that is mapped to the given RDF term (which must be an IRI or a literal). If the given RDF term is not in the image of the node label mapping (in which caseLPG2RDFConfiguration.isRDFTermForNodeLabel(Node)
returns false), this method throws anIllegalArgumentException
.- Specified by:
getNodeLabelForRDFTerm
in interfaceLPG2RDFConfiguration
-
getIRIForEdgeLabel
Description copied from interface:LPG2RDFConfiguration
Applies the edge label mapping to the given edge label and, thus, returns the IRI (in the form of a JenaNode
object) that the edge label is mapped to.- Specified by:
getIRIForEdgeLabel
in interfaceLPG2RDFConfiguration
-
getEdgeLabelForIRI
Description copied from interface:LPG2RDFConfiguration
Applies the inverse of the edge label mapping to the given IRI and, thus, returns the edge label that is mapped to the given IRI. If the given IRI is not in the image of the edge label mapping (in which caseLPG2RDFConfiguration.isIRIForEdgeLabel(Node)
returns false), this method throws anIllegalArgumentException
.- Specified by:
getEdgeLabelForIRI
in interfaceLPG2RDFConfiguration
-
getIRIForPropertyName
Description copied from interface:LPG2RDFConfiguration
Applies the property name mapping to the given property name and, thus, returns the IRI (in the form of a JenaNode
object) that the property name is mapped to.- Specified by:
getIRIForPropertyName
in interfaceLPG2RDFConfiguration
-
getPropertyNameForIRI
Description copied from interface:LPG2RDFConfiguration
Applies the inverse of the property name mapping to the given IRI and, thus, returns the property name that is mapped to the given IRI. If the given IRI is not in the image of the property name mapping (in which caseLPG2RDFConfiguration.isIRIForPropertyName(Node)
returns false), this method throws anIllegalArgumentException
.- Specified by:
getPropertyNameForIRI
in interfaceLPG2RDFConfiguration
-
getLabelPredicate
public org.apache.jena.graph.Node getLabelPredicate()Description copied from interface:LPG2RDFConfiguration
Returns the IRI (in the form of a JenaNode
object) to be used in the predicate position of any RDF triple that captures information about the label of some LPG node.- Specified by:
getLabelPredicate
in interfaceLPG2RDFConfiguration
-
isIRIForPropertyName
public boolean isIRIForPropertyName(org.apache.jena.graph.Node n) Description copied from interface:LPG2RDFConfiguration
Returns true if the given IRI is in the image of the property name mapping and, thus, may be returned byLPG2RDFConfiguration.getIRIForPropertyName(String)
for some property name.- Specified by:
isIRIForPropertyName
in interfaceLPG2RDFConfiguration
-
isRDFTermForNodeLabel
public boolean isRDFTermForNodeLabel(org.apache.jena.graph.Node n) Description copied from interface:LPG2RDFConfiguration
Returns true if the given RDF term is in the image of the node label mapping and, thus, may be returned byLPG2RDFConfiguration.getRDFTermForNodeLabel(String)
for some node label.- Specified by:
isRDFTermForNodeLabel
in interfaceLPG2RDFConfiguration
-
isIRIForEdgeLabel
public boolean isIRIForEdgeLabel(org.apache.jena.graph.Node n) Description copied from interface:LPG2RDFConfiguration
Returns true if the given IRI is in the image of the edge label mapping and, thus, may be returned byLPG2RDFConfiguration.getIRIForEdgeLabel(String)
for some edge label.- Specified by:
isIRIForEdgeLabel
in interfaceLPG2RDFConfiguration
-
isRDFTermForLPGNode
public boolean isRDFTermForLPGNode(org.apache.jena.graph.Node n) Description copied from interface:LPG2RDFConfiguration
Returns true if the given RDF term is in the image of the node mapping and, thus, may be returned byLPG2RDFConfiguration.getRDFTermForLPGNode(LPGNode)
for some LPG node.- Specified by:
isRDFTermForLPGNode
in interfaceLPG2RDFConfiguration
-