public final class DocumentType<T> extends Object
PluginDocument classes.
You can use either one of the static instances:
Or DocumentTypes may be generated a plugin
via GeneiousPlugin.getDocumentTypes()| Modifier and Type | Field and Description |
|---|---|
static DocumentType<SequenceAlignmentDocument> |
ALIGNMENT_TYPE
SequenceAlignmentDocument document type
|
static DocumentType<AminoAcidSequenceDocument> |
AMINO_ACID_SEQUENCE_TYPE
AminoAcidSequenceDocument document type
|
static DocumentType<JournalArticleDocument> |
ARTICLE_TYPE
JournalArticleDocument document type
|
Class<T> |
classOfDocument
Java class of document.
|
static DocumentType<SequenceAlignmentDocument> |
CONTIG_TYPE
Contig document type
|
static DocumentField |
DOCUMENT_TYPE_FIELD
A field used for searching databases based on the document type.
|
Icons |
documentIcon
An icon associated with documents of that type.
|
String |
humanReadableName
Human readable name of document type.
|
static DocumentType<MolecularStructureDocument> |
MOLECULAR_STRUCTURE_TYPE
MolecularStructureDocument document type
|
static DocumentType<?> |
NUCLEOTIDE_SEQUENCE_LIST_TYPE
Nucleotide Sequence List document type
|
static DocumentType<NucleotideSequenceDocument> |
NUCLEOTIDE_SEQUENCE_TYPE
NucleotideSequenceDocument document type
|
static DocumentType<OligoSequenceDocument> |
OLIGO_DOC_TYPE
Primer/Oligo sequence document type
|
static String |
OVERRIDE_DOCUMENT_TYPE_KEY
A
PluginDocument may return
a value from PluginDocument.getFieldValue(String)
with this fieldCodeName to change the class used to get the document type of the document. |
Class |
overrideClass
an alternative class that can be set on a document using
OVERRIDE_DOCUMENT_TYPE_KEY to change its icon etc. |
static DocumentType<?> |
PROTEIN_SEQUENCE_LIST_TYPE
Protein Sequence List document type
|
static DocumentType<PublicationDocument> |
PUBLICATION_TYPE
PublicationDocument document type
|
static DocumentType<SequenceListDocument> |
SEQUENCE_LIST_TYPE
Sequence list document type which matches either nucleotide or protein sequence lists.
|
static DocumentType<CombinedAlignmentAndAminoAcidSequenceDocument> |
SEQUENCE_SEARCH_AMINO_ACID_HIT
CombinedAlignmentAndAminoAcidSequenceDocument document type
|
static DocumentType<CombinedAlignmentAndNucleotideSequenceDocument> |
SEQUENCE_SEARCH_NUCLEOTIDE_HIT
CombinedAlignmentAndNucleotideSequenceDocument document type
|
static DocumentType<SequenceDocument> |
SEQUENCE_TYPE
SequenceDocument document type
|
static DocumentType<TaxonomyDocument> |
TAXONOMY_TYPE
TaxonomyDocument document type
|
static DocumentType<TreeDocument> |
TREE_TYPE
TreeDocument document type
|
| Constructor and Description |
|---|
DocumentType(String name,
Class<T> classOfDocument,
Class overrideClass,
Icons icon) |
DocumentType(String name,
Class<T> classOfDocument,
Icons icon)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
static boolean |
isAlignment(AnnotatedPluginDocument annotatedPluginDocument) |
static boolean |
isAlignment(PluginDocument document) |
static boolean |
isAlignmentAndNotSequence(AnnotatedPluginDocument document) |
static boolean |
isAlignmentAndNotSequence(PluginDocument document) |
static boolean |
isAminoAcidSequence(AnnotatedPluginDocument annotatedPluginDocument) |
static boolean |
isAminoAcidSequence(PluginDocument document) |
static boolean |
isNucleotideSequence(AnnotatedPluginDocument annotatedPluginDocument) |
static boolean |
isNucleotideSequence(PluginDocument document) |
static boolean |
isSequence(AnnotatedPluginDocument annotatedPluginDocument) |
static boolean |
isSequence(PluginDocument document) |
static boolean |
isSequenceList(AnnotatedPluginDocument annotatedPluginDocument) |
static boolean |
isSequenceList(PluginDocument document) |
boolean |
matches(AnnotatedPluginDocument document)
Checks if the given document matches this DocumentType
|
static boolean |
matches(Set<DocumentType> documentTypes,
AnnotatedPluginDocument document)
Returns true if the given document is at least one of the given document types.
|
String |
toString() |
public static DocumentType<OligoSequenceDocument> OLIGO_DOC_TYPE
public static final DocumentType<MolecularStructureDocument> MOLECULAR_STRUCTURE_TYPE
public static final DocumentType<SequenceDocument> SEQUENCE_TYPE
public static final DocumentType<NucleotideSequenceDocument> NUCLEOTIDE_SEQUENCE_TYPE
public static final DocumentType<AminoAcidSequenceDocument> AMINO_ACID_SEQUENCE_TYPE
public static final DocumentType<SequenceAlignmentDocument> ALIGNMENT_TYPE
public static final DocumentType<TaxonomyDocument> TAXONOMY_TYPE
public static final DocumentType<JournalArticleDocument> ARTICLE_TYPE
public static final DocumentType<PublicationDocument> PUBLICATION_TYPE
public static final DocumentType<TreeDocument> TREE_TYPE
public static final DocumentType<SequenceListDocument> SEQUENCE_LIST_TYPE
PROTEIN_SEQUENCE_LIST_TYPE and NUCLEOTIDE_SEQUENCE_LIST_TYPE takes precedence over this.PROTEIN_SEQUENCE_LIST_TYPEpublic static final DocumentType<?> PROTEIN_SEQUENCE_LIST_TYPE
SEQUENCE_LIST_TYPEpublic static final DocumentType<?> NUCLEOTIDE_SEQUENCE_LIST_TYPE
SEQUENCE_LIST_TYPEpublic static final DocumentType<SequenceAlignmentDocument> CONTIG_TYPE
public static final DocumentType<CombinedAlignmentAndNucleotideSequenceDocument> SEQUENCE_SEARCH_NUCLEOTIDE_HIT
public static final DocumentType<CombinedAlignmentAndAminoAcidSequenceDocument> SEQUENCE_SEARCH_AMINO_ACID_HIT
public static final String OVERRIDE_DOCUMENT_TYPE_KEY
PluginDocument may return
a value from PluginDocument.getFieldValue(String)
with this fieldCodeName to change the class used to get the document type of the document.
The value must be the fully qualified class name.
Eg. this can be used to change the icon of a document depending on its contents as opposed
to just its class.public final String humanReadableName
public final Class overrideClass
OVERRIDE_DOCUMENT_TYPE_KEY to change its icon etc.
Doesn't need to be a subclass of PluginDocument. Never null but may be the same as classOfDocument.public final Icons documentIcon
public static final DocumentField DOCUMENT_TYPE_FIELD
public DocumentType(String name, Class<T> classOfDocument, Icons icon)
name - human readable name of document typeclassOfDocument - Java class of document, should extend PluginDocumenticon - icon for documents of that type. May be null.public DocumentType(String name, Class<T> classOfDocument, Class overrideClass, Icons icon)
name - human readable name of document typeclassOfDocument - Java class of document, should extend PluginDocumentoverrideClass - an optional alternative class that can be set on a document using OVERRIDE_DOCUMENT_TYPE_KEY to change its icon etc (may be null). Doesn't need to be a subclass of PluginDocumenticon - icon for documents of that type. May be null.public static boolean isSequenceList(PluginDocument document)
document - the document (may be null in which case this will return false)public static boolean isSequenceList(AnnotatedPluginDocument annotatedPluginDocument)
annotatedPluginDocument - the document (may be null in which case this will return false)public static boolean isSequence(PluginDocument document)
document - the document (may be null in which case this will return false)public static boolean isNucleotideSequence(PluginDocument document)
document - the document (may be null in which case this will return false)public static boolean isAminoAcidSequence(PluginDocument document)
document - the document (may be null in which case this will return false)public static boolean isSequence(AnnotatedPluginDocument annotatedPluginDocument)
annotatedPluginDocument - the document (may be null in which case this will return false)public static boolean isNucleotideSequence(AnnotatedPluginDocument annotatedPluginDocument)
annotatedPluginDocument - the document (may be null in which case this will return false)public static boolean isAminoAcidSequence(AnnotatedPluginDocument annotatedPluginDocument)
annotatedPluginDocument - the document (may be null in which case this will return false)public static boolean isAlignment(PluginDocument document)
document - the document (may be null in which case this will return false)public static boolean isAlignment(AnnotatedPluginDocument annotatedPluginDocument)
annotatedPluginDocument - the document (may be null in which case this will return false)public static boolean isAlignmentAndNotSequence(PluginDocument document)
document - the document (may be null in which case this will return false)CombinedAlignmentAndSequenceDocumentpublic static boolean isAlignmentAndNotSequence(AnnotatedPluginDocument document)
document - the document (may be null in which case this will return false)CombinedAlignmentAndSequenceDocumentpublic boolean matches(AnnotatedPluginDocument document)
document - the document to check if its type is this DocumentTypepublic static boolean matches(Set<DocumentType> documentTypes, AnnotatedPluginDocument document)
documentTypes - the document types to check if this document is at least one ofdocument - the document to check