Package edu.fiu.jtlex.data
Interface INode
public interface INode
Super interface for Instances and Timexs.
-
Method Summary
Modifier and Type Method Description voidaddInLink(ILink link)Add a link to the set of IN links from this node.voidaddOutLink(ILink link)Add a link to the set of OUT links from this node.INodeclone()Returns a deep copy of the Node.booleanequals(java.lang.Object o)intgetId()Returns the integer part of the node ID.java.lang.StringgetIdStr()Returns the full string representation of the node ID.java.util.Set<ILink>getInLinks()Returns a set of links that have this node as a target.java.util.Set<ILink>getOutLinks()Returns a set of links that have this node as a origin.ITypegetType()Return the integer that corresponds with the type.voidremoveInLink(ILink link)Removes a link that has this node as a target.voidremoveOutLink(ILink link)Removes a link that has this node as an origin.java.lang.StringtoJSON()Returns the JSON (RFC 8259) representation of the Node.
-
Method Details
-
getId
int getId()Returns the integer part of the node ID. Each event has to be identified by a unique ID number.- Returns:
- Integer part of the node ID. May not be 0 or negative.
-
getType
IType getType()Return the integer that corresponds with the type. Each event can be categorized under three different types.- Returns:
- Enum that corresponds with the type of node.
-
getIdStr
java.lang.String getIdStr()Returns the full string representation of the node ID. Each event has to be identified by a unique ID number and String.- Returns:
- Full string representation of the node ID. May not return
null.
-
addOutLink
Add a link to the set of OUT links from this node.- Parameters:
link- a new OUT link from this node.
-
addInLink
Add a link to the set of IN links from this node.- Parameters:
link- the link to the set of IN links from this node.
-
removeOutLink
Removes a link that has this node as an origin.- Parameters:
link- a link that has this node as an origin.
-
removeInLink
Removes a link that has this node as a target.- Parameters:
link- a link that has this node as a target.
-
getOutLinks
java.util.Set<ILink> getOutLinks()Returns a set of links that have this node as a origin.- Returns:
- a set of links that have this node as a origin.
-
getInLinks
java.util.Set<ILink> getInLinks()Returns a set of links that have this node as a target.- Returns:
- a set of links that have this node as a target.
-
equals
boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
toJSON
java.lang.String toJSON()Returns the JSON (RFC 8259) representation of the Node.- Returns:
- the JSON (RFC 8259) representation of the Node.
-
clone
INode clone()Returns a deep copy of the Node.- Returns:
- a deep copy of the Node.
-