|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.ilrt.inkling.api.Node
Inspired by http://www.w3.org/2001/12/rubyrdf/basicrdf.rb This is a simple Node class. use Node.getResource(), Node.getLiteral() and Node.getBlank() to create Nodes; also can have getSubjects(), getObjects(), getPredicates(), with or without an identifier for the Node as a node-centric API. There isn't any Caching or reuse of Nodes.
| Field Summary | |
boolean |
isbnode
|
boolean |
isresource
|
| Constructor Summary | |
Node()
Construtor for a basic Node with nothing in it |
|
Node(java.lang.String content)
Construtor for a basic Node with specific content |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Overriding equals for ease of comparison |
static Node |
getBlank(java.lang.String id)
Use this method to create a blank Node |
static Node |
getBlank(java.lang.String id,
Graph graph)
Use this method to create a Blank Node, also setting the Graph that contains it Note that generation of ID where the source url is known is a hash of the source with the id of the node from the parser, retaining identity of Nodes |
java.lang.String |
getContent()
Returns the Stringified value of the Node |
Graph |
getGraph()
Returns the Graph which contains the Node |
java.lang.String |
getID()
Returns the identifier of the Node |
static Node |
getLiteral(java.lang.String content)
Use this method to create a Literal Node |
static Node |
getLiteral(java.lang.String content,
Graph graph)
Use this method to create a Literal Node with a refernce to the Graph |
java.util.Vector |
getObjects()
Node-centric Graph traversal |
java.util.Vector |
getObjects(java.lang.String predid)
Node-centric Graph traversal |
java.util.Vector |
getPredicates()
Node-centric Graph traversal |
java.util.Vector |
getPredicates(java.lang.String objid)
Node-centric Graph traversal |
static Node |
getResource(java.lang.String content)
Use this method to create a Resource Node |
static Node |
getResource(java.lang.String content,
Graph graph)
Use this method to create a Resource Node, also setting the Graph that contains it |
java.util.Vector |
getSubjects()
Node-centric Graph traversal |
java.util.Vector |
getSubjects(java.lang.String predid)
Node-centric Graph traversal |
java.lang.String |
inspect()
Method for printing content |
void |
setContent(java.lang.String content)
Sets the content value of the Node |
void |
setGraph(Graph graph)
For setting the Graph which contains the Node |
void |
setID(java.lang.String id)
Sets the internal ID of the Node |
java.lang.String |
sha1()
Useful sha1 of content of Node |
java.lang.String |
toString()
Method for printing content |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public boolean isresource
public boolean isbnode
| Constructor Detail |
public Node()
public Node(java.lang.String content)
| Method Detail |
public java.lang.String getContent()
public Graph getGraph()
public void setContent(java.lang.String content)
public void setGraph(Graph graph)
public java.lang.String getID()
public void setID(java.lang.String id)
public java.lang.String inspect()
public java.lang.String toString()
toString in class java.lang.Objectpublic static Node getResource(java.lang.String content)
public static Node getResource(java.lang.String content,
Graph graph)
public static Node getBlank(java.lang.String id)
public static Node getBlank(java.lang.String id,
Graph graph)
public static Node getLiteral(java.lang.String content)
public static Node getLiteral(java.lang.String content,
Graph graph)
public java.lang.String sha1()
public java.util.Vector getObjects(java.lang.String predid)
public java.util.Vector getObjects()
public java.util.Vector getSubjects(java.lang.String predid)
public java.util.Vector getSubjects()
public java.util.Vector getPredicates(java.lang.String objid)
public java.util.Vector getPredicates()
public boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||