X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fio%2Fparsers%2Fphyloxml%2FPhyloXmlUtil.java;h=e585cb347f9012a47931bbfae9b12c59971df1c4;hb=af5e25d369f3240ce41018957383044c12126d98;hp=156c65a884dc50b820354ddcca7e591df2e5bc43;hpb=f2a2cbbd1ca5fcd27f810a3353821791f240212d;p=jalview.git diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java index 156c65a..e585cb3 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java @@ -21,7 +21,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.io.parsers.phyloxml; @@ -31,13 +31,15 @@ import java.util.List; import java.util.Set; import java.util.regex.Pattern; +import org.forester.io.parsers.util.ParserUtils; + public final class PhyloXmlUtil { public static final String OTHER = "other"; public static final String UNKNOWN = "unknown"; public final static Pattern SEQUENCE_SYMBOL_PATTERN = Pattern.compile( "\\S{1,20}" ); public final static Pattern TAXOMONY_CODE_PATTERN = Pattern - .compile( "[a-zA-Z0-9_]{1,10}" ); + .compile( ParserUtils.TAX_CODE ); public final static Pattern LIT_REF_DOI_PATTERN = Pattern .compile( "[a-zA-Z0-9_\\.]+\\S+" ); public final static Set SEQUENCE_TYPES = new HashSet(); @@ -47,10 +49,13 @@ public final class PhyloXmlUtil { public static final String VECTOR_PROPERTY_REF = "vector:index="; public static final String VECTOR_PROPERTY_TYPE = "xsd:decimal"; public static final String UNIPROT_TAX_PROVIDER = "uniprot"; + public static final String SEQ_TYPE_RNA = "rna"; + public static final String SEQ_TYPE_DNA = "dna"; + public static final String SEQ_TYPE_PROTEIN = "protein"; static { - SEQUENCE_TYPES.add( "rna" ); - SEQUENCE_TYPES.add( "protein" ); - SEQUENCE_TYPES.add( "dna" ); + SEQUENCE_TYPES.add( SEQ_TYPE_RNA ); + SEQUENCE_TYPES.add( SEQ_TYPE_PROTEIN ); + SEQUENCE_TYPES.add( SEQ_TYPE_DNA ); TAXONOMY_RANKS_LIST.add( "domain" ); TAXONOMY_RANKS_LIST.add( "superkingdom" ); TAXONOMY_RANKS_LIST.add( "kingdom" );