Package org.pathvisio.libgpml.model.type
Class DataNodeType
java.lang.Object
org.pathvisio.libgpml.model.type.DataNodeType
public class DataNodeType
extends java.lang.Object
This class contains extensible enum for DataNode type property.
- Author:
- unknown, finterly
-
Field Summary
Fields Modifier and Type Field Description static DataNodeType
ALIAS
static DataNodeType
CELL_NODE
static DataNodeType
COMPLEX
static DataNodeType
DISEASE
static DataNodeType
DNA
static DataNodeType
EVENT
static DataNodeType
GENEPRODUCT
static DataNodeType
METABOLITE
private java.lang.String
name
private static java.util.Map<java.lang.String,DataNodeType>
nameToDataNodeType
static DataNodeType
ORGAN
static DataNodeType
PATHWAY
static DataNodeType
PHENOTYPE
static DataNodeType
PROTEIN
static DataNodeType
RNA
static DataNodeType
UNDEFINED
-
Constructor Summary
Constructors Modifier Constructor Description private
DataNodeType(java.lang.String name)
The constructor is private. -
Method Summary
Modifier and Type Method Description static DataNodeType
fromName(java.lang.String name)
Returns the DataNodeType from given string name.java.lang.String
getName()
Returns the name key for this DataNodeType.static java.lang.String[]
getNames()
Returns the names of all registered DataNodeTypes as a String array.static DataNodeType[]
getValues()
Returns the data node type values of all DataNodeTypes as a list.static DataNodeType
register(java.lang.String name)
Returns a DataNodeType from a given string identifier name.java.lang.String
toString()
Returns a string representation of this DataNodeType.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
nameToDataNodeType
-
UNDEFINED
-
GENEPRODUCT
-
METABOLITE
-
PROTEIN
-
DNA
-
RNA
-
COMPLEX
-
PATHWAY
-
DISEASE
-
PHENOTYPE
-
ALIAS
-
EVENT
-
CELL_NODE
-
ORGAN
-
name
private java.lang.String name
-
-
Constructor Details
-
DataNodeType
private DataNodeType(java.lang.String name)The constructor is private. DataNodeType cannot be directly instantiated. Use create() method to instantiate DataNodeType.- Parameters:
name
- the string identifier of this DataNodeType.- Throws:
java.lang.NullPointerException
- if name is null.
-
-
Method Details
-
register
Returns a DataNodeType from a given string identifier name. If the DataNodeType 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 DataNodeType for given name. If name does not exist, creates and returns a new DataNodeType.
-
getName
public java.lang.String getName()Returns the name key for this DataNodeType.- Returns:
- name the key for this DataNodeType.
-
fromName
Returns the DataNodeType from given string name.- Parameters:
name
- the string.- Returns:
- the DataNodeType with given string name.
-
getNames
public static java.lang.String[] getNames()Returns the names of all registered DataNodeTypes as a String array.- Returns:
- names the names of all registered DataNodeTypes in order of insertion.
-
getValues
Returns the data node type values of all DataNodeTypes as a list.- Returns:
- dataNodeTypes the list of all registered DataNodeTypes.
-
toString
public java.lang.String toString()Returns a string representation of this DataNodeType.- Overrides:
toString
in classjava.lang.Object
- Returns:
- name the identifier of this DataNodeType.
-