Package org.semanticweb.owlapi.model
Class NodeID
java.lang.Object
org.semanticweb.owlapi.model.NodeID
- All Implemented Interfaces:
Serializable
,Comparable<NodeID>
Represents the Node ID for anonymous individuals.
- Since:
- 3.0.0
- Author:
- Matthew Horridge, The University of Manchester, Information Management Group
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
getID()
Gets the string representation of the node ID.static String
getIRIFromNodeID
(String nodeID) Returns an absolute IRI from a nodeID attribute.static NodeID
static NodeID
Gets a NodeID with a specific identifier string.int
hashCode()
static boolean
isAnonymousNodeID
(String iri) static boolean
isAnonymousNodeIRI
(String iri) Tests whether supplied IRI was generated by this parser in order to label an anonymous node.static boolean
isAnonymousNodeIRI
(IRI iri) Tests whether supplied IRI was generated by this parser in order to label an anonymous node.static String
Generates next anonymous IRI.static IRI
static IRI
static String
nodeString
(int id) static String
stripArtifacts
(CharSequence resource) toString()
-
Method Details
-
nodeString
- Parameters:
id
- the node id- Returns:
- string version of id
-
nodeId
- Parameters:
id
- id- Returns:
- IRI with full node id
-
getIRIFromNodeID
Returns an absolute IRI from a nodeID attribute.- Parameters:
nodeID
- the node id- Returns:
- absolute IRI
-
nextAnonymousIRI
Generates next anonymous IRI.- Returns:
- absolute IRI
-
nextFreshNodeId
- Returns:
- IRI with fresh node id
-
isAnonymousNodeIRI
Tests whether supplied IRI was generated by this parser in order to label an anonymous node.- Parameters:
iri
- the IRI- Returns:
true
if the IRI was generated by this parser to label an anonymous node
-
isAnonymousNodeIRI
Tests whether supplied IRI was generated by this parser in order to label an anonymous node.- Parameters:
iri
- the IRI- Returns:
true
if the IRI was generated by this parser to label an anonymous node
-
isAnonymousNodeID
- Parameters:
iri
- the iri or node id- Returns:
- true if the iri is an anonymous label
-
getNodeID
Gets a NodeID with a specific identifier string.- Parameters:
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.- Returns:
- A NodeID
-
getNodeID
- Returns:
- get a new node id with an autogenerated, sequential id
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<NodeID>
-
equals
-
hashCode
public int hashCode() -
getID
Gets the string representation of the node ID. This will begin with _:- Returns:
- The string representation of the node ID.
-
stripArtifacts
- Parameters:
resource
- nodeid IRI to strip of prefixes- Returns:
- id string compatible with RDF/XML
-