public final class NodeID extends Object implements Comparable<NodeID>, Serializable
Modifier and Type | Method and Description |
---|---|
int |
compareTo(NodeID o) |
boolean |
equals(Object obj) |
String |
getID()
Gets the string representation of the node ID.
|
static String |
getIRIFromNodeID(String nodeID)
Returns an absolute IRI from a nodeID attribute.
|
static NodeID |
getNodeID() |
static NodeID |
getNodeID(String id)
Gets a NodeID with a specific identifier string
|
int |
hashCode() |
static boolean |
isAnonymousNodeID(String iri) |
static boolean |
isAnonymousNodeIRI(IRI iri)
Tests whether supplied IRI was generated by this parser in order to label an anonymous node.
|
static boolean |
isAnonymousNodeIRI(String iri)
Tests whether supplied IRI was generated by this parser in order to label an anonymous node.
|
static String |
nextAnonymousIRI()
Generates next anonymous IRI.
|
static IRI |
nextFreshNodeId() |
static IRI |
nodeId(Integer id) |
static String |
nodeString(int id) |
static String |
stripArtifacts(CharSequence resource) |
String |
toString() |
@Nonnull public static String nodeString(int id)
id
- the node id@Nonnull public static IRI nodeId(Integer id)
id
- id@Nonnull public static String getIRIFromNodeID(String nodeID)
nodeID
- the node id@Nonnull public static String nextAnonymousIRI()
public static boolean isAnonymousNodeIRI(String iri)
iri
- the IRItrue
if the IRI was generated by this parser to label an anonymous nodepublic static boolean isAnonymousNodeIRI(IRI iri)
iri
- the IRItrue
if the IRI was generated by this parser to label an anonymous nodepublic static boolean isAnonymousNodeID(String iri)
iri
- the iri or node id@Nonnull public static NodeID getNodeID(String id)
id
- The String that identifies the node. If the String doesn't start with "_:" then
this will be concatenated to the front of the specified id String; if the string is
empty or null, an autogenerated id will be used.public int compareTo(NodeID o)
compareTo
in interface Comparable<NodeID>
@Nonnull public String getID()
public static String stripArtifacts(CharSequence resource)
resource
- nodeid IRI to strip of prefixesCopyright © 2020 The University of Manchester. All rights reserved.