Class GroupType

java.lang.Object
org.pathvisio.libgpml.model.type.GroupType

public class GroupType
extends java.lang.Object
This class contains extensible enum for Group type property. Groups can have different biological meanings (e.g. protein Complex), and can be rendered in different ways based on that. NB: group type previously named group style.
Author:
unknown, finterly
  • Field Summary

    Fields
    Modifier and Type Field Description
    static GroupType ANALOG  
    static GroupType COMPLEX  
    static GroupType GROUP  
    private java.lang.String name  
    private static java.util.Map<java.lang.String,​GroupType> nameToGroupType  
    static GroupType PARALOG  
    static GroupType PATHWAY  
    static GroupType TRANSPARENT  
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    private GroupType​(java.lang.String name)
    The constructor is private.
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(GroupType groupType)
    Compares string representations of given GroupType lexicographically.
    static GroupType fromName​(java.lang.String name)
    Looks up the ConnectorType corresponding to that name.
    java.lang.String getName()
    Returns the name key for this GroupType.
    static java.lang.String[] getNames()
    Returns the names of all registered GroupTypes as a list.
    static GroupType[] getValues()
    Returns the group type values of all GroupTypes as a list.
    static GroupType register​(java.lang.String name)
    Returns a GroupType from a given string identifier name.
    java.lang.String toString()
    Returns a string representation of this GroupType.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • nameToGroupType

      private static java.util.Map<java.lang.String,​GroupType> nameToGroupType
    • GROUP

      public static final GroupType GROUP
    • TRANSPARENT

      public static final GroupType TRANSPARENT
    • COMPLEX

      public static final GroupType COMPLEX
    • PATHWAY

      public static final GroupType PATHWAY
    • ANALOG

      public static final GroupType ANALOG
    • PARALOG

      public static final GroupType PARALOG
    • name

      private java.lang.String name
  • Constructor Details

    • GroupType

      private GroupType​(java.lang.String name)
      The constructor is private. GroupType cannot be directly instantiated. Use create() method to instantiate GroupType.
      Parameters:
      name - the string key.
  • Method Details

    • register

      public static GroupType register​(java.lang.String name)
      Returns a GroupType from a given string identifier name. If the GroupType doesn't exist yet, it is created to extend the enum. The method makes sure that the same object is not added twice.
      Parameters:
      name - the string key.
      Returns:
      the GroupType for given name. If name does not exist, creates and returns a new GroupType.
    • getName

      public java.lang.String getName()
      Returns the name key for this GroupType.
      Returns:
      name the key for this GroupType.
    • fromName

      public static GroupType fromName​(java.lang.String name)
      Looks up the ConnectorType corresponding to that name.
    • getNames

      public static java.lang.String[] getNames()
      Returns the names of all registered GroupTypes as a list.
      Returns:
      names the names of all registered GroupTypes in order of insertion.
    • getValues

      public static GroupType[] getValues()
      Returns the group type values of all GroupTypes as a list.
      Returns:
      groupTypes the list of all registered GroupTypes.
    • toString

      public java.lang.String toString()
      Returns a string representation of this GroupType.
      Overrides:
      toString in class java.lang.Object
      Returns:
      name the identifier of this GroupType.
    • compareTo

      public int compareTo​(GroupType groupType)
      Compares string representations of given GroupType lexicographically.
      Returns:
      positive number (integer difference of character value) if first string is lexicographically greater than second string, negative number if first string is less than second string lexicographically, and 0 if first string is lexicographically equal to second string.