X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fio%2Fmime%2FMimeTypes.java;h=3e7407f32c16b8a641009cb8a54eca37d7dc9f4c;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=5dd1e42edcbcc3e2bcd1547b2f065bd3a2bb6828;hpb=a45774ee31d9f35d4eff46d54d7deab719afb092;p=jalview.git diff --git a/src/jalview/ws/io/mime/MimeTypes.java b/src/jalview/ws/io/mime/MimeTypes.java index 5dd1e42..3e7407f 100644 --- a/src/jalview/ws/io/mime/MimeTypes.java +++ b/src/jalview/ws/io/mime/MimeTypes.java @@ -1,46 +1,51 @@ -/******************************************************************************* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle - * +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors + * * This file is part of Jalview. - * + * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . - *******************************************************************************/ + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.ws.io.mime; import jalview.io.packed.DataProvider.JvDataType; /** - * static functions for resolving Jalview datatypes from mime types - * @author JimP - * TODO: consider making get(Mime)TypeOf functions throw exceptions rather than returning null + * static functions for resolving Jalview datatypes from mime types + * + * @author JimP TODO: consider making get(Mime)TypeOf functions throw exceptions + * rather than returning null */ public class MimeTypes { /** - * pair list {String,JvDataType} giving a mime-type followed by its associated JvDataType enumeration. + * pair list {String,JvDataType} giving a mime-type followed by its associated + * JvDataType enumeration. */ final public static Object[] typemap = new Object[] { - "application/x-align",JvDataType.ALIGNMENT, - "application/x-jalview-annotation",JvDataType.ANNOTATION, - "application/x-newick",JvDataType.TREE, - "application/x-new-hampshire",JvDataType.TREE, - "application/x-new-hampshire-extended",JvDataType.TREE, - "application/x-nh",JvDataType.TREE, - "application/x-nhx",JvDataType.TREE, - "application/x-gff",JvDataType.FEATURES, - "application/x-gff3",JvDataType.FEATURES, - "application/x-jalview-feature-file",JvDataType.FEATURES, - "application/x-pdb",JvDataType.SEQASSOCATED}; + "application/x-align", JvDataType.ALIGNMENT, + "application/x-jalview-annotation", JvDataType.ANNOTATION, + "application/x-newick", JvDataType.TREE, + "application/x-new-hampshire", JvDataType.TREE, + "application/x-new-hampshire-extended", JvDataType.TREE, + "application/x-nh", JvDataType.TREE, "application/x-nhx", + JvDataType.TREE, "application/x-gff", JvDataType.FEATURES, + "application/x-gff3", JvDataType.FEATURES, + "application/x-jalview-feature-file", JvDataType.FEATURES, + "application/x-pdb", JvDataType.SEQASSOCATED }; + /** * * @param mimeType @@ -49,16 +54,16 @@ public class MimeTypes public static JvDataType getTypeOf(String mimeType) { String mt = mimeType.toLowerCase(); - for (int i=0;i