Class View
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.elementdefinition.ElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
- uk.gov.gchq.gaffer.data.elementdefinition.view.View
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
NamedView
public class View extends ElementDefinitions<ViewElementDefinition,ViewElementDefinition> implements Cloneable
TheView
defines theElement
s to be returned for an operation. A view should containEdge
andEntity
types required and for each group it can optionally contain anElementFilter
and aElementTransformer
. ThePredicate
s within the ElementFilter describe the how the elements should be filtered. TheFunction
s within ElementTransformer allow transient properties to be created from other properties and identifiers. It also contains any transient properties that are created in transform functions.- See Also:
View.Builder
,ViewElementDefinition
,ElementFilter
,ElementTransformer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
View.BaseBuilder<CHILD_CLASS extends View.BaseBuilder<?>>
static class
View.Builder
-
Constructor Summary
Constructors Constructor Description View()
-
Method Summary
-
Methods inherited from class uk.gov.gchq.gaffer.data.elementdefinition.ElementDefinitions
getEdge, getEdgeGroups, getEdges, getEntities, getEntity, getEntityGroups, getGroups, hasEdges, hasEntities, hasGroups, isEdge, isEntity, toJson
-
-
-
-
Method Detail
-
fromJson
public static View fromJson(InputStream inputStream) throws SchemaException
- Throws:
SchemaException
-
fromJson
public static View fromJson(Path filePath) throws SchemaException
- Throws:
SchemaException
-
fromJson
public static View fromJson(byte[] jsonBytes) throws SchemaException
- Throws:
SchemaException
-
toCompactJson
public byte[] toCompactJson() throws SchemaException
- Throws:
SchemaException
-
toString
public String toString()
- Overrides:
toString
in classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
getElement
public ViewElementDefinition getElement(String group)
Description copied from class:ElementDefinitions
Looks the group up in the entity definitions then if it doesn't find a definition it will look it up in the edge definitions. If you know the type of the element (Entity or Edge) then use getEntity or getEdge.- Overrides:
getElement
in classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
- Parameters:
group
- an group- Returns:
- the
ElementDefinition
for the given group
-
isAllEntities
public boolean isAllEntities()
-
setAllEntities
public void setAllEntities(boolean allEntities)
-
isAllEdges
public boolean isAllEdges()
-
setAllEdges
public void setAllEdges(boolean allEdges)
-
getGlobalElements
public List<GlobalViewElementDefinition> getGlobalElements()
-
getGlobalEntities
public List<GlobalViewElementDefinition> getGlobalEntities()
-
getGlobalEdges
public List<GlobalViewElementDefinition> getGlobalEdges()
-
hasPreAggregationFilters
public boolean hasPreAggregationFilters()
-
hasPostAggregationFilters
public boolean hasPostAggregationFilters()
-
hasPostTransformFilters
public boolean hasPostTransformFilters()
-
hasTransform
public boolean hasTransform()
-
hasEntityFilters
public boolean hasEntityFilters()
-
hasEdgeFilters
public boolean hasEdgeFilters()
-
clone
public View clone()
-
expandGlobalDefinitions
public void expandGlobalDefinitions()
Copies all the global element definitions into the individual element definitions. The global element definitions will then be set to null
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
getClassName
public String getClassName()
-
-