gate.creole.ontology
Interface LiteralOrONodeID


public interface LiteralOrONodeID

A class representing something that is either a literal or a node ID.

Author:
Johann Petrak

Method Summary
 boolean equals(Object other)
           
 Literal getLiteral()
          Get the Literal object if this object represents a literal.
 ONodeID getONodeID()
          Get the ONodeID object if this object represents a node ID.
 int hashCode()
           
 boolean isLiteral()
          Check if the object represents a literal.
 boolean isONodeID()
          Check if the object represents a node ID.
 String toString()
           
 String toTurtle()
          Create a String representation that conforms to Turtle language syntax.
 

Method Detail

isLiteral

boolean isLiteral()
Check if the object represents a literal.

Returns:
true if the object represents a literal value, false if it represents a blank node ID or an URI.

isONodeID

boolean isONodeID()
Check if the object represents a node ID.

Returns:
true if the object represents a blank node id or an URI, false if it represents a literal.

getONodeID

ONodeID getONodeID()
Get the ONodeID object if this object represents a node ID. Throws a GateOntologyException if this object represents a literal.

Returns:
the ONodeID represented by this object

getLiteral

Literal getLiteral()
Get the Literal object if this object represents a literal. Throws a GateOntologyException if this object represents a node ID.

Returns:
the Literal represented by this object

toString

String toString()
Overrides:
toString in class Object

toTurtle

String toTurtle()
Create a String representation that conforms to Turtle language syntax.

Returns:
a string representation of the node id or literal following Turtle syntax.

hashCode

int hashCode()
Overrides:
hashCode in class Object

equals

boolean equals(Object other)
Overrides:
equals in class Object