Class AbstractGraphConfigBuilder<T extends AbstractGraphConfigBuilder<T,​GC>,​GC extends GraphConfig>

    • Constructor Detail

      • AbstractGraphConfigBuilder

        public AbstractGraphConfigBuilder()
        default constructor
    • Method Detail

      • toGraphConfigBuilder

        public T toGraphConfigBuilder()
        Specified by:
        toGraphConfigBuilder in interface oracle.pgx.config.internal.ConvertibleToGraphConfigBuilder
      • build

        public GC build()
        Build the graph configuration object
        Returns:
        the graph configuration object
      • copyFrom

        public T copyFrom​(GC graphConfig)
        Sets this builder with all the values of the given graph config. If a format was already specified it will remain unchanged, however any other values copied from the given graph config will overwrite the corresponding values of this builder.
        Parameters:
        graphConfig - the graph configuration from which to copy the values
        Returns:
        this builder
      • copyBaseFrom

        public final 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). If a format was already specified it will remain unchanged, however any other values copied from the given graph config will overwrite the corresponding values of this builder.
        Parameters:
        graphConfig - the graph configuration from which to copy the values
        Returns:
        this builder
      • addVertexProperty

        public T addVertexProperty​(java.lang.String name,
                                   PropertyType type,
                                   java.lang.Object defaultVal)
        Adds a vertex property to this builder
        Parameters:
        name - the name of the vertex property
        type - the type of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        Returns:
        this builder
      • addVertexStringProperty

        public T addVertexStringProperty​(java.lang.String name,
                                         java.lang.Object defaultVal,
                                         StringPoolingStrategy stringPoolingStrategy,
                                         java.lang.Integer maxDistinctStringPerPool)
        Parameters:
        name - the name of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        stringPoolingStrategy - which string pooling strategy to use
        maxDistinctStringPerPool - the amount of distinct strings per property after which to stop pooling
        Returns:
        this builder
      • addEdgeStringProperty

        public T addEdgeStringProperty​(java.lang.String name,
                                       java.lang.Object defaultVal,
                                       StringPoolingStrategy stringPoolingStrategy,
                                       java.lang.Integer maxDistinctStringPerPool)
        Parameters:
        name - the name of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        stringPoolingStrategy - which string pooling strategy to use
        maxDistinctStringPerPool - the amount of distinct strings per property after which to stop pooling
        Returns:
        this builder
      • addVertexProperty

        public T addVertexProperty​(java.lang.String name,
                                   PropertyType type,
                                   java.lang.Object defaultVal,
                                   java.lang.Object column)
        Adds a vertex property to this builder
        Parameters:
        name - the name of the vertex property
        type - the type of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        column - the column of the vertex property
        Returns:
        this builder
      • addVertexVectorProperty

        public T addVertexVectorProperty​(java.lang.String name,
                                         PropertyType type,
                                         int dimension,
                                         java.lang.Object defaultVal)
        Add a vertex property to this builder
        Parameters:
        name - the name of the vertex property
        type - the type of the vertex property
        dimension - the dimension of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        Returns:
        this builder
      • addVertexVectorProperty

        public T addVertexVectorProperty​(java.lang.String name,
                                         PropertyType type,
                                         int dimension,
                                         java.lang.Object defaultVal,
                                         java.lang.Object column)
        Add a vertex property to this builder
        Parameters:
        name - the name of the vertex property
        type - the type of the vertex property
        dimension - the dimension of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        column - the column of the vertex property
        Returns:
        this builder
      • addVertexStringProperty

        public T addVertexStringProperty​(java.lang.String name,
                                         int dimension,
                                         java.lang.Object defaultVal,
                                         java.lang.Object column,
                                         StringPoolingStrategy stringPoolingStrategy,
                                         java.lang.Integer maxDistinctStringPerPool)
        Add a string vertex property to the builder
        Parameters:
        name - the name of the vertex property
        dimension - the dimension of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        column - the column of the vertex property
        stringPoolingStrategy - which string pooling strategy to use
        maxDistinctStringPerPool - the amount of distinct strings per property after which to stop pooling
        Returns:
        this builder
      • addEdgeStringProperty

        public T addEdgeStringProperty​(java.lang.String name,
                                       int dimension,
                                       java.lang.Object defaultVal,
                                       java.lang.Object column,
                                       StringPoolingStrategy stringPoolingStrategy,
                                       java.lang.Integer maxDistinctStringPerPool)
        Add a string edge property to the builder
        Parameters:
        name - the name of the vertex property
        dimension - the dimension of the vertex property
        defaultVal - the default value of the vertex property (can be null)
        column - the column of the vertex property
        stringPoolingStrategy - which string pooling strategy to use
        maxDistinctStringPerPool - the amount of distinct strings per property after which to stop pooling
        Returns:
        this builder
      • addVertexVectorProperty

        public T addVertexVectorProperty​(java.lang.String name,
                                         PropertyType type,
                                         int dimension)
        Parameters:
        name - the name of the vertex property
        type - the type of the vertex property
        dimension - the dimension of the vertex property
        Returns:
        this builder
      • addEdgeProperty

        public T addEdgeProperty​(java.lang.String name,
                                 PropertyType type,
                                 java.lang.Object defaultVal)
        Adds an edge property to this builder
        Parameters:
        name - the name of the edge property
        type - the type of the edge property
        defaultVal - the default value of the edge property (can be null)
        Returns:
        this builder
      • addEdgeProperty

        public T addEdgeProperty​(java.lang.String name,
                                 PropertyType type,
                                 java.lang.Object defaultVal,
                                 java.lang.Object column)
        Adds an edge property to this builder
        Parameters:
        name - the name of the edge property
        type - the type of the edge property
        defaultVal - the default value of the edge property (can be null)
        column - the column of the edge property
        Returns:
        this builder
      • addEdgeVectorProperty

        public T addEdgeVectorProperty​(java.lang.String name,
                                       PropertyType type,
                                       int dimension,
                                       java.lang.Object defaultVal)
        Adds an edge property to this builder
        Parameters:
        name - the name of the edge property
        type - the type of the edge property
        dimension - the vector dimension of the property
        defaultVal - the default value of the edge property (can be null)
        Returns:
        this builder
      • addEdgeVectorProperty

        public T addEdgeVectorProperty​(java.lang.String name,
                                       PropertyType type,
                                       int dimension,
                                       java.lang.Object defaultVal,
                                       java.lang.Object column)
        Adds an edge property to this builder
        Parameters:
        name - the name of the edge property
        type - the type of the edge property
        dimension - the vector dimension of the property
        defaultVal - the default value of the edge property (can be null)
        column - the column of the edge property
        Returns:
        this builder
      • addEdgeVectorProperty

        public T addEdgeVectorProperty​(java.lang.String name,
                                       PropertyType type,
                                       int dimension)
        Parameters:
        name - the name of the edge property
        type - the type of the edge property
        dimension - the vector dimension of the property
        Returns:
        this builder
      • removeVertexProperty

        public T removeVertexProperty​(java.lang.String name)
        Removes a vertex property from this builder
        Parameters:
        name - the name of the vertex property
        Returns:
        this builder
      • removeEdgeProperty

        public T removeEdgeProperty​(java.lang.String name)
        Removes an edge property from this builder
        Parameters:
        name - the name of the edge property
        Returns:
        this builder
      • clearVertexProperties

        public T clearVertexProperties()
        Removes all vertex properties from this builder
        Returns:
        this builder
      • clearEdgeProperties

        public T clearEdgeProperties()
        Removes all edge properties from this builder
        Returns:
        this builder
      • setOptimizedFor

        public T setOptimizedFor​(GraphOptimizedFor strategy)
        Indicates if the graph should use data-structures optimized for updates.
        Parameters:
        strategy - flag to indicate if the graph should use data-structures optimized for updates or for read-intensive applications
        Returns:
        this builder
      • setPartitionWhileLoading

        public T setPartitionWhileLoading​(PartitionWhileLoading partitionWhileLoading)
        Indicates if the graph should be transformed into a heterogeneous graph while loading the graph data.
        Parameters:
        partitionWhileLoading - string to indicate if the graph should be partitioned during loading.
        Returns:
        this builder
      • setPassword

        public T setPassword​(java.lang.String password)
        Sets the password.
        Parameters:
        password - the password.
        Returns:
        this builder object.
      • setKeystoreAlias

        public T setKeystoreAlias​(java.lang.String keystoreAlias)
        Sets the keystore alias.
        Parameters:
        keystoreAlias - the keystore alias.
        Returns:
        this builder object.
      • setArrayCompactionThreshold

        public T setArrayCompactionThreshold​(java.lang.Double arrayCompactionThreshold)
        For graphs optimized for updates, set the array compaction threshold. (It should be a number between 0 and 1).
        Parameters:
        arrayCompactionThreshold - the threshold to use
        Returns:
        this builder object.
      • setVertexIdStrategy

        public T setVertexIdStrategy​(IdStrategy idStrategy)
        Sets the ID strategy used for the vertices of this graph
        Parameters:
        idStrategy - the ID strategy to use for the vertices
        Returns:
        this builder
        See Also:
        "the graph configuration documentation for details about the effects and default of this setting"
      • setEdgeIdStrategy

        public T setEdgeIdStrategy​(IdStrategy idStrategy)
        Sets the ID strategy used for the edges of this graph
        Parameters:
        idStrategy - the ID strategy to use for the edges
        Returns:
        this builder
        See Also:
        "the graph configuration documentation for details about the effects and default of this setting"
      • setVertexIdType

        public T setVertexIdType​(IdType vertexIdType)
        Sets the type of vertex IDs
        Parameters:
        vertexIdType - the type of vertex IDs
        Returns:
        this builder
        See Also:
        "the graph configuration documentation for details about the effects and default of this setting"
      • setEdgeIdType

        public T setEdgeIdType​(IdType edgeIdType)
        Sets the type of edge IDs
        Parameters:
        edgeIdType - the type of edge IDs
        Returns:
        this builder
        See Also:
        "the graph configuration documentation for details about the effects and default of this setting"
      • addAttribute

        public T addAttribute​(java.lang.String key,
                              java.lang.String value)
        Adds a specific additional attribute to this config
        Parameters:
        key - the attribute's key
        value - the attribute's value
        Returns:
        this builder
      • setLocalDateFormat

        public T setLocalDateFormat​(java.util.List<java.lang.String> localDateFormatList)
        Sets the list of local_date formats used for loading and storing the graph.
        Parameters:
        localDateFormatList - the list of date formats
        Returns:
        this builder
      • setTimeFormat

        public T setTimeFormat​(java.util.List<java.lang.String> timeFormatList)
        Sets the list of time formats used for loading and storing the graph.
        Parameters:
        timeFormatList - the list of date formats
        Returns:
        this builder
      • setTimestampFormat

        public T setTimestampFormat​(java.util.List<java.lang.String> timestampFormatList)
        Sets the list timestamp formats used for loading and storing the graph.
        Parameters:
        timestampFormatList - the list of date formats
        Returns:
        this builder
      • setTimeWithTimezoneFormat

        public T setTimeWithTimezoneFormat​(java.util.List<java.lang.String> timeWithTimezoneFormatList)
        Sets the list of time with timezone formats used for loading and storing the graph.
        Parameters:
        timeWithTimezoneFormatList - the list of date formats
        Returns:
        this builder
      • setTimestampWithTimezoneFormat

        public T setTimestampWithTimezoneFormat​(java.util.List<java.lang.String> timestampWithTimezoneFormatList)
        Sets the list of timestamp with timezone formats used for loading and storing the graph.
        Parameters:
        timestampWithTimezoneFormatList - the list of date formats
        Returns:
        this builder
      • setCreateLabelHistogram

        public T setCreateLabelHistogram​(boolean flag)
        Sets the flag to create a label histogram when loading the graph
        Parameters:
        flag - the flag that indicated whether the label histogram should be created when the graph is loaded
        Returns:
        this builder
      • setPartitionDiscardDefaultValues

        public T setPartitionDiscardDefaultValues​(boolean discardDefaultValues)
        Sets the flag to discard properties filled only with default values when partitioning a graph while loading
        Parameters:
        discardDefaultValues - wether or not to discard properties filled with default values
        Returns:
        this builder
      • setFetchIntervalSec

        public T setFetchIntervalSec​(int seconds)
        Sets the refresh interval in seconds. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        seconds - the interval in seconds
        Returns:
        this builder
      • setUpdateIntervalSec

        public T setUpdateIntervalSec​(int seconds)
      • setAutoRefresh

        public T setAutoRefresh​(boolean autoRefresh)
      • setUpdateThreshold

        public T setUpdateThreshold​(int threshold)
      • setLoadingProgressReportingFrequency

        public T setLoadingProgressReportingFrequency​(long frequency)
      • setCreateVertexIdIndex

        public T setCreateVertexIdIndex​(boolean create)
        Sets the create vertex ID index flag. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        create - if true, a vertex ID index is created
        Returns:
        this builder
      • setCreateVertexIdMapping

        public T setCreateVertexIdMapping​(boolean create)
        Sets the create vertex id mapping flag. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        create - if true, a vertex ID mapping is created
        Returns:
        this builder
      • setCreateEdgeIdIndex

        public T setCreateEdgeIdIndex​(boolean create)
        Sets the create edge id index flag. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        create - if true, a edge ID index is created
        Returns:
        this builder
      • setCreateEdgeIdMapping

        public T setCreateEdgeIdMapping​(boolean create)
        Sets the create edge id mapping. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        create - if true, a edge ID mapping is created
        Returns:
        this builder
      • setUpdatePropertiesInPlace

        public T setUpdatePropertiesInPlace​(boolean updatePropertiesInPlace)
        enables in-pplace non-structural updates. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        updatePropertiesInPlace - if true, non-structural updates are applied in-place
        Returns:
        this builder
      • setStrictMode

        public T setStrictMode​(boolean strictMode)
        Sets the strict mode. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        strictMode - if true, strict mode is enabled, otherwise strict mode is disabled
        Returns:
        this builder
      • enableVertexIdDuplicateCheck

        public T enableVertexIdDuplicateCheck​(boolean checkVertexIdDuplicates)
        Sets whether or not vertex ID duplicates should be checked. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        checkVertexIdDuplicates - boolean flag for whether or not to enable the check
        Returns:
        this builder
      • enableEdgeIdDuplicateCheck

        public T enableEdgeIdDuplicateCheck​(boolean checkEdgeIdDuplicates)
        Sets whether or not edge ID duplicates should be checked. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        checkEdgeIdDuplicates - boolean flag for whether or not to enable the check
        Returns:
        this builder
      • setErrorHandlingOnDuplicateEntityId

        public T setErrorHandlingOnDuplicateEntityId​(OnMismatch action)
        Sets the error handling on duplicated entity ID. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setErrorHandlingOnMissedPropKey

        public T setErrorHandlingOnMissedPropKey​(OnMismatch action)
        Sets the error handling on missed prop key. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setErrorHandlingOnPropConversion

        public T setErrorHandlingOnPropConversion​(OnMismatch action)
        Sets the error handling on prop conversion. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setErrorHandlingOnTypeMismatch

        public T setErrorHandlingOnTypeMismatch​(OnMismatch action)
        Sets the error handling on type mismatch. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setErrorHandlingOnMissingVertex

        public T setErrorHandlingOnMissingVertex​(OnMissingVertex action)
        Sets the error handling on a missing vertex. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setErrorHandlingOnVectorLengthMismatch

        public T setErrorHandlingOnVectorLengthMismatch​(OnMismatch action)
        Sets the error handling on vector length mismatch. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setErrorHandlingOnParsingIssue

        public T setErrorHandlingOnParsingIssue​(OnMismatch action)
        Sets the error handling on a parsing issue. See the graph configuration documentation for details about the effects and default of this flag
        Parameters:
        action - the action
        Returns:
        this builder
      • setLoadVertexLabels

        public T setLoadVertexLabels​(boolean flag)
        Sets the vertex label loading. See the graph configuration documentation for details about the effects and default of this flag.
        Parameters:
        flag - sets to load the vertex label if true
        Returns:
        this builder
      • setLoadEdgeLabel

        public T setLoadEdgeLabel​(boolean flag)
        Sets the edge label loading. See the graph configuration documentation for details about the effects and default of this flag.
        Parameters:
        flag - sets to load the edge label if true
        Returns:
        this builder
      • setUseVertexPropertyValueAsLabel

        public T setUseVertexPropertyValueAsLabel​(java.lang.String labelPropertyName)
        Load the given property as vertex label. Currently only available for loading from PG
        Parameters:
        labelPropertyName - the name of the property to load as label
        Returns:
        this builder
      • setPropertyValueDelimiter

        public T setPropertyValueDelimiter​(java.lang.String delimiter)
        (only relevant for 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 labels
        Parameters:
        delimiter - the delimiter to use. If null read the whole property as label
        Returns:
        this builder
      • setLabelValueDelimiter

        public T setLabelValueDelimiter​(java.lang.String delimiter)
        if null read the whole String value as label. Otherwise, split the string using the specified delimiter and use all values as vertex labels
        Parameters:
        delimiter - the delimiter to use. If null read the whole String value as label
        Returns:
        this builder
      • setSkipVertexLoading

        public T setSkipVertexLoading​(boolean flag)
        Sets the skip vertices flag. See the graph configuration documentation for details about the effects and default of this flag.
        Parameters:
        flag - sets to skip the vertices if true
        Returns:
        this builder
      • setSkipEdgeLoading

        public T setSkipEdgeLoading​(boolean flag)
        Sets the skip edges flag. See the graph configuration documentation for details about the effects and default of this flag.
        Parameters:
        flag - sets to skip the edges if true
        Returns:
        this builder
      • setSnapshotsSource

        public T setSnapshotsSource​(SnapshotsSource source)
        Sets the snapshots source field. See the graph configuration documentation for details about the effects and default of this flag.
        Parameters:
        source - the source to set, of type SnapshotsSource
        Returns:
        this builder
      • redactPassword

        public T redactPassword()