Module org.apache.jena.arq
Class CDTLiteralFunctionUtils
java.lang.Object
org.apache.jena.sparql.function.library.cdt.CDTLiteralFunctionUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncheckAndGetList
(org.apache.jena.graph.Node n) CallsensureListLiteral(Node)
first, andgetList(Node)
afterwards.checkAndGetMap
(org.apache.jena.graph.Node n) CallsensureMapLiteral(Node)
first, andgetMap(Node)
afterwards.static final org.apache.jena.graph.Node
createNode
(List<CDTValue> list) Creates aNode
with a cdt:List literal that represents the given list.static final org.apache.jena.graph.Node
createNode
(Map<CDTKey, CDTValue> map) Creates aNode
with a cdt:Map literal that represents the given map.static final NodeValue
createNodeValue
(List<CDTValue> list) Creates aNodeValue
with a cdt:List literal that represents the given list.static final NodeValue
createNodeValue
(Map<CDTKey, CDTValue> map) Creates aNodeValue
with a cdt:Map literal that represents the given map.static final void
ensureListLiteral
(org.apache.jena.graph.Node n) UsesCompositeDatatypeList.isListLiteral(Node)
to check whether the given node is a cdt:List literal and throws an exception if not.static final void
ensureMapLiteral
(org.apache.jena.graph.Node n) UsesCompositeDatatypeMap.isMapLiteral(Node)
to check whether the given node is a cdt:Map literal and throws an exception if not.getList
(org.apache.jena.graph.Node n) Assumes that the given node is a cdt:List literal and usesCompositeDatatypeList.getValue(LiteralLabel)
to get the list.getMap
(org.apache.jena.graph.Node n) Assumes that the given node is a cdt:Map literal and usesCompositeDatatypeMap.getValue(LiteralLabel)
to get the map.
-
Constructor Details
-
CDTLiteralFunctionUtils
public CDTLiteralFunctionUtils()
-
-
Method Details
-
ensureListLiteral
UsesCompositeDatatypeList.isListLiteral(Node)
to check whether the given node is a cdt:List literal and throws an exception if not.- Throws:
ExprEvalException
-
ensureMapLiteral
UsesCompositeDatatypeMap.isMapLiteral(Node)
to check whether the given node is a cdt:Map literal and throws an exception if not.- Throws:
ExprEvalException
-
getList
Assumes that the given node is a cdt:List literal and usesCompositeDatatypeList.getValue(LiteralLabel)
to get the list. Throws an ExprEvalException if a DatatypeFormatException is thrown byCompositeDatatypeList.getValue(LiteralLabel)
.- Throws:
ExprEvalException
-
getMap
public static final Map<CDTKey,CDTValue> getMap(org.apache.jena.graph.Node n) throws ExprEvalException Assumes that the given node is a cdt:Map literal and usesCompositeDatatypeMap.getValue(LiteralLabel)
to get the map. Throws an ExprEvalException if a DatatypeFormatException is thrown byCompositeDatatypeMap.getValue(LiteralLabel)
.- Throws:
ExprEvalException
-
checkAndGetList
public static final List<CDTValue> checkAndGetList(org.apache.jena.graph.Node n) throws ExprEvalException CallsensureListLiteral(Node)
first, andgetList(Node)
afterwards.- Throws:
ExprEvalException
-
checkAndGetMap
public static final Map<CDTKey,CDTValue> checkAndGetMap(org.apache.jena.graph.Node n) throws ExprEvalException CallsensureMapLiteral(Node)
first, andgetMap(Node)
afterwards.- Throws:
ExprEvalException
-
checkAndGetList
- Throws:
ExprEvalException
-
checkAndGetMap
- Throws:
ExprEvalException
-
createNode
Creates aNode
with a cdt:List literal that represents the given list. -
createNode
Creates aNode
with a cdt:Map literal that represents the given map. -
createNodeValue
Creates aNodeValue
with a cdt:List literal that represents the given list. -
createNodeValue
Creates aNodeValue
with a cdt:Map literal that represents the given map.
-