T
- which graph configuration object this builder will produce
public abstract class AbstractGraphConfigBuilder<T extends AbstractGraphConfigBuilder<T,GC>,GC extends GraphConfig>
extends java.lang.Object
Constructor and Description |
---|
AbstractGraphConfigBuilder()
default constructor
|
Modifier and Type | Method and Description |
---|---|
T |
addAttribute(java.lang.String key, java.lang.String value)
Adds a specific additional attribute to this config
|
T |
addEdgeProperty(java.lang.String name, PropertyType type)
Convenience method for
addEdgeProperty(String, PropertyType, Object) . |
T |
addEdgeProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
Adds an edge property to this builder
|
T |
addNodeProperty(java.lang.String name, PropertyType type)
Alias for
addVertexProperty(String, PropertyType) . |
T |
addNodeProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
|
T |
addVertexProperty(java.lang.String name, PropertyType type)
Convenience method for
addVertexProperty(String, PropertyType, Object) . |
T |
addVertexProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
Add a vertex property to this builder
|
GC |
build()
Build the graph configuration object
|
T |
clearEdgeProperties()
Removes all edge properties from this builder
|
T |
clearVertexProperties()
Removes all vertex properties from this builder
|
T |
copyBaseFrom(GraphConfig graphConfig)
Sets this builder with the values of the given graph config, this only includes base settings (format, temporal formats, vertex properties, edge properties, loading configuration and error handling configuration).
|
T |
copyFrom(GC graphConfig)
Sets this builder with all the values of the given graph config.
|
T |
removeEdgeProperty(java.lang.String name)
Removes an edge property from this builder
|
T |
removeVertexProperty(java.lang.String name)
Removes a vertex property from this builder
|
T |
setAutoRefresh(boolean autoRefresh) |
T |
setCreateEdgeIdIndex(boolean create)
Sets the create edge id index flag.
|
T |
setCreateEdgeIdMapping(boolean create)
Sets the create edge id mapping.
|
T |
setCreateVertexIdIndex(boolean create)
Sets the create vertex ID index flag.
|
T |
setCreateVertexIdMapping(boolean create)
Sets the create vertex id mapping flag.
|
T |
setDateFormat(java.lang.String dateFormat)
Sets the date format used for loading and storing the graph.
|
T |
setErrorHandlingOnMissedPropKey(OnMismatch action)
Sets the error handling on missed prop key.
|
T |
setErrorHandlingOnMissingVertex(OnMissingVertex action)
Sets the error handling on a missing vertex.
|
T |
setErrorHandlingOnPropConversion(OnMismatch action)
Sets the error handling on prop conversion.
|
T |
setErrorHandlingOnTypeMismatch(OnMismatch action)
Sets the error handling on type mismatch.
|
T |
setFetchIntervalSec(int seconds)
Sets the refresh interval in seconds.
|
T |
setFilter(GraphFilter filter) |
T |
setFilterStrategy(FilterStrategy filterStrategy) |
T |
setLabelValueDelimiter(java.lang.String delimiter)
if
null read the whole String value as label. |
T |
setLoadEdgeLabel(boolean flag)
Sets the edge label loading.
|
T |
setLoadVertexLabels(boolean flag)
Sets the vertex label loading.
|
T |
setLocalDateFormat(java.util.List<java.lang.String> localDateFormatList)
Sets the list of local_date formats used for loading and storing the graph.
|
T |
setPropertyValueDelimiter(java.lang.String delimiter)
(only relevant for
use_vertex_property_value_as_label ) if null read the whole property value as label. |
T |
setSkipEdgeLoading(boolean flag)
Sets the skip edges flag.
|
T |
setSkipVertexLoading(boolean flag)
Sets the skip vertices flag.
|
T |
setStrictMode(boolean strictMode)
Sets the strict mode.
|
T |
setTimeFormat(java.util.List<java.lang.String> timeFormatList)
Sets the list of time formats used for loading and storing the graph.
|
T |
setTimestampFormat(java.util.List<java.lang.String> timestampFormatList)
Sets the list timestamp formats used for loading and storing the graph.
|
T |
setTimestampWithTimezoneFormat(java.util.List<java.lang.String> timestampWithTimezoneFormatList)
Sets the list of timestamp with timezone formats used for loading and storing the graph.
|
T |
setTimeWithTimezoneFormat(java.util.List<java.lang.String> timeWithTimezoneFormatList)
Sets the list of time with timezone formats used for loading and storing the graph.
|
T |
setUpdateIntervalSec(int seconds) |
T |
setUpdateThreshold(int threshold) |
T |
setUseVertexPropertyValueAsLabel(java.lang.String labelPropertyName)
Load the given property as vertex label.
|
T |
setVertexIdType(IdType vertexIdType)
Sets the type of vertex IDs
|
public AbstractGraphConfigBuilder()
public T addAttribute(java.lang.String key, java.lang.String value)
key
- the attribute's keyvalue
- the attribute's valuepublic T addEdgeProperty(java.lang.String name, PropertyType type)
addEdgeProperty(String, PropertyType, Object)
.name
- the name of the edge propertytype
- the type of the edge propertypublic T addEdgeProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
name
- the name of the edge propertytype
- the type of the edge propertydefaultVal
- the default value of the edge property (can be null
)public T addNodeProperty(java.lang.String name, PropertyType type)
addVertexProperty(String, PropertyType)
.name
-type
-public T addNodeProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
name
-type
-defaultVal
-public T addVertexProperty(java.lang.String name, PropertyType type)
addVertexProperty(String, PropertyType, Object)
.name
- the name of the vertex propertytype
- the type of the vertex propertypublic T addVertexProperty(java.lang.String name, PropertyType type, java.lang.Object defaultVal)
name
- the name of the vertex propertytype
- the type of the vertex propertydefaultVal
- the default value of the vertex property (can be null
)public GC build()
public T clearEdgeProperties()
public T clearVertexProperties()
public final T copyBaseFrom(GraphConfig graphConfig)
graphConfig
- the graph configuration from which to copy the valuespublic T copyFrom(GC graphConfig)
graphConfig
- the graph configuration from which to copy the valuespublic T removeEdgeProperty(java.lang.String name)
name
- the name of the edge propertypublic T removeVertexProperty(java.lang.String name)
name
- the name of the vertex propertypublic T setAutoRefresh(boolean autoRefresh)
public T setCreateEdgeIdIndex(boolean create)
create
- if true
, a edge ID index is createdpublic T setCreateEdgeIdMapping(boolean create)
create
- if true
, a edge ID mapping is createdpublic T setCreateVertexIdIndex(boolean create)
create
- if true
, a vertex ID index is createdpublic T setCreateVertexIdMapping(boolean create)
create
- if true
, a vertex ID mapping is createdpublic T setDateFormat(java.lang.String dateFormat)
dateFormat
- the date formatpublic T setErrorHandlingOnMissedPropKey(OnMismatch action)
action
- the actionpublic T setErrorHandlingOnMissingVertex(OnMissingVertex action)
action
- the actionpublic T setErrorHandlingOnPropConversion(OnMismatch action)
action
- the actionpublic T setErrorHandlingOnTypeMismatch(OnMismatch action)
action
- the actionpublic T setFetchIntervalSec(int seconds)
seconds
- the interval in secondspublic T setFilter(GraphFilter filter)
public T setFilterStrategy(FilterStrategy filterStrategy)
public T setLabelValueDelimiter(java.lang.String delimiter)
null
read the whole String value as label. Otherwise, split the string using the specified delimiter and use all values as vertex labelsdelimiter
- the delimiter to use. If null
read the whole String value as labelpublic T setLoadEdgeLabel(boolean flag)
flag
- sets to load the edge label if true
public T setLoadVertexLabels(boolean flag)
flag
- sets to load the vertex label if true
public T setLocalDateFormat(java.util.List<java.lang.String> localDateFormatList)
localDateFormatList
- the list of date formatspublic T setPropertyValueDelimiter(java.lang.String delimiter)
use_vertex_property_value_as_label
) if null
read the whole property value as label. Otherwise, split the string using the specified delimiter and use all values as vertex labelsdelimiter
- the delimiter to use. If null
read the whole property as labelpublic T setSkipEdgeLoading(boolean flag)
flag
- sets to skip the edges if true
public T setSkipVertexLoading(boolean flag)
flag
- sets to skip the vertices if true
public T setStrictMode(boolean strictMode)
strictMode
- if true
, strict mode is enabled, otherwise strict mode is disabledpublic T setTimeFormat(java.util.List<java.lang.String> timeFormatList)
timeFormatList
- the list of date formatspublic T setTimestampFormat(java.util.List<java.lang.String> timestampFormatList)
timestampFormatList
- the list of date formatspublic T setTimestampWithTimezoneFormat(java.util.List<java.lang.String> timestampWithTimezoneFormatList)
timestampWithTimezoneFormatList
- the list of date formatspublic T setTimeWithTimezoneFormat(java.util.List<java.lang.String> timeWithTimezoneFormatList)
timeWithTimezoneFormatList
- the list of date formatspublic T setUpdateIntervalSec(int seconds)
public T setUpdateThreshold(int threshold)
public T setUseVertexPropertyValueAsLabel(java.lang.String labelPropertyName)
labelPropertyName
- the name of the property to load as labelCopyright © 2017 Oracle Corp. All Rights Reserved.