Class Configuration


  • public class Configuration
    extends Object
    Global configuration set at initialization.

    This class can be passed as a parameter to GraphModel.Factory.newInstance(org.gephi.graph.api.Configuration) to create a GraphModel with custom configuration.

    Create instances by using the builder:

     Configuration config = Configuration.builder().build();
     

    Note that setting configurations after the GraphModel has been created won't have any effect.

    By default, both node and edge id types are String.class and the time representation is TIMESTAMP.

    See the builder documentation for more information on default values.

    See Also:
    GraphModel, Configuration.Builder
    • Constructor Detail

      • Configuration

        @Deprecated
        public Configuration()
        Deprecated.
        Use the builder() method instead.
        Default constructor.
    • Method Detail

      • getNodeIdType

        public Class getNodeIdType()
        Returns the node id type.
        Returns:
        node id type
      • setNodeIdType

        @Deprecated
        public void setNodeIdType​(Class nodeIdType)
        Deprecated.
        Use builder() instead.
        Sets the node id type.

        Only simple types such as primitives, wrappers and String are supported.

        Parameters:
        nodeIdType - node id type
        Throws:
        IllegalArgumentException - if the type isn't supported
      • getEdgeIdType

        public Class getEdgeIdType()
        Returns the edge id type.
        Returns:
        edge id type
      • setEdgeIdType

        @Deprecated
        public void setEdgeIdType​(Class edgeIdType)
        Deprecated.
        Use builder() instead.
        Sets the edge id type.

        Only simple types such as primitives, wrappers and String are supported.

        Parameters:
        edgeIdType - edge id type
        Throws:
        IllegalArgumentException - if the type isn't supported
      • getEdgeLabelType

        public Class getEdgeLabelType()
        Returns the edge label type.
        Returns:
        edge label type
      • setEdgeLabelType

        @Deprecated
        public void setEdgeLabelType​(Class edgeLabelType)
        Deprecated.
        Use builder() instead.
        Sets the edge label type.
        Parameters:
        edgeLabelType - edge label type
        Throws:
        IllegalArgumentException - if the type isn't supported
      • getEdgeWeightType

        public Class getEdgeWeightType()
        Returns the edge weight type.
        Returns:
        edge weight type
      • setEdgeWeightType

        @Deprecated
        public void setEdgeWeightType​(Class edgeWeightType)
        Deprecated.
        Use builder() instead.
        Sets the edge weight type.
        Parameters:
        edgeWeightType - edge weight type
        Throws:
        IllegalArgumentException - if the type isn't supported
      • getTimeRepresentation

        public TimeRepresentation getTimeRepresentation()
        Returns the time representation.
        Returns:
        time representation
      • setTimeRepresentation

        @Deprecated
        public void setTimeRepresentation​(TimeRepresentation timeRepresentation)
        Deprecated.
        Use builder() instead.
        Sets the time representation.
        Parameters:
        timeRepresentation - time representation
      • getEdgeWeightColumn

        public Boolean getEdgeWeightColumn()
        Returns whether an edge weight column is created.
        Returns:
        edge weight column
      • setEdgeWeightColumn

        @Deprecated
        public void setEdgeWeightColumn​(Boolean edgeWeightColumn)
        Deprecated.
        Use builder() instead.
        Sets whether to create an edge weight column.

        Parameters:
        edgeWeightColumn - edge weight column
      • isEnableAutoLocking

        public boolean isEnableAutoLocking()
      • isEnableAutoEdgeTypeRegistration

        public boolean isEnableAutoEdgeTypeRegistration()
      • isEnableIndexNodes

        public boolean isEnableIndexNodes()
      • isEnableIndexEdges

        public boolean isEnableIndexEdges()
      • isEnableIndexTime

        public boolean isEnableIndexTime()
      • isEnableObservers

        public boolean isEnableObservers()
      • isEnableNodeProperties

        public boolean isEnableNodeProperties()
      • isEnableEdgeProperties

        public boolean isEnableEdgeProperties()
      • isEnableSpatialIndex

        public boolean isEnableSpatialIndex()
      • isEnableParallelEdgesSameType

        public boolean isEnableParallelEdgesSameType()
      • copy

        public Configuration copy()
        Copy this configuration.
        Returns:
        a copy of this configuration
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • diffAsString

        public String diffAsString​(Configuration other)
        Returns a string representation of the differences between this configuration and another one.
        Parameters:
        other - the other configuration
        Returns:
        a string representation of the differences