Class GraphPropertyConfigBuilder


  • @Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"})
    public final class GraphPropertyConfigBuilder
    extends java.lang.Object
    Builder for GraphPropertyConfig.
    • 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

      • 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 a parentPath of null.
        Returns:
        An instance of GraphPropertyConfig
        See Also:
        build(String)
      • toInputStream

        public java.io.InputStream toInputStream()
        Returns:
        an InputStream representing the config
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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 with yyyy-MM-dd HH:mm:ss. If no default is present (null), non-existent properties will contain default Java types (primitives) or empty string (string) or 01.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.