Class DocumentSelectionSignature
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.DocumentSelectionSignature
-
- All Implemented Interfaces:
XMLSerializable
public final class DocumentSelectionSignature extends java.lang.Object implements XMLSerializable
Several plugin components (Viewers, Exporters, Operations, Actions) operate on one (or a set of) Geneious documents. DocumentSelectionSignature specifies which subsets of document types are valid for specific operations/viewers etc. For example an alignment operation may specify it requires 2 or more nucleotide sequences usingDocumentSelectionSignature.forNucleotideSequences(2,Integer.MAX_VALUE)
. Geneious then handles correctly enabled/disabling the operation depending on what is selected and only invoking the operation with a valid selection of documents.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DocumentSelectionSignature.DocumentSelectionSignatureAtom
A signature is a set of Atoms.-
Nested classes/interfaces inherited from interface com.biomatters.geneious.publicapi.documents.XMLSerializable
XMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportType
-
-
Field Summary
-
Fields inherited from interface com.biomatters.geneious.publicapi.documents.XMLSerializable
ROOT_ELEMENT_NAME
-
-
Constructor Summary
Constructors Constructor Description DocumentSelectionSignature(DocumentSelectionSignature.DocumentSelectionSignatureAtom a)
convenience constructor.DocumentSelectionSignature(DocumentSelectionSignature.DocumentSelectionSignatureAtom[] atoms)
construct signature from given atoms.DocumentSelectionSignature(java.lang.Class classOfSelected, int from, int to)
convenience constructor for accepting a single class repeated a certain number of times.DocumentSelectionSignature(org.jdom.Element element)
XML deserialization constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DocumentSelectionSignature
forMatching(java.util.function.Function<java.util.List<? extends AnnotatedPluginDocument>,java.lang.Boolean> customMatcher)
Creates a selection signature with the provided custom matcher.static DocumentSelectionSignature
forNucleotideAlignment(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches a single alignment that contains a specified range of nucleotide sequences.static DocumentSelectionSignature
forNucleotideAlignments(int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches a number of nucleotideSequenceAlignmentDocument
s within the given range.static DocumentSelectionSignature
forNucleotideAndProteinSequences(int minimumNumberOfNucleotideSequences, int maximumNumberOfNucleotideSequences, int minimumNumberOfProteinSequences, int maximumNumberOfProteinSequences, boolean allowSequencesInAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
,SequenceAlignmentDocument
(if allowSequencesInAlignments is true),NucleotideSequenceDocument
andAminoAcidSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range and the total number of protein sequences is also within the range.static DocumentSelectionSignature
forNucleotideSequences(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches any combination ofSequenceListDocument
andNucleotideSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range.static DocumentSelectionSignature
forNucleotideSequences(int minimumNumberOfSequences, int maximumNumberOfSequences, boolean allowSequencesInAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
,SequenceAlignmentDocument
(if allowSequencesInAlignments is true) andNucleotideSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range, and there are no protein sequences.static DocumentSelectionSignature
forNucleotideSequencesAndAlignments(int minimumNumberOfSequences, int maximumNumberOfSequences, int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
, andNucleotideSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range, and there are no protein sequences.static DocumentSelectionSignature
forProteinAlignment(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches a single alignment that contains a specified range of protein sequences.static DocumentSelectionSignature
forProteinAlignments(int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches a number of proteinSequenceAlignmentDocument
s within the given rangestatic DocumentSelectionSignature
forProteinSequences(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches any combination ofSequenceListDocument
andAminoAcidSequenceDocument
such that the total number of protein sequences they contain is within the given range.static DocumentSelectionSignature
forProteinSequences(int minimumNumberOfSequences, int maximumNumberOfSequences, boolean allowSequencesInAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
,SequenceAlignmentDocument
(if allowSequencesInAlignments is true) andAminoAcidSequenceDocument
such that the total number of protein sequences they contain is within the given range, and there are no nucleotide sequences.static DocumentSelectionSignature
forProteinSequencesAndAlignments(int minimumNumberOfSequences, int maximumNumberOfSequences, int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
, andAminoAcidSequenceDocument
such that the total number of protein sequences they contain is within the given range, and there are no nucleotide sequences, plus a number of proteinSequenceAlignmentDocument
s within the given rangevoid
fromXML(org.jdom.Element element)
Restore the object from the JDOM Element returned byXMLSerializable.toXML()
.jebl.evolution.sequences.SequenceType
getAlignmentSequenceType()
int
getNucleotideSequenceMaximum()
get the maximum number of nucleotide sequences this signature accepts, if it is a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences()int
getNucleotideSequenceMinimum()
get the minimum number of nucleotide sequences this signature accepts, if it is a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences()int
getProteinSequenceMaximum()
get the maximum number of protein sequences this signature accepts, if it is a signature created using forProteinSequences() or forNucleotideAndProteinSequences()int
getProteinSequenceMinimum()
get the minimum number of protein sequences this signature accepts, if it is a signature created using forProteinSequences() or forNucleotideAndProteinSequences()int
getSequencesInAlignmentMaximum()
int
getSequencesInAlignmentMinimum()
DocumentSelectionSignature.DocumentSelectionSignatureAtom[]
getSignature()
Get the signature.boolean
isAllowSequencesInNucleotideAlignments()
get whether a signature created forNucleotideSequences() or forNucleotideAndProteinSequences() allows sequences in alignments as well as from stand-alone sequencesboolean
isAllowSequencesInProteinAlignments()
get whether a signature created using forProteinSequences() or forNucleotideAndProteinSequences() allows sequences in alignments as well as from stand-alone sequencesstatic boolean
isMoreGeneral(DocumentSelectionSignature[] potentiallyMoreGeneralSignatures, DocumentSelectionSignature[] potentiallyMoreSpecificSignatures)
Returns true if all possible documents accepted by potentiallyMoreSpecificSignatures will also be accepted by potentiallyMoreGeneralSignatures.boolean
isNucleotideSequenceSignature()
get whether this signature was created using forNucleotideSequences() or forNucleotideAndProteinSequences()boolean
isProteinSequenceSignature()
get whether this signature was created using forProteinSequences() or forNucleotideAndProteinSequences()static boolean
matches(DocumentSelectionSignature[] signatures, java.lang.Class[] classes)
Deprecated.static boolean
matches(DocumentSelectionSignature[] signatures, java.util.List<? extends AnnotatedPluginDocument> documents)
boolean
matches(java.util.List<? extends AnnotatedPluginDocument> documents)
Check whether this selection signature matches these documents.java.lang.String
toString()
org.jdom.Element
toXML()
Convert object to a JDOM element.
-
-
-
Constructor Detail
-
DocumentSelectionSignature
public DocumentSelectionSignature(org.jdom.Element element) throws XMLSerializationException
XML deserialization constructor- Parameters:
element
- an element returned from a previous call totoXML()
- Throws:
XMLSerializationException
- Since:
- API 4.600 (Geneious 6.0.0)
-
DocumentSelectionSignature
public DocumentSelectionSignature(DocumentSelectionSignature.DocumentSelectionSignatureAtom[] atoms)
construct signature from given atoms. The signature only matches a set of class if the requirements of all atoms are met and if every class in the set matches at least 1 of the atoms.- Parameters:
atoms
- signature parts.
-
DocumentSelectionSignature
public DocumentSelectionSignature(DocumentSelectionSignature.DocumentSelectionSignatureAtom a)
convenience constructor.- Parameters:
a
- single selection atom.
-
DocumentSelectionSignature
public DocumentSelectionSignature(java.lang.Class classOfSelected, int from, int to)
convenience constructor for accepting a single class repeated a certain number of times. (say a set of 2 sequences or more - for alignment)- Parameters:
classOfSelected
- class of selected documentsfrom
- lower bound of number of documents (from 0 to Integer.MAX_VALUE)to
- upper bound of number of documents (from 0 to Integer.MAX_VALUE, must be greater than or equal tofrom
)
-
-
Method Detail
-
toXML
public org.jdom.Element toXML()
Description copied from interface:XMLSerializable
Convert object to a JDOM element. The representation should be complete so thatXMLSerializable.fromXML(org.jdom.Element)
can completely restore the object's representation. It is recommended that the returned element useXMLSerializable.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 callXMLSerializer.classToXML(String, XMLSerializable)
which calls this method internally. PluginDocument implementations of this method may choose to throw anXMLSerializationException
, enclosed in aRuntimeException
.- Specified by:
toXML
in interfaceXMLSerializable
- Returns:
- object encoded as a JDOM element
-
fromXML
public void fromXML(org.jdom.Element element) throws XMLSerializationException
Description copied from interface:XMLSerializable
Restore the object from the JDOM Element returned byXMLSerializable.toXML()
. This method generally should not be called directly. Instead, you should usually callXMLSerializer.classFromXML(org.jdom.Element)
orXMLSerializer.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 singleElement
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 withElement.clone()
.- Specified by:
fromXML
in interfaceXMLSerializable
- Parameters:
element
- representation from a previous call toXMLSerializable.toXML()
- Throws:
XMLSerializationException
- if the Element can't be converted into this type of object
-
forNucleotideSequences
public static DocumentSelectionSignature forNucleotideSequences(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches any combination ofSequenceListDocument
andNucleotideSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range. If an operation uses this selection signature, it must be prepared to acceptSequenceListDocuments
as input (i.e. Geneious won't split the sequence list into stand-alone sequences for input to the operation).- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of nucleotide sequences to match.maximumNumberOfSequences
- the maximum (inclusive) number of nucleotide sequences to match.- Returns:
- a selection signature that matches the specified number of nucleotide sequences.
-
forNucleotideSequences
public static DocumentSelectionSignature forNucleotideSequences(int minimumNumberOfSequences, int maximumNumberOfSequences, boolean allowSequencesInAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
,SequenceAlignmentDocument
(if allowSequencesInAlignments is true) andNucleotideSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range, and there are no protein sequences.- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of nucleotide sequences to match.maximumNumberOfSequences
- the maximum (inclusive) number of nucleotide sequences to match.allowSequencesInAlignments
- whether to allow sequences in alignments as well as stand-alone sequences. If you want a signature that just matches an alignment, useforNucleotideAlignment(int, int)
instead.- Returns:
- a selection signature that matches the specified number of nucleotide sequences.
-
isNucleotideSequenceSignature
public boolean isNucleotideSequenceSignature()
get whether this signature was created using forNucleotideSequences() or forNucleotideAndProteinSequences()- Returns:
- whether this signature was created using forNucleotideSequences() or forNucleotideAndProteinSequences()
- Since:
- API 4.600 (Geneious 6.0.0)
-
isProteinSequenceSignature
public boolean isProteinSequenceSignature()
get whether this signature was created using forProteinSequences() or forNucleotideAndProteinSequences()- Returns:
- whether this signature was created using forProteinSequences() or forNucleotideAndProteinSequences()
- Since:
- API 4.600 (Geneious 6.0.0)
-
getNucleotideSequenceMinimum
public int getNucleotideSequenceMinimum()
get the minimum number of nucleotide sequences this signature accepts, if it is a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences()- Returns:
- the minimum number of nucleotide sequences this signature accepts, if it is a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences()
- Throws:
java.lang.IllegalStateException
- if the signature was not created using forNucleotideSequences() or forNucleotideAndProteinSequences();- Since:
- API 4.600 (Geneious 6.0.0)
-
getNucleotideSequenceMaximum
public int getNucleotideSequenceMaximum()
get the maximum number of nucleotide sequences this signature accepts, if it is a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences()- Returns:
- the maximum number of nucleotide sequences this signature accepts, if it is a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences()
- Throws:
java.lang.IllegalStateException
- if the signature was not created using forNucleotideSequences() or forNucleotideAndProteinSequences();- Since:
- API 4.600 (Geneious 6.0.0)
-
getProteinSequenceMinimum
public int getProteinSequenceMinimum()
get the minimum number of protein sequences this signature accepts, if it is a signature created using forProteinSequences() or forNucleotideAndProteinSequences()- Returns:
- the minimum number of nucleotide sequences this signature accepts, if it is a signature created using forProteinSequences() or forNucleotideAndProteinSequences()
- Throws:
java.lang.IllegalStateException
- if the signature was not created using forProteinSequences() or forNucleotideAndProteinSequences();- Since:
- API 4.600 (Geneious 6.0.0)
-
getProteinSequenceMaximum
public int getProteinSequenceMaximum()
get the maximum number of protein sequences this signature accepts, if it is a signature created using forProteinSequences() or forNucleotideAndProteinSequences()- Returns:
- the maximum number of nucleotide sequences this signature accepts, if it is a signature created using forProteinSequences() or forNucleotideAndProteinSequences()
- Throws:
java.lang.IllegalStateException
- if the signature was not created using forProteinSequences() or forNucleotideAndProteinSequences();- Since:
- API 4.600 (Geneious 6.0.0)
-
isAllowSequencesInNucleotideAlignments
public boolean isAllowSequencesInNucleotideAlignments()
get whether a signature created forNucleotideSequences() or forNucleotideAndProteinSequences() allows sequences in alignments as well as from stand-alone sequences- Returns:
- true if a signature created using forNucleotideSequences() or forNucleotideAndProteinSequences() allows sequences in alignments as well as from stand-alone sequences
- Throws:
java.lang.IllegalStateException
- if the signature was not created using forNucleotideSequences() or forNucleotideAndProteinSequences();- Since:
- API 4.600 (Geneious 6.0.0)
-
isAllowSequencesInProteinAlignments
public boolean isAllowSequencesInProteinAlignments()
get whether a signature created using forProteinSequences() or forNucleotideAndProteinSequences() allows sequences in alignments as well as from stand-alone sequences- Returns:
- true if a signature created using forProteinSequences() or forNucleotideAndProteinSequences() allows sequences in alignments as well as from stand-alone sequences
- Throws:
java.lang.IllegalStateException
- if the signature was not created using forProteinSequences() or forNucleotideAndProteinSequences();- Since:
- API 4.600 (Geneious 6.0.0)
-
forNucleotideSequencesAndAlignments
public static DocumentSelectionSignature forNucleotideSequencesAndAlignments(int minimumNumberOfSequences, int maximumNumberOfSequences, int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
, andNucleotideSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range, and there are no protein sequences. plus a number of nucleotideSequenceAlignmentDocument
s within the given range- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of nucleotide sequences to match.maximumNumberOfSequences
- the maximum (inclusive) number of nucleotide sequences to match.minimumNumberOfAlignments
- the minimum (inclusive) number of nucleotide alignments to match.maximumNumberOfAlignments
- the maximum (inclusive) number of nucleotide alignments to match.- Returns:
- a selection signature that matches the specified number of nucleotide sequences and alignments.
-
forNucleotideAlignments
public static DocumentSelectionSignature forNucleotideAlignments(int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches a number of nucleotideSequenceAlignmentDocument
s within the given range. Note that if this is being used on aSequenceAnnotationGenerator
then the generator must implementSequenceAnnotationGenerator.generateOnAlignments
instead of the usualSequenceAnnotationGenerator.generate
- Parameters:
minimumNumberOfAlignments
- the minimum (inclusive) number of nucleotide alignments to match.maximumNumberOfAlignments
- the maximum (inclusive) number of nucleotide alignments to match.- Returns:
- a selection signature that matches the specified number of nucleotide alignments.
-
forMatching
public static DocumentSelectionSignature forMatching(java.util.function.Function<java.util.List<? extends AnnotatedPluginDocument>,java.lang.Boolean> customMatcher)
Creates a selection signature with the provided custom matcher.- Parameters:
customMatcher
- A function taking in a list of APD's and returning a boolean. This function is expected to return quickly and thus should not load plugin documents within the APD's.- Returns:
- A selection signature that matches withe the provided matching function.
- Since:
- API 4.202220 (Geneious 2022.2.0)
-
forProteinSequences
public static DocumentSelectionSignature forProteinSequences(int minimumNumberOfSequences, int maximumNumberOfSequences, boolean allowSequencesInAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
,SequenceAlignmentDocument
(if allowSequencesInAlignments is true) andAminoAcidSequenceDocument
such that the total number of protein sequences they contain is within the given range, and there are no nucleotide sequences.- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of protein sequences to match.maximumNumberOfSequences
- the maximum (inclusive) number of protein sequences to match.allowSequencesInAlignments
- whether to allow sequences in alignments as well as stand-alone sequences. If you want a signature that just matches an alignment, useforProteinAlignment(int, int)
instead- Returns:
- a selection signature that matches the specified number of protein sequences.
-
forProteinSequences
public static DocumentSelectionSignature forProteinSequences(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches any combination ofSequenceListDocument
andAminoAcidSequenceDocument
such that the total number of protein sequences they contain is within the given range. If an operation uses this selection signature, it must be prepared to acceptSequenceListDocuments
as input (i.e. Geneious won't split the sequence list into stand-alone sequences for input to the operation).- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of protein sequences to match.maximumNumberOfSequences
- the maximum (inclusive) number of protein sequences to match.- Returns:
- a selection signature that matches the specified number of protein sequences.
-
forProteinSequencesAndAlignments
public static DocumentSelectionSignature forProteinSequencesAndAlignments(int minimumNumberOfSequences, int maximumNumberOfSequences, int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
, andAminoAcidSequenceDocument
such that the total number of protein sequences they contain is within the given range, and there are no nucleotide sequences, plus a number of proteinSequenceAlignmentDocument
s within the given range- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of protein sequences to match.maximumNumberOfSequences
- the maximum (inclusive) number of protein sequences to match.minimumNumberOfAlignments
- the minimum (inclusive) number of protein alignments to match.maximumNumberOfAlignments
- the maximum (inclusive) number of protein alignments to match.- Returns:
- a selection signature that matches the specified number of protein sequences and alignments.
-
forProteinAlignments
public static DocumentSelectionSignature forProteinAlignments(int minimumNumberOfAlignments, int maximumNumberOfAlignments)
Creates a selection signature that matches a number of proteinSequenceAlignmentDocument
s within the given range- Parameters:
minimumNumberOfAlignments
- the minimum (inclusive) number of protein alignments to match.maximumNumberOfAlignments
- the maximum (inclusive) number of protein alignments to match.- Returns:
- a selection signature that matches the specified number of proteine alignments.
-
forNucleotideAndProteinSequences
public static DocumentSelectionSignature forNucleotideAndProteinSequences(int minimumNumberOfNucleotideSequences, int maximumNumberOfNucleotideSequences, int minimumNumberOfProteinSequences, int maximumNumberOfProteinSequences, boolean allowSequencesInAlignments)
Creates a selection signature that matches any combination ofSequenceListDocument
,SequenceAlignmentDocument
(if allowSequencesInAlignments is true),NucleotideSequenceDocument
andAminoAcidSequenceDocument
such that the total number of nucleotide sequences they contain is within the given range and the total number of protein sequences is also within the range.- Parameters:
minimumNumberOfNucleotideSequences
- the minimum (inclusive) number of nucleotide sequences to match. May be 0.maximumNumberOfNucleotideSequences
- the maximum (inclusive) number of nucleotide sequences to match.minimumNumberOfProteinSequences
- the minimum (inclusive) number of protein sequences to match. May be 0.maximumNumberOfProteinSequences
- the maximum (inclusive) number of protein sequences to match.allowSequencesInAlignments
- whether to allow sequences in alignmentsSequenceListDocument
s that are not of the right type- Returns:
- a selection signature that matches the specified number of nucleotide and protein sequences.
-
forNucleotideAlignment
public static DocumentSelectionSignature forNucleotideAlignment(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches a single alignment that contains a specified range of nucleotide sequences.- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of sequences the alignment must containmaximumNumberOfSequences
- the maximum (inclusive) number of sequences the alignment must contain- Returns:
- a selection signature that matches a single alignment that contains a specified range of nucleotide sequences.
-
forProteinAlignment
public static DocumentSelectionSignature forProteinAlignment(int minimumNumberOfSequences, int maximumNumberOfSequences)
Creates a selection signature that matches a single alignment that contains a specified range of protein sequences.- Parameters:
minimumNumberOfSequences
- the minimum (inclusive) number of sequences the alignment must containmaximumNumberOfSequences
- the maximum (inclusive) number of sequences the alignment must contain- Returns:
- a selection signature that matches a single alignment that contains a specified range of protein sequences.
-
getSignature
public DocumentSelectionSignature.DocumentSelectionSignatureAtom[] getSignature()
Get the signature.- Returns:
- the signatures
-
matches
public boolean matches(java.util.List<? extends AnnotatedPluginDocument> documents)
Check whether this selection signature matches these documents.- Parameters:
documents
- the documents to check against. null is equivalent to an empty document list.- Returns:
- true if this selection signature matches these documents.
-
matches
public static boolean matches(DocumentSelectionSignature[] signatures, java.util.List<? extends AnnotatedPluginDocument> documents)
- Parameters:
signatures
- the signatures to be matcheddocuments
- the documents to be matched. null is equivalent to an empty document list.- Returns:
- true if at least one of the document selection signatures match the given documents
-
isMoreGeneral
public static boolean isMoreGeneral(DocumentSelectionSignature[] potentiallyMoreGeneralSignatures, DocumentSelectionSignature[] potentiallyMoreSpecificSignatures)
Returns true if all possible documents accepted by potentiallyMoreSpecificSignatures will also be accepted by potentiallyMoreGeneralSignatures. Note that this method does not cover all possible scenarios so it may return false in some cases even where the documents accepted by potentiallyMoreSpecificSignatures are also accepted by potentiallyMoreGeneralSignatures. For example cases where signatures contain more than 1 atom are not covered. And generic handling of sequence lists comparing with specific SequenceDocument classes are not covered.- Parameters:
potentiallyMoreGeneralSignatures
- the signatures to see if they are more general than the other onespotentiallyMoreSpecificSignatures
- the signatures to see if they are more specific than the other ones- Returns:
- true if all possible documents accepted by potentiallyMoreSpecificSignatures will also be accepted by potentiallyMoreGeneralSignatures.
- Since:
- API 4.600 (Geneious 6.0.0)
-
matches
@Deprecated public static boolean matches(DocumentSelectionSignature[] signatures, java.lang.Class[] classes)
Deprecated.- Parameters:
signatures
- the signatures to be matchedclasses
- the classes to be matched- Returns:
- true if at least one of the document selection signatures match the given classes
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAlignmentSequenceType
public jebl.evolution.sequences.SequenceType getAlignmentSequenceType()
- Returns:
- the type of alignment this signature for if it was created using
forNucleotideAlignment(int, int)
orforProteinAlignment(int, int)
or null if it was created using neither of these signatures - Since:
- API 4.610 (Geneious 6.1.0)
-
getSequencesInAlignmentMinimum
public int getSequencesInAlignmentMinimum()
- Returns:
- the minimum number of sequences in an alignment if this signature was created using
forNucleotideAlignment(int, int)
orforProteinAlignment(int, int)
. You can determine if this signature was created using either of these viagetAlignmentSequenceType()
- Since:
- API 4.610 (Geneious 6.1.0)
-
getSequencesInAlignmentMaximum
public int getSequencesInAlignmentMaximum()
- Returns:
- the maximum number of sequences in an alignment if this signature was created using
forNucleotideAlignment(int, int)
orforProteinAlignment(int, int)
. You can determine if this signature was created using either of these viagetAlignmentSequenceType()
- Since:
- API 4.610 (Geneious 6.1.0)
-
-