Class SandboxGraphElement
- java.lang.Object
-
- com.ensoftcorp.open.commons.sandbox.SandboxGraphElement
-
- Direct Known Subclasses:
SandboxEdge
,SandboxNode
public abstract class SandboxGraphElement extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
attr()
Returns the attribute map currently associated to this sandbox graph elementboolean
equals(java.lang.Object obj)
Sandbox graph elements are equal if they have the same addressvoid
flush(java.lang.String address)
Updates the sandbox's temporary address with the flushed addressjava.lang.String
getAddress()
Returns the address of this sandbox graph elementjava.lang.Object
getAttr(java.lang.String key)
Gets the attribute value.int
getSandboxInstanceID()
Returns the sandbox instance this graph element belongs toboolean
hasAttr(java.lang.String key)
Returns true if the attribute key is presentint
hashCode()
Sandbox graph elements are equal if they have the same addressboolean
isMirror()
Returns whether or not this sandbox graph element was originally a mirror of an Atlas graph elementjava.lang.Object
putAttr(java.lang.String key, java.lang.Object value)
Adds the attribute value.boolean
tag(java.lang.String tag)
Adds the tag.boolean
taggedWith(java.lang.String tag)
Returns true if tag is presentjava.util.Set<java.lang.String>
tags()
Returns the set of tags currently applied to this sandbox graph elementcom.ensoftcorp.atlas.core.db.graph.GraphElement
toAtlasGraphElement()
java.lang.String
toString()
-
-
-
Method Detail
-
getSandboxInstanceID
public int getSandboxInstanceID()
Returns the sandbox instance this graph element belongs to- Returns:
-
getAddress
public java.lang.String getAddress()
Returns the address of this sandbox graph element- Returns:
-
toAtlasGraphElement
public com.ensoftcorp.atlas.core.db.graph.GraphElement toAtlasGraphElement()
-
isMirror
public boolean isMirror()
Returns whether or not this sandbox graph element was originally a mirror of an Atlas graph element- Returns:
-
flush
public void flush(java.lang.String address)
Updates the sandbox's temporary address with the flushed address- Parameters:
address
-
-
tags
public java.util.Set<java.lang.String> tags()
Returns the set of tags currently applied to this sandbox graph element- Returns:
-
tag
public boolean tag(java.lang.String tag)
Adds the tag.- Parameters:
tag
-- Returns:
-
taggedWith
public boolean taggedWith(java.lang.String tag)
Returns true if tag is present- Parameters:
tag
-- Returns:
-
attr
public java.util.Map<java.lang.String,java.lang.Object> attr()
Returns the attribute map currently associated to this sandbox graph element- Returns:
-
putAttr
public java.lang.Object putAttr(java.lang.String key, java.lang.Object value)
Adds the attribute value.- Parameters:
key
-value
-- Returns:
-
getAttr
public java.lang.Object getAttr(java.lang.String key)
Gets the attribute value.- Parameters:
key
-- Returns:
-
hasAttr
public boolean hasAttr(java.lang.String key)
Returns true if the attribute key is present- Parameters:
tag
-- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
Sandbox graph elements are equal if they have the same address- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Sandbox graph elements are equal if they have the same address- Overrides:
equals
in classjava.lang.Object
-
-