Class JsonLdValue
java.lang.Object
org.odpi.openmetadata.frameworks.integration.dcat.jsonld.JsonLdValue
JsonLdValue is a value of a property of a node in a JSON-LD graph. It is either a literal (a string with an optional
language or datatype) or a reference to another node.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the IRI of the datatype of the literal.Return the language tag of the literal.Return the identifier of the referenced node.getValue()Return the literal value.booleanReturn whether this value is a reference to another node.static JsonLdValueCreate a literal value.static JsonLdValueCreate a reference to another node.toString()Standard toString method.
-
Method Details
-
literal
Create a literal value.- Parameters:
value- literal valuelanguage- language tag (may be null)datatype- IRI of the datatype (may be null)- Returns:
- value
-
reference
Create a reference to another node.- Parameters:
nodeId- identifier of the node - either an IRI or a blank node identifier- Returns:
- value
-
isReference
public boolean isReference()Return whether this value is a reference to another node.- Returns:
- boolean
-
getValue
Return the literal value.- Returns:
- string or null if this is a reference
-
getLanguage
Return the language tag of the literal.- Returns:
- string or null
-
getDatatype
Return the IRI of the datatype of the literal.- Returns:
- string or null
-
getNodeId
Return the identifier of the referenced node.- Returns:
- string or null if this is a literal
-
toString
Standard toString method.
-