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
Elementsare 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 StringDEFAULT_GROUP
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcopyProperties(Properties properties)abstract ElementemptyClone()booleanequals(Object obj)ElementgetElement()StringgetGroup()abstract ObjectgetIdentifier(IdentifierType identifierType)PropertiesgetProperties()ObjectgetProperty(String name)inthashCode()voidputProperty(String name, Object value)ObjectremoveProperty(String propName)ElementshallowClone()booleanshallowEquals(Object obj)booleanshallowEquals(Element element)StringtoString()-
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()
-
-