phenote.datamodel
Enum CharFieldEnum
java.lang.Object
java.lang.Enum<CharFieldEnum>
phenote.datamodel.CharFieldEnum
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<CharFieldEnum>
public enum CharFieldEnum
- extends java.lang.Enum<CharFieldEnum>
so this class has evolved - this was actually doing the setting of field values at one
point - but now that we've gone to a generic datamodel, the datamodel is now determined
by the configuration - and not restricted to CharFieldEnums - you can have a field that is
not in CharFieldEnum - which leads to the question should we get rid of this class?
and the answer at the moment is maybe not - as you can still use this in data adapters
to get at predefined strings for definied fields - to make sure data adapters are using
the same string for the pub of entity field. which is what enums are right? the
queryable data adapter can use these strings from enum to specify the fields it allows
for querying - so for now i guess CharFieldEnum lives on in a much more limited fashion
the setValue & getValue need to be taken out - no longer used - ya just have to
hope that the strings here are the same ones in config - is there some way to enforce
or check this - i dont think there is
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PUB
public static final CharFieldEnum PUB
GENOTYPE
public static final CharFieldEnum GENOTYPE
ALLELE
public static final CharFieldEnum ALLELE
GENETIC_CONTEXT
public static final CharFieldEnum GENETIC_CONTEXT
ENTITY
public static final CharFieldEnum ENTITY
ENTITY2
public static final CharFieldEnum ENTITY2
QUALITY
public static final CharFieldEnum QUALITY
DATE_CREATED
public static final CharFieldEnum DATE_CREATED
ASSIGNED_BY
public static final CharFieldEnum ASSIGNED_BY
EVIDENCE
public static final CharFieldEnum EVIDENCE
RELATIONSHIP
public static final CharFieldEnum RELATIONSHIP
- Its questionable if relationship belongs here ???
values
public static final CharFieldEnum[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(CharFieldEnum c : CharFieldEnum.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static CharFieldEnum valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Enum<CharFieldEnum>
getName
public java.lang.String getName()
getTag
public java.lang.String getTag()
getType
public phenote.config.xml.FieldDocument.Field.Type.Enum getType()
equals
public boolean equals(java.lang.String s)
equals
public boolean equals(CharField cf)
getCharFieldEnum
public static CharFieldEnum getCharFieldEnum(java.lang.String fieldString)
throws java.lang.Exception
- Throws:
java.lang.Exception