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
TheViewdefines theElements to be returned for an operation. A view should containEdgeandEntitytypes required and for each group it can optionally contain anElementFilterand aElementTransformer. ThePredicates within the ElementFilter describe the how the elements should be filtered. TheFunctions 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 classView.BaseBuilder<CHILD_CLASS extends View.BaseBuilder<?>>static classView.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:
toStringin classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
getElement
public ViewElementDefinition getElement(String group)
Description copied from class:ElementDefinitionsLooks 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:
getElementin classElementDefinitions<ViewElementDefinition,ViewElementDefinition>- Parameters:
group- an group- Returns:
- the
ElementDefinitionfor 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:
equalsin classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classElementDefinitions<ViewElementDefinition,ViewElementDefinition>
-
getClassName
public String getClassName()
-
-