Package oracle.pgx.config
Class GraphPropertyConfigBuilder
- java.lang.Object
-
- oracle.pgx.config.GraphPropertyConfigBuilder
-
@Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"}) public final class GraphPropertyConfigBuilder extends java.lang.Object
Builder forGraphPropertyConfig
.
-
-
Constructor Summary
Constructors Constructor Description GraphPropertyConfigBuilder()
Constructs an empty GraphPropertyConfigBuilderGraphPropertyConfigBuilder(java.util.Map<GraphPropertyConfig.Field,java.lang.Object> values)
Constructs a GraphPropertyConfigBuilder initialized with the values from the given mapGraphPropertyConfigBuilder(GraphPropertyConfig config)
Constructs a GraphPropertyConfigBuilder initialized with the values from the given configGraphPropertyConfigBuilder(GraphPropertyConfigBuilder builder)
Constructs a GraphPropertyConfigBuilder initialized with the values from the given builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphPropertyConfig
build()
Builds the GraphPropertyConfig with aparentPath
ofnull
.GraphPropertyConfig
build(java.lang.String parentPath)
Builds the GraphPropertyConfig.static GraphPropertyConfig
buildGraphPropertyConfig(java.util.function.Consumer<GraphPropertyConfigBuilder> builderSetup)
Builds aGraphPropertyConfig
in-placeGraphPropertyConfigBuilder
clear()
Clears all values from the builderjava.util.Map<GraphPropertyConfig.Field,java.lang.Object>
getValues()
GraphPropertyConfigBuilder
putAll(java.util.Map<GraphPropertyConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.GraphPropertyConfigBuilder
putAll(GraphPropertyConfig config)
Puts all values from the given config into this builderGraphPropertyConfigBuilder
setAggregate(Aggregate aggregate)
[currently unsupported] which aggregation function to use, aggregation always happens by vertex keyGraphPropertyConfigBuilder
setColumn(java.lang.Object column)
name or index (starting from 1) of the column holding the property data.GraphPropertyConfigBuilder
setDefault(java.lang.Object defaultVal)
default value to be assigned to this property if datasource does not provide it.GraphPropertyConfigBuilder
setDimension(int dimension)
dimension of propertyGraphPropertyConfigBuilder
setDropAfterLoading(boolean dropAfterLoading)
[currently unsupported] indicating helper properties only used for aggregation, which are dropped after loadingGraphPropertyConfigBuilder
setField(java.lang.Object field)
name of the JSON field holding the property data.GraphPropertyConfigBuilder
setFormat(java.lang.String... format)
array of formats of propertyGraphPropertyConfigBuilder
setGroupKey(java.lang.String groupKey)
[currently unsupported] can only be used if the property / key is part of the grouping expressionGraphPropertyConfigBuilder
setMaxDistinctStringsPerPool(int maxDistinctStringsPerPool)
[only relevant if string_pooling_strategy is indexed] amount of distinct strings per property after which to stop pooling.GraphPropertyConfigBuilder
setName(java.lang.String name)
name of propertyGraphPropertyConfigBuilder
setStores(java.lang.Object... stores)
A list of storage identifiers that indicate where this property resides.GraphPropertyConfigBuilder
setStores(java.util.List<?> stores)
A list of storage identifiers that indicate where this property resides.GraphPropertyConfigBuilder
setStringPoolingStrategy(StringPoolingStrategy stringPoolingStrategy)
which string pooling strategy to use.GraphPropertyConfigBuilder
setType(PropertyType type)
type of property (Note: date is deprecated, use one of local_date / time / timestamp / time_with_timezone / timestamp_with_timezone instead).java.io.InputStream
toInputStream()
java.lang.String
toString()
-
-
-
Constructor Detail
-
GraphPropertyConfigBuilder
public GraphPropertyConfigBuilder()
Constructs an empty GraphPropertyConfigBuilder
-
GraphPropertyConfigBuilder
public GraphPropertyConfigBuilder(java.util.Map<GraphPropertyConfig.Field,java.lang.Object> values)
Constructs a GraphPropertyConfigBuilder initialized with the values from the given map- Parameters:
values
- a map containing configuration values
-
GraphPropertyConfigBuilder
public GraphPropertyConfigBuilder(GraphPropertyConfig config)
Constructs a GraphPropertyConfigBuilder initialized with the values from the given config- Parameters:
config
- the configuration to take the values from
-
GraphPropertyConfigBuilder
public GraphPropertyConfigBuilder(GraphPropertyConfigBuilder builder)
Constructs a GraphPropertyConfigBuilder initialized with the values from the given builder- Parameters:
builder
- the builder to take the values from
-
-
Method Detail
-
buildGraphPropertyConfig
public static GraphPropertyConfig buildGraphPropertyConfig(java.util.function.Consumer<GraphPropertyConfigBuilder> builderSetup)
Builds aGraphPropertyConfig
in-place- Parameters:
builderSetup
- a consumer to setup a newly createdGraphPropertyConfig
-
putAll
public GraphPropertyConfigBuilder putAll(java.util.Map<GraphPropertyConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.- Parameters:
values
- the values to put in the builder
-
putAll
public GraphPropertyConfigBuilder putAll(GraphPropertyConfig config)
Puts all values from the given config into this builder- Parameters:
config
- the config to take the values from
-
clear
public GraphPropertyConfigBuilder clear()
Clears all values from the builder
-
build
public GraphPropertyConfig build(java.lang.String parentPath)
Builds the GraphPropertyConfig.- Parameters:
parentPath
- if not null, resolves relative paths against this parentPath- Returns:
- an instance of GraphPropertyConfig
-
build
public GraphPropertyConfig build()
Builds the GraphPropertyConfig with aparentPath
ofnull
.- Returns:
- An instance of GraphPropertyConfig
- See Also:
build(String)
-
toInputStream
public java.io.InputStream toInputStream()
- Returns:
- an
InputStream
representing the config
-
getValues
public java.util.Map<GraphPropertyConfig.Field,java.lang.Object> getValues()
- Returns:
- the raw config values
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setName
public GraphPropertyConfigBuilder setName(java.lang.String name)
name of property
-
setDimension
public GraphPropertyConfigBuilder setDimension(int dimension)
dimension of property
-
setFormat
public GraphPropertyConfigBuilder setFormat(java.lang.String... format)
array of formats of property- Parameters:
format
- possible format for property
-
setType
public GraphPropertyConfigBuilder setType(PropertyType type)
type of property (Note: date is deprecated, use one of local_date / time / timestamp / time_with_timezone / timestamp_with_timezone instead). vertex/edge are place-holders for the type specified in vertex_id_type/edge_id_type fields.
-
setDefault
public GraphPropertyConfigBuilder setDefault(java.lang.Object defaultVal)
default value to be assigned to this property if datasource does not provide it. In case of date type: string is expected to be formatted withyyyy-MM-dd HH:mm:ss
. If no default is present (null
), non-existent properties will contain default Java types (primitives) or empty string (string) or01.01.1970 00:00
(date).
-
setColumn
public GraphPropertyConfigBuilder setColumn(java.lang.Object column)
name or index (starting from 1) of the column holding the property data. If it is not specified, the loader will try to use the property name as column name (for CSV format only)
-
setStores
public GraphPropertyConfigBuilder setStores(java.lang.Object... stores)
A list of storage identifiers that indicate where this property resides.- Parameters:
stores
- Describes the name of the external system where this property resides.
-
setMaxDistinctStringsPerPool
public GraphPropertyConfigBuilder setMaxDistinctStringsPerPool(int maxDistinctStringsPerPool)
[only relevant if string_pooling_strategy is indexed] amount of distinct strings per property after which to stop pooling. If the limit is reached an exception is thrown. If set to null, the default value from the global PGX configuration will be used.
-
setStringPoolingStrategy
public GraphPropertyConfigBuilder setStringPoolingStrategy(StringPoolingStrategy stringPoolingStrategy)
which string pooling strategy to use. If set to null, the default value from the global PGX configuration will be used.
-
setAggregate
public GraphPropertyConfigBuilder setAggregate(Aggregate aggregate)
[currently unsupported] which aggregation function to use, aggregation always happens by vertex key
-
setField
public GraphPropertyConfigBuilder setField(java.lang.Object field)
name of the JSON field holding the property data. Nesting is denoted by dot - separation. Field names containing dots are possible, in this case the dots need to be escaped using backslashes to resolve ambiguities. Only the exactly specified object are loaded, if they are non existent, the default value is used
-
setGroupKey
public GraphPropertyConfigBuilder setGroupKey(java.lang.String groupKey)
[currently unsupported] can only be used if the property / key is part of the grouping expression
-
setDropAfterLoading
public GraphPropertyConfigBuilder setDropAfterLoading(boolean dropAfterLoading)
[currently unsupported] indicating helper properties only used for aggregation, which are dropped after loading
-
setStores
public GraphPropertyConfigBuilder setStores(java.util.List<?> stores)
A list of storage identifiers that indicate where this property resides.- Parameters:
stores
- Describes the name of the external system where this property resides.
-
-