Interface LPG2RDFConfiguration
- All Known Implementing Classes:
DefaultLPG2RDFConfigurationImpl
,LPG2RDFConfigurationImpl
public interface LPG2RDFConfiguration
Represents the notion of an LPG-to-RDF configuration as defined in
Olaf Hartig: "Foundations to Query Labeled Property Graphs using SPARQL*."
In the Proceedings of the 1st Int. Workshop on Approaches for Making Data
Interoperable (AMAR) at SEMANTiCS 2019.
https://ceur-ws.org/Vol-2447/paper3.pdf
Such a configuration consist of the following five components, which are
captured by the methods of this interface.
i) an injective function called node mapping that maps every given LPG node
to either an IRI or a blank node,
ii) an injective function called node label mapping that maps labels of LPG
nodes to IRIs or literals,
iii) an injective function called edge label mapping that maps labels of LPG
edges to IRIs,
iv) an injective function called property name mapping that maps names of
properties of LPG nodes and edge to IRIs, and
v) an IRI to be used in the predicate position of any RDF triple that
captures information about the label of some LPG node.
-
Method Summary
Modifier and TypeMethodDescriptiongetEdgeLabelForIRI
(org.apache.jena.graph.Node iri) 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 edgeLabel) 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 term) 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 term) 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 iri) 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 nodeLabel) 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 iri) Returns true if the given IRI is in the image of the edge label mapping and, thus, may be returned bygetIRIForEdgeLabel(String)
for some edge label.boolean
isIRIForPropertyName
(org.apache.jena.graph.Node iri) Returns true if the given IRI is in the image of the property name mapping and, thus, may be returned bygetIRIForPropertyName(String)
for some property name.boolean
isRDFTermForLPGNode
(org.apache.jena.graph.Node term) Returns true if the given RDF term is in the image of the node mapping and, thus, may be returned bygetRDFTermForLPGNode(LPGNode)
for some LPG node.boolean
isRDFTermForNodeLabel
(org.apache.jena.graph.Node term) Returns true if the given RDF term is in the image of the node label mapping and, thus, may be returned bygetRDFTermForNodeLabel(String)
for some node label.
-
Method Details
-
getRDFTermForLPGNode
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. -
isRDFTermForLPGNode
boolean isRDFTermForLPGNode(org.apache.jena.graph.Node term) Returns true if the given RDF term is in the image of the node mapping and, thus, may be returned bygetRDFTermForLPGNode(LPGNode)
for some LPG node. -
getLPGNodeForRDFTerm
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 caseisRDFTermForLPGNode(Node)
returns false), this method throws anIllegalArgumentException
. -
getRDFTermForNodeLabel
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. -
isRDFTermForNodeLabel
boolean isRDFTermForNodeLabel(org.apache.jena.graph.Node term) Returns true if the given RDF term is in the image of the node label mapping and, thus, may be returned bygetRDFTermForNodeLabel(String)
for some node label. -
getNodeLabelForRDFTerm
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 caseisRDFTermForNodeLabel(Node)
returns false), this method throws anIllegalArgumentException
. -
getIRIForEdgeLabel
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. -
isIRIForEdgeLabel
boolean isIRIForEdgeLabel(org.apache.jena.graph.Node iri) Returns true if the given IRI is in the image of the edge label mapping and, thus, may be returned bygetIRIForEdgeLabel(String)
for some edge label. -
getEdgeLabelForIRI
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 caseisIRIForEdgeLabel(Node)
returns false), this method throws anIllegalArgumentException
. -
getIRIForPropertyName
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. -
isIRIForPropertyName
boolean isIRIForPropertyName(org.apache.jena.graph.Node iri) Returns true if the given IRI is in the image of the property name mapping and, thus, may be returned bygetIRIForPropertyName(String)
for some property name. -
getPropertyNameForIRI
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 caseisIRIForPropertyName(Node)
returns false), this method throws anIllegalArgumentException
. -
getLabelPredicate
org.apache.jena.graph.Node getLabelPredicate()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.
-