Package uk.gov.gchq.gaffer.data.element
Class Element
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.element.Element
-
- All Implemented Interfaces:
Serializable
,ElementId
public abstract class Element extends Object implements ElementId
Elements
are the fundamental building blocks of the Graph. Elements should have identifier(s), an group and an optional collection of properties. Elements are designed so that multiple elements can share the same identifier(s) but are distinguished via their group.- An group is a way of categorising the element and grouping elements together that share the same set of properties.
- The identifier(s) along with the group should uniquely identify an element.
- The properties are any other properties of the element. Properties should be split out as much as possible into simple properties, enabling validation, aggregation, transformation and filtering to be done more precisely.
Equals has been overridden to check groups are equal. NOTE - it does not compare property values.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface uk.gov.gchq.gaffer.data.element.id.ElementId
ElementId.Matches
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_GROUP
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
copyProperties(Properties properties)
abstract Element
emptyClone()
boolean
equals(Object obj)
Element
getElement()
String
getGroup()
abstract Object
getIdentifier(IdentifierType identifierType)
Properties
getProperties()
Object
getProperty(String name)
int
hashCode()
void
putProperty(String name, Object value)
Object
removeProperty(String propName)
Element
shallowClone()
boolean
shallowEquals(Object obj)
boolean
shallowEquals(Element element)
String
toString()
-
Methods inherited from interface uk.gov.gchq.gaffer.data.element.id.ElementId
getClassName, isEqual, isRelated, setClassName
-
-
-
-
Field Detail
-
DEFAULT_GROUP
public static final String DEFAULT_GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
copyProperties
public void copyProperties(Properties properties)
-
getProperties
public Properties getProperties()
-
getGroup
public String getGroup()
-
shallowEquals
public boolean shallowEquals(Object obj)
-
shallowEquals
public boolean shallowEquals(Element element)
-
emptyClone
public abstract Element emptyClone()
-
shallowClone
public Element shallowClone()
-
getIdentifier
public abstract Object getIdentifier(IdentifierType identifierType)
-
getElement
public Element getElement()
-
-