public final class DocumentField extends Object implements XMLSerializable, XMLSerializable.OldVersionCompatible, GComboBox.DescriptionProvider
PluginDocument.getDisplayableFields() and the field information is used when
displaying the document in the main Geneious panel (document table) and in constructing advanced search queries.
Documents should create fields by using one of the many static helpers such as createStringField(java.lang.String, java.lang.String, java.lang.String, boolean, boolean), createDateField(java.lang.String, java.lang.String, java.lang.String) etc.
There are various ways to assign field values to a document. One is via a
SequenceAnnotationGenerator.AnnotationGeneratorResult
which allows an annotation generator to assign field values to a document.
If you are not using an annotation generator, and are wanting to set a field value on a document, use
AnnotatedPluginDocument.setFieldValue(DocumentField, Object)
or if you are wanting to provide a field and value from a PluginDocument implementation
use PluginDocument.getDisplayableFields() and PluginDocument.getFieldValue(String)| Modifier and Type | Class and Description |
|---|---|
static class |
DocumentField.SequenceType
Possible values for the
SEQUENCE_TYPE field. |
XMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportType| Modifier and Type | Field and Description |
|---|---|
static DocumentField |
ACCESSION_FIELD
Visible, non-editable field representing a document's accession.
|
static DocumentField |
ALIGNMENT_MATCH_REGIONS_FIELD
The regions in the original sequences that the local alignment matched on
|
static DocumentField |
ALIGNMENT_METHOD_FIELD
The method/algorithm used to build an alignment.
|
static DocumentField |
ALIGNMENT_OPTIONS_FIELD
The options used to create the alignment
|
static DocumentField |
ALIGNMENT_PERCENTAGE_IDENTICAL
The percentage of columns in the alignment for which all sequence are identical.
|
static DocumentField |
ALIGNMENT_SCORE_FIELD
The score of an alignment (the exact meaning of this depends on the particular alignment implementation)
|
static DocumentField |
ALIGNMENT_SIMILARITY
The percentage of pairwise residues that are identical in the alignment, including gap versus non-gap residues, but excluding gap versus gap residues.
|
static DocumentField |
ALL
A DocumentField representing an option to search all fields.
|
static List<DocumentField> |
ALL_STANDARD_FIELDS
A list of all standard DocumentFields defined either in this class or other public API locations that are displayable to the user.
|
static DocumentField |
AMBIGUITIES
The number of untrimmed amibguity bases or residues in a chromatogram.
|
static DocumentField |
BIN
Each chromatogram or alignment is assigned to a "Low", "Medium" or "High" quality bin based on its properties.
|
static DocumentField |
BIN_REASON
Each chromatogram or alignment is assigned to a "Low", "Medium" or "High" quality bin based on its properties.
|
static DocumentField |
BINNING_FRAME
The translation frame and direction which gives the least number of stop codons in the consensus sequence of a contig.
|
static DocumentField |
BINNING_GENETIC_CODE
The genetic code which produces the least number of stop codons in the consensus sequence of a contig.
|
static DocumentField |
COLOR
The color of a document in the document table.
|
static DocumentField |
COMMON_NAME_FIELD
Visible, editable field representing the common name for the organism of a sequence.
|
static DocumentField |
CONSENSUS_SEQUENCE_LENGTH
The approximate length of the consensus sequence in a contig.
|
static DocumentField |
CONSENSUS_SOURCE_SEQUENCES_FIELD
The number of sequences in the contig that a consensus sequence was generated from
|
static DocumentField |
CONTIG_MEAN_COVERAGE
Mean number of sequences covering a column in an assembly
All
SequenceAlignmentDocuments created in 7.0 or later (or just small ones created prior to 7.0) with
SequenceAlignmentDocument.isContig()==true have this field |
static DocumentField |
CONTIG_PERCENTAGE_OF_REFERENCE_SEQUENCE_COVERED
The percentage of the reference sequence in a contig that is covered by one or more reads.
|
static DocumentField |
CONTIG_REFERENCE_SEQUENCE_INDEX
The index of the reference sequence in an alignment contig or -1 if there is no reference sequence.
|
static DocumentField |
CONTIG_REFERENCE_SEQUENCE_LENGTH
The length of the reference sequence (if any) in an alignment or contig.
|
static DocumentField |
CREATED_FIELD
Non-visible, editable field representing a document's creation date.
|
static DocumentField |
DELETED_DOCUMENT_ORIGINAL_LOCATION_FIELD
The folder from which a deleted document originally came from
|
static DocumentField |
DESCRIPTION_FIELD
Visible, editable field representing a document's description.
|
static DocumentField |
DISAGREEMENTS
The number of alignment columns with a disagreement between two or more sequences (including internal gap vs non-gap)
All small
SequenceAlignmentDocuments have this field. |
static DocumentField |
FIRST_SEQUENCE_RESIDUES
The first few residues or bases in a sequence.
|
static DocumentField |
GC_PERCENT
The GC percentage of a nucleotide sequence, contig, or alignment.
|
static DocumentField |
GENETIC_CODE_FIELD
Visible, editable field representing a sequence's genetic code.
|
static DocumentField |
HAS_ANY_READS_MAPPED_TO_MULTIPLE_LOCATIONS
SequenceAlignmentDocuments may have this field to indicate whether or not any reads in it
are mapped to multiple locations. |
static DocumentField |
HIGH_QUALITY_PERCENT
The percentage of untrimmed bases in a chromatogram that are high quality.
|
static DocumentField |
INDEL_DISAGREEMENTS
The number of alignment columns with a disagreement between two or more sequences and at least one is a gap
All small
SequenceAlignmentDocuments have this field. |
static DocumentField |
IS_FREE_END_GAPS
Whether this alignment has free end gaps.
|
static DocumentField |
LOW_QUALITY_PERCENT
The percentage of untrimmed bases in a chromatogram that are low quality.
|
static DocumentField |
MAPPING_QUALITY
SequenceDocuments in a contig may have this field to indicate the confidence that this read is mapped to the correct location. |
static DocumentField |
MAXIMUM_SEQUENCE_LENGTH
SequenceListDocuments may have this field which indicates the maximum length of all the sequences in the document.
|
static DocumentField |
MEDIMUM_QUALITY_PERCENT
The percentage of untrimmed bases in a chromatogram that are medium quality.
|
static DocumentField |
MINIMUM_SEQUENCE_LENGTH
SequenceListDocuments may have this field which indicates the minimum length of all the sequences in the document.
|
static DocumentField |
MOLECULE_TYPE_FIELD
Visible, editable field representing the molecule type of a sequence (eg, mRNA or AA)
Use this field in all documents which should have a displayable molecule type value.
|
static DocumentField |
NAME_FIELD
Visible, editable field representing a document's name
All documents have this field.
|
static DocumentField |
NOTES
Free text entered by the user
|
static DocumentField |
NUCLEOTIDE_SEQUENCE_COUNT
The number of nucleotide sequences in an alignment or set of sequences.
|
static DocumentField |
NUCLEOTIDE_SEQUENCES_WITH_MATES_COUNT
The number of nucleotide sequences in an alignment or set of sequences that have mates (i.e.
|
static DocumentField |
NUCLEOTIDE_SEQUENCES_WITH_QUALITY_COUNT
The number of nucleotide sequences in an alignment or set of sequences that have quality data (i.e.
|
static DocumentField |
NUCLEOTIDES_COUNT
SequenceListDocuments may have this field which indicates the total number of nucleotides in all sequences in the document
|
static DocumentField |
NUMBER_OF_MAPPED_LOCATIONS
SequenceDocuments may have this field to indicate the number of places the read maps to the reference sequence(s). |
static DocumentField |
NUMBER_OF_STOP_CODONS
The minimum number of stop codons for this sequence (for a single frame, across all frames)
|
static DocumentField |
ORGANISM_FIELD
Visible, editable field representing a document's organism
Use this field in all documents which should have a displayable organism value.
|
static DocumentField |
POST_TRIM_LENGTH
The length of a chromatogram after trimming.
|
static DocumentField |
PROTEIN_SEQUENCE_COUNT
The number of amino acid sequences in an alignment or set of sequences.
|
static DocumentField |
REFERENCE_SEQUENCE_NAME
The name of the reference sequence (if any) in an alignment or contig.
|
static DocumentField |
SEQUENCE_COUNT
The number of sequences in an alignment or set of sequences.
|
static DocumentField |
SEQUENCE_DIRECTION
Deprecated.
no longer used by binning, replaced by
BINNING_FRAME |
static DocumentField |
SEQUENCE_LENGTH
The number of residues or bases in a sequence or the length of an alignment.
|
static DocumentField |
SEQUENCE_LIST_ORDERING_REVISION_NUMBER
A cache of the value returned from
EditableSequenceListDocument.getOrderingRevisionNumber()
All EditableSequenceListDocuments created in Geneious 6.0.5 or later have this field. |
static DocumentField |
SEQUENCE_TYPE
Allows marking of special types of sequence like vectors and references.
|
static DocumentField |
TAXONOMY_FIELD
Visible, editable field representing a sequence's taxonomy.
|
static DocumentField |
TOPOLOGY_FIELD
Visible, editable field representing the topology of a sequence - either
"linear" or "circular"
Always displayed for sequence document (handled by core). |
static DocumentField |
TREE_BUILDER_METHOD_FIELD
The method/algorithm used to build a tree.
|
static DocumentField |
TRIMMED_SEQUENCES_COUNT
The number of sequences in an alignment or set of sequences that have trim annotations or are
ImmutableSequences with either ImmutableSequence.getLeadingTrimLength() or ImmutableSequence.getTrailingTrimLength() greater than 0. |
static DocumentField |
UNREAD_FIELD
Visible, non-editable field representing whether a document is unread.
|
static DocumentField |
URN_FIELD
Visible, non-editable field containing the
AnnotatedPluginDocument
URN as a String. |
ROOT_ELEMENT_NAME| Constructor and Description |
|---|
DocumentField()
Empty constructor used only during XML serialisation.
|
DocumentField(String name,
String description,
String code,
Class type,
boolean defaultVisible,
boolean editable)
Constructs and initialises a DocumentField.
|
| Modifier and Type | Method and Description |
|---|---|
static DocumentField |
createBooleanField(String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with a Boolean value.
|
static DocumentField |
createCustomField(String name,
String desc,
String code,
Class<? extends XMLSerializable> valueType)
Creates a DocumentField with a value of arbitrary type.
|
static DocumentField |
createCustomField(String name,
String desc,
String code,
Class<? extends XMLSerializable> valueType,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with a value of arbitrary type.
|
static DocumentField |
createDateField(String name,
String desc,
String code)
Creates a DocumentField with a Date value.
|
static DocumentField |
createDateField(String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with a Date value.
|
static DocumentField |
createDoubleField(String name,
String desc,
String code)
Creates a DocumentField with a Double value.
|
static DocumentField |
createDoubleField(String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with a Double value.
|
static DocumentField |
createEnumeratedField(String[] enumerationValues,
String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with an enumerated set of possible String values.
|
static DocumentField |
createIntegerField(String name,
String desc,
String code)
Creates a DocumentField with an Integer value.
|
static DocumentField |
createIntegerField(String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with an Integer value.
|
static DocumentField |
createLongField(String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with a Long value.
|
static DocumentField |
createStringField(String name,
String desc,
String code)
Creates a DocumentField with a String value.
|
static DocumentField |
createStringField(String name,
String desc,
String code,
boolean defaultVisible,
boolean editable)
Creates a DocumentField with a String value, that may or may not be
visible and may or may not be editable.
|
static DocumentField |
createURLField(String name,
String desc,
String code)
Creates a DocumentField with a URL value.
|
boolean |
equals(Object o) |
void |
fromXML(org.jdom.Element element)
Restore the object from the JDOM Element returned by
XMLSerializable.toXML(). |
String |
getCode()
An internal code unique on each document used for identifying this field.
|
String |
getDescription()
Returns a one line description of this field.
|
String[] |
getEnumerationValues()
The set of possible values for the field.
|
String |
getName()
A nicely formatted one/two words in a human readable form.
|
boolean |
getReverseSort()
|
static DocumentField |
getStandardDisplayableField(String fieldCode)
If fieldCode is for one of the standard fields listed in
ALL_STANDARD_FIELDS, then returns that field |
Class |
getValueType()
Returns the class of the value which this field represents.
|
Geneious.MajorVersion |
getVersionSupport(XMLSerializable.VersionSupportType versionType)
Gets either the latest version this class can serialize to via
XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed. |
int |
hashCode() |
boolean |
isDefaultVisible()
Returns true if this field is visible in the document table by default.
|
boolean |
isEditable()
Returns true if the user is able to edit the value of this field.
There is a subtle distinction between this and #isNeverEditable(), which determines if a field was generated automatically
and hence is never editable.
|
boolean |
isEnumeratedField()
Returns true if this field is enumerated, that is it can only have a
value from a predifined set of values.
|
boolean |
isNeverEditable()
returns true if the field should never be editable, because it is one of the standard fields for which the value is auto-generated.
|
void |
setEnumerationValues(String[] enumerationValues)
Sets the enumeration values.
|
void |
setReverseSort(boolean reverseSort)
|
String |
toString() |
org.jdom.Element |
toXML()
Convert object to a JDOM element.
|
org.jdom.Element |
toXML(Geneious.MajorVersion majorVersion,
ProgressListener progressListener)
Serializes this class to XML format, potentially to a format readable by an earlier version of Geneious.
|
public static final DocumentField ALL
public static final DocumentField ACCESSION_FIELD
public static final DocumentField TAXONOMY_FIELD
public static final DocumentField GENETIC_CODE_FIELD
GeneticCode.getDescription()public static final DocumentField MOLECULE_TYPE_FIELD
public static final DocumentField COMMON_NAME_FIELD
public static final DocumentField ORGANISM_FIELD
public static final DocumentField TOPOLOGY_FIELD
"linear" or "circular"
Always displayed for sequence document (handled by core).public static final DocumentField NAME_FIELD
public static final DocumentField DESCRIPTION_FIELD
public static final DocumentField CREATED_FIELD
public static final DocumentField URN_FIELD
AnnotatedPluginDocument
URN as a String. All annotated plugin documents have this field.AnnotatedPluginDocument.getURN()public static final DocumentField UNREAD_FIELD
public static final DocumentField POST_TRIM_LENGTH
NucleotideGraphSequenceDocuments have this field.public static final DocumentField AMBIGUITIES
NucleotideGraphSequenceDocuments have this field.public static final DocumentField HIGH_QUALITY_PERCENT
NucleotideGraphSequenceDocuments have this field. Some contigs have this field.public static final DocumentField MEDIMUM_QUALITY_PERCENT
NucleotideGraphSequenceDocuments have this field.public static final DocumentField LOW_QUALITY_PERCENT
NucleotideGraphSequenceDocuments have this field. Some contigs have this field.public static final DocumentField BIN
NucleotideGraphSequenceDocuments and
all SequenceAlignmentDocuments have this field.public static final DocumentField BIN_REASON
#BIN}public static final DocumentField SEQUENCE_LENGTH
SequenceDocuments and SequenceAlignmentDocuments have this field
(except for SequenceAlignmentDocuments containing a single sequence, which were wrongly allowed prior to Geneious 8.0.3)public static final DocumentField FIRST_SEQUENCE_RESIDUES
SequenceDocuments have this field.public static final DocumentField SEQUENCE_COUNT
SequenceAlignmentDocuments
and SequenceListDocuments have this field.public static final DocumentField ALIGNMENT_SIMILARITY
SequenceAlignmentDocuments have this field.public static final DocumentField ALIGNMENT_PERCENTAGE_IDENTICAL
SequenceAlignmentDocuments have this field.public static final DocumentField NUCLEOTIDE_SEQUENCE_COUNT
SequenceAlignmentDocuments
and SequenceListDocuments have this field.SEQUENCE_COUNT,
PROTEIN_SEQUENCE_COUNTpublic static final DocumentField NUCLEOTIDE_SEQUENCES_WITH_QUALITY_COUNT
NucleotideGraph.hasSequenceQualities()
All SequenceAlignmentDocuments
and SequenceListDocuments created in Geneious 5.1 and later have this field
and SequenceDocuments created in Geneious 7.0 and later have this field.NUCLEOTIDE_SEQUENCE_COUNTpublic static final DocumentField NUCLEOTIDE_SEQUENCES_WITH_MATES_COUNT
PairedReads.getMateIndex(int)
All SequenceAlignmentDocuments
and SequenceListDocuments created in Geneious 5.1 and later have this field.NUCLEOTIDE_SEQUENCE_COUNTpublic static final DocumentField TRIMMED_SEQUENCES_COUNT
ImmutableSequences with either ImmutableSequence.getLeadingTrimLength() or ImmutableSequence.getTrailingTrimLength() greater than 0.
All SequenceAlignmentDocuments
and SequenceListDocuments create in Geneious 5.1.1 and later have this field
and SequenceDocuments created in Geneious 7.0 and later have this field.public static final DocumentField PROTEIN_SEQUENCE_COUNT
SequenceAlignmentDocuments
and SequenceListDocuments have this field.SEQUENCE_COUNT,
NUCLEOTIDE_SEQUENCE_COUNTpublic static final DocumentField MINIMUM_SEQUENCE_LENGTH
public static final DocumentField MAXIMUM_SEQUENCE_LENGTH
public static final DocumentField NUCLEOTIDES_COUNT
public static final DocumentField IS_FREE_END_GAPS
SequenceAlignmentDocument.isFreeEndGapAlignment()
All SequenceAlignmentDocuments created in Geneious 5.4 or later have this field.public static final DocumentField CONTIG_REFERENCE_SEQUENCE_INDEX
SequenceAlignmentDocument.getContigReferenceSequenceIndex()
All SequenceAlignmentDocuments created in Geneious 5.1 or later have this field.public static final DocumentField SEQUENCE_LIST_ORDERING_REVISION_NUMBER
EditableSequenceListDocument.getOrderingRevisionNumber()
All EditableSequenceListDocuments created in Geneious 6.0.5 or later have this field.public static final DocumentField CONTIG_REFERENCE_SEQUENCE_LENGTH
SequenceAlignmentDocuments
with SequenceAlignmentDocument.getContigReferenceSequenceIndex()>=0 have this field.public static final DocumentField REFERENCE_SEQUENCE_NAME
SequenceAlignmentDocuments) created in Geneious 5.5 and later
with SequenceAlignmentDocument.getContigReferenceSequenceIndex()>=0 have this field.public static final DocumentField CONSENSUS_SEQUENCE_LENGTH
SequenceAlignmentDocuments with
SequenceAlignmentDocument.isContig()==true
and SequenceAlignmentDocument.getContigReferenceSequenceIndex()>=0 have this field.public static final DocumentField CONTIG_PERCENTAGE_OF_REFERENCE_SEQUENCE_COVERED
SequenceAlignmentDocuments created in 7.0 or later (or just small ones created prior to 7.0) with
SequenceAlignmentDocument.isContig()==true
and SequenceAlignmentDocument.getContigReferenceSequenceIndex()>=0 have this field.public static final DocumentField CONTIG_MEAN_COVERAGE
SequenceAlignmentDocuments created in 7.0 or later (or just small ones created prior to 7.0) with
SequenceAlignmentDocument.isContig()==true have this fieldpublic static final DocumentField GC_PERCENT
public static final DocumentField DISAGREEMENTS
SequenceAlignmentDocuments have this field.public static final DocumentField INDEL_DISAGREEMENTS
SequenceAlignmentDocuments have this field.public static final DocumentField NUMBER_OF_STOP_CODONS
@Deprecated public static final DocumentField SEQUENCE_DIRECTION
BINNING_FRAMEpublic static final DocumentField BINNING_GENETIC_CODE
public static final DocumentField BINNING_FRAME
public static final DocumentField NUMBER_OF_MAPPED_LOCATIONS
SequenceDocuments may have this field to indicate the number of places the read maps to the reference sequence(s).
For reads that map just once, this field may be null. For reads that map to multiple locations, there will be multiple copies of the read in the contigHAS_ANY_READS_MAPPED_TO_MULTIPLE_LOCATIONSpublic static final DocumentField MAPPING_QUALITY
SequenceDocuments in a contig may have this field to indicate the confidence that this read is mapped to the correct location.
This value Q will be between 0 and 254 inclusive, where the probability of the mapping being incorrect is 10^(-Q/10)public static final DocumentField HAS_ANY_READS_MAPPED_TO_MULTIPLE_LOCATIONS
SequenceAlignmentDocuments may have this field to indicate whether or not any reads in it
are mapped to multiple locations. i.e. at least one sequence in the alignment has a value of NUMBER_OF_MAPPED_LOCATIONS greater than 1.
This field will be present on all alignments created in 6.0 or later, with a value of Boolean.TRUE or Boolean.FALSE.NUMBER_OF_MAPPED_LOCATIONSpublic static final DocumentField COLOR
""+Color.getRGB() or html style like #00FF99.public static final DocumentField NOTES
public static final DocumentField SEQUENCE_TYPE
public static final DocumentField CONSENSUS_SOURCE_SEQUENCES_FIELD
public static final DocumentField ALIGNMENT_SCORE_FIELD
public static final DocumentField ALIGNMENT_MATCH_REGIONS_FIELD
public static final DocumentField ALIGNMENT_OPTIONS_FIELD
public static final DocumentField DELETED_DOCUMENT_ORIGINAL_LOCATION_FIELD
public static final DocumentField ALIGNMENT_METHOD_FIELD
public static final DocumentField TREE_BUILDER_METHOD_FIELD
public static final List<DocumentField> ALL_STANDARD_FIELDS
DocumentUtilities.getAllDisplayableFields()public DocumentField()
fromXML(org.jdom.Element).public DocumentField(String name, String description, String code, Class type, boolean defaultVisible, boolean editable)
name - A 1-2 word human readable name for this field that will be displayed as this
field's column heading in the document table.description - A one line human readable description that will be displayed as this
field's tooltip in the document table.code - the code for this field. Because AnnotatedPluginDocument.getFieldValue(String)
returns a field by code, this String must be unique for all fields within the same document.
As at 2008-01-09 the code also must only contain characters that are legal in XML element names
(e.g. it can't contain spaces), but this constraint may be removed in a future release.type - the class of the field value objectdefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic Geneious.MajorVersion getVersionSupport(XMLSerializable.VersionSupportType versionType)
XMLSerializable.OldVersionCompatibleXMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed.getVersionSupport in interface XMLSerializable.OldVersionCompatibleversionType - specifies which version property to returnpublic org.jdom.Element toXML()
XMLSerializableXMLSerializable.fromXML(org.jdom.Element) can completely
restore the objects representation.
It is recommended that the returned element use XMLSerializable.ROOT_ELEMENT_NAME as its name,
in which case it must not define an attribute called "type". In this case,
fromXML, will be called with an element whose name may differ from the element
return from this function. This recommendation allows a more compact representation
of the XML can be stored.
This method generally should not be called directly. Instead, you should usually call
XMLSerializer.classToXML(String, XMLSerializable)
which calls this method internally.
PluginDocument implementations of this method may choose to throw an XMLSerializationException,
enclosed in a RuntimeException.toXML in interface XMLSerializablepublic org.jdom.Element toXML(Geneious.MajorVersion majorVersion, ProgressListener progressListener)
XMLSerializable.OldVersionCompatibleXMLSerializable.toXML() for a more
detailed description of what it means to serialize to XML.
All classes that implement this method must also implement XMLSerializable.toXML() and should delegate back to
this method using Geneious.getMajorVersion() and ProgressListener.EMPTY as parameters.toXML in interface XMLSerializable.OldVersionCompatiblemajorVersion - the major version of Geneious to serialize to XML for. For example "6.0" but not "6.0.0". This must be a version
returned greater or equal to a version returned from
getVersionSupport(VersionSupportType.OldestVersionSerializableTo)
and must never be greater than the current version (Geneious.getMajorVersion())progressListener - for reporting progress and cancellingpublic void fromXML(org.jdom.Element element)
throws XMLSerializationException
XMLSerializableXMLSerializable.toXML().
This method generally should not be called directly. Instead, you should usually call
XMLSerializer.classFromXML(org.jdom.Element)
or XMLSerializer.classFromXML(org.jdom.Element, Class)
which calls this method internally.
It is optional to implement this method. Instead of implementing an empty constructor and implementing
this method properly, the implementation may instead
throw an UnsupportedOperationException and implement a constructor
that takes a single Element as a parameter.
This allows for cleaner code such as support for final fields in the XMLSerializable class.
The element parameter should not be modified since it may be reused. If you need a modified version of it,
take a copy with Element.clone().fromXML in interface XMLSerializableelement - representation from a previous call to XMLSerializable.toXML()XMLSerializationException - if the Element can't be converted into this type of objectpublic boolean getReverseSort()
public void setReverseSort(boolean reverseSort)
reverseSort - whether to sort in reverse orderpublic String getDescription()
getDescription in interface GComboBox.DescriptionProvidergetName()public boolean isDefaultVisible()
public boolean isEditable()
isNeverEditable()public boolean isNeverEditable()
isEditable(), which determines if the user can edit the field. There are some fields which we do allow the user
to edit even though isEditable() is false, although we show them a warning. By contrast, fields for which this returns false are never editable under
any circumstances.isEditable()public String[] getEnumerationValues()
isEnumeratedField()public boolean isEnumeratedField()
getEnumerationValues()public Class getValueType()
public void setEnumerationValues(String[] enumerationValues)
enumerationValues - the enumeration valuespublic static DocumentField createStringField(String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fielddefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic static DocumentField createStringField(String name, String desc, String code)
name - the field namedesc - the field descriptioncode - the code for this fieldpublic static DocumentField createURLField(String name, String desc, String code)
name - the field namedesc - the field descriptioncode - the code for this fieldpublic static DocumentField createIntegerField(String name, String desc, String code)
name - the field namedesc - the field descriptioncode - the code for this fieldpublic static DocumentField createLongField(String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fieldpublic static DocumentField createIntegerField(String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fielddefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic static DocumentField createDoubleField(String name, String desc, String code)
name - the field namedesc - the field descriptioncode - the code for this fieldpublic static DocumentField createDoubleField(String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fielddefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic static DocumentField createCustomField(String name, String desc, String code, Class<? extends XMLSerializable> valueType)
name - the field namedesc - the field descriptioncode - the code for this fieldvalueType - the class of the value object this DocumentField containspublic static DocumentField createCustomField(String name, String desc, String code, Class<? extends XMLSerializable> valueType, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fieldvalueType - the class of the value object this DocumentField containsdefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic static DocumentField createDateField(String name, String desc, String code)
name - the field namedesc - the field descriptioncode - the code for this fieldpublic static DocumentField createDateField(String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fielddefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic static DocumentField createBooleanField(String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fielddefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldpublic static DocumentField createEnumeratedField(String[] enumerationValues, String name, String desc, String code, boolean defaultVisible, boolean editable)
name - the field namedesc - the field descriptioncode - the code for this fielddefaultVisible - whether this field should be visibleeditable - whether the user can edit this fieldenumerationValues - the possible values of this enumarated fieldpublic String getCode()
getName() is displayed to the user.
Should not contain space characters.public String getName()
getDescription()public static DocumentField getStandardDisplayableField(String fieldCode)
ALL_STANDARD_FIELDS, then returns that fieldfieldCode - the code of the field