Package cz.cvut.kbss.jsonld.common
Class IdentifierUtil
java.lang.Object
cz.cvut.kbss.jsonld.common.IdentifierUtil
Allows to generate blank nodes for identifier-less instances.
Although objects in JSON-LD are not required to have id, some tools may have issues processing such data. In addition, multiple references to the same instance cannot be created when serializing the JSON-LD, as there is no identifier to reference.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Generates a (pseudo)random blank node identifier.static boolean
isCompactIri
(String value) Checks whether the specified value is a compact IRI, as defined by the JSON-LD specification par. 4.1.5.
-
Field Details
-
B_NODE_PREFIX
Prefix of a blank node identifier.- See Also:
-
-
Constructor Details
-
IdentifierUtil
public IdentifierUtil()
-
-
Method Details
-
generateBlankNodeId
Generates a (pseudo)random blank node identifier.- Returns:
- Blank node identifier
-
isCompactIri
Checks whether the specified value is a compact IRI, as defined by the JSON-LD specification par. 4.1.5.- Parameters:
value
- The value to examine- Returns:
true
if the specified value is a compact IRI,false
otherwise
-