Package uk.gov.gchq.gaffer.tinkerpop
Class GafferPopGraphVariables
- java.lang.Object
-
- uk.gov.gchq.gaffer.tinkerpop.GafferPopGraphVariables
-
- All Implemented Interfaces:
org.apache.tinkerpop.gremlin.structure.Graph.Variables
public final class GafferPopGraphVariables extends Object implements org.apache.tinkerpop.gremlin.structure.Graph.Variables
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGafferPopGraphVariables.HasStepFilterStage
-
Field Summary
Fields Modifier and Type Field Description static StringCYPHER_KEYKey used in a with step to include a opencypher query traversalstatic StringDATA_AUTHSVariable key for the list of data auths for the default user.static intDEFAULT_GET_ELEMENTS_LIMITDefault value for the max number of elements returned by getElementsstatic GafferPopGraphVariables.HasStepFilterStageDEFAULT_HAS_STEP_FILTER_STAGEDefault to pre-aggregation filtering for HasStep predicatesstatic StringGET_ELEMENTS_LIMITThe max number of elements that can be returned by a single GetElements or GetAllElementsstatic StringHAS_STEP_FILTER_STAGEWhen to apply HasStep filteringstatic StringINCLUDE_ORPHANED_VERTICESThe key to set if orphaned vertices (e.g.static StringLAST_OPERATION_CHAINThe variable with the last Gaffer operation chain that was ran from the Gremlin querystatic StringOP_OPTIONSVariable key for theMapof Gaffer operation options.static StringUSERVariable key for the user who is interacting with the graph.static StringUSER_IDVariable key for the userId used for constructing a default user.
-
Constructor Summary
Constructors Constructor Description GafferPopGraphVariables()GafferPopGraphVariables(Map<String,Object> variables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Optional<R>get(String key)IntegergetElementsLimit()StringgetHasStepFilterStage()booleangetIncludeOrphanedVertices()OperationChain<?>getLastOperationChain()Map<String,String>getOperationOptions()Gets the operation options if available.UsergetUser()Set<String>keys()voidremove(String key)voidset(String key, Object value)voidsetOperationOptions(Iterable<String> opOptions)Sets the operation options key, attempts to convert to a StringMapby spitting each value on ':'.StringtoString()
-
-
-
Field Detail
-
OP_OPTIONS
public static final String OP_OPTIONS
Variable key for theMapof Gaffer operation options.- See Also:
- Constant Field Values
-
DATA_AUTHS
public static final String DATA_AUTHS
Variable key for the list of data auths for the default user.- See Also:
- Constant Field Values
-
USER_ID
public static final String USER_ID
Variable key for the userId used for constructing a default user.- See Also:
- Constant Field Values
-
USER
public static final String USER
Variable key for the user who is interacting with the graph.- See Also:
- Constant Field Values
-
GET_ELEMENTS_LIMIT
public static final String GET_ELEMENTS_LIMIT
The max number of elements that can be returned by a single GetElements or GetAllElements- See Also:
- Constant Field Values
-
HAS_STEP_FILTER_STAGE
public static final String HAS_STEP_FILTER_STAGE
When to apply HasStep filtering- See Also:
- Constant Field Values
-
CYPHER_KEY
public static final String CYPHER_KEY
Key used in a with step to include a opencypher query traversal- See Also:
- Constant Field Values
-
LAST_OPERATION_CHAIN
public static final String LAST_OPERATION_CHAIN
The variable with the last Gaffer operation chain that was ran from the Gremlin query- See Also:
- Constant Field Values
-
INCLUDE_ORPHANED_VERTICES
public static final String INCLUDE_ORPHANED_VERTICES
The key to set if orphaned vertices (e.g. vertices without an entity) should be included in the result- See Also:
- Constant Field Values
-
DEFAULT_GET_ELEMENTS_LIMIT
public static final int DEFAULT_GET_ELEMENTS_LIMIT
Default value for the max number of elements returned by getElements- See Also:
- Constant Field Values
-
DEFAULT_HAS_STEP_FILTER_STAGE
public static final GafferPopGraphVariables.HasStepFilterStage DEFAULT_HAS_STEP_FILTER_STAGE
Default to pre-aggregation filtering for HasStep predicates
-
-
Method Detail
-
keys
public Set<String> keys()
- Specified by:
keysin interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
get
public <R> Optional<R> get(String key)
- Specified by:
getin interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
remove
public void remove(String key)
- Specified by:
removein interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
set
public void set(String key, Object value)
- Specified by:
setin interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
setOperationOptions
public void setOperationOptions(Iterable<String> opOptions)
Sets the operation options key, attempts to convert to a StringMapby spitting each value on ':'.- Parameters:
opOptions- List of String key value pairs e.g.[ "key:value", "key2:value2" ]
-
getOperationOptions
public Map<String,String> getOperationOptions()
Gets the operation options if available.- Returns:
- Operation options map
-
getUser
public User getUser()
-
getElementsLimit
public Integer getElementsLimit()
-
getHasStepFilterStage
public String getHasStepFilterStage()
-
getLastOperationChain
public OperationChain<?> getLastOperationChain()
-
getIncludeOrphanedVertices
public boolean getIncludeOrphanedVertices()
-
-