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() |
public static String nodeString(int id)
id
- the node idpublic static String getIRIFromNodeID(String nodeID)
nodeID
- the node idpublic static String nextAnonymousIRI()
public static IRI nextFreshNodeId()
public static boolean isAnonymousNodeIRI(@Nullable String iri)
iri
- the IRItrue
if the IRI was generated by this parser to label an anonymous nodepublic static boolean isAnonymousNodeIRI(@Nullable IRI iri)
iri
- the IRItrue
if the IRI was generated by this parser to label an anonymous nodepublic static boolean isAnonymousNodeID(@Nullable String iri)
iri
- the iri or node idpublic static NodeID getNodeID(@Nullable 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 static NodeID getNodeID()
public int compareTo(@Nullable NodeID o)
compareTo
in interface Comparable<NodeID>
public String getID()
public static String stripArtifacts(CharSequence resource)
resource
- nodeid IRI to strip of prefixesCopyright © 2020 The University of Manchester. All rights reserved.