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.

    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 Also:
    GraphModel
    • Constructor Detail

      • Configuration

        public Configuration()
        Default constructor.
    • Method Detail

      • getNodeIdType

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

        public void setNodeIdType​(Class nodeIdType)
        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

        public void setEdgeIdType​(Class edgeIdType)
        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

        public void setEdgeLabelType​(Class edgeLabelType)
        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

        public void setEdgeWeightType​(Class edgeWeightType)
        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

        public void setTimeRepresentation​(TimeRepresentation timeRepresentation)
        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

        public void setEdgeWeightColumn​(Boolean edgeWeightColumn)
        Sets whether to create an edge weight column.
        Parameters:
        edgeWeightColumn - edge weight column
      • copy

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

        public int hashCode()
        Overrides:
        hashCode in class Object