X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fws%2Fserver%2FSequenceAnnotationService.java;h=afe0bf2fe38a908fb9440e661dcdad8f378fadd2;hb=68fe46f278b4ec408d6c68677bd56199aac749b3;hp=973951eb4d0c752b1806853dbd1ab3b5d806f7f6;hpb=61af8ce2cea02220228f58b30b4319f500b2f040;p=jabaws.git diff --git a/webservices/compbio/ws/server/SequenceAnnotationService.java b/webservices/compbio/ws/server/SequenceAnnotationService.java index 973951e..afe0bf2 100644 --- a/webservices/compbio/ws/server/SequenceAnnotationService.java +++ b/webservices/compbio/ws/server/SequenceAnnotationService.java @@ -1,3 +1,20 @@ +/* Copyright (c) 2011 Peter Troshin + * + * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0 + * + * This library is free software; you can redistribute it and/or modify it under the terms of the + * Apache License version 2 as published by the Apache Software Foundation + * + * This library 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 Apache + * License for more details. + * + * A copy of the license is in apache_license.txt. It is also available here: + * @see: http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Any republication or derived work distributed in source code form + * must include this copyright and license notice. + */ package compbio.ws.server; import java.util.List; @@ -43,20 +60,20 @@ public abstract class SequenceAnnotationService extends GenericMetadataServic return WSUtil.getAnnotation(jobId, log); } + @SuppressWarnings("unchecked") public String analize(List sequences) - throws UnsupportedRuntimeException, LimitExceededException, - JobSubmissionException { + throws UnsupportedRuntimeException, LimitExceededException, JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confIUPred = init(sequences); - return WSUtil.analize(sequences, confIUPred, log, "analize", - getLimit("")); + return WSUtil.analize(sequences, confIUPred, log, "analize", getLimit("")); } + @SuppressWarnings("unchecked") public String customAnalize(List sequences, List> options) throws UnsupportedRuntimeException, LimitExceededException, JobSubmissionException, WrongParameterException { - WSUtil.validateAAConInput(sequences); + WSUtil.validateFastaInput(sequences); ConfiguredExecutable confAACon = init(sequences); // Could not do that! Space separated values // will all be treated as keys! thus duplicates removed @@ -64,22 +81,20 @@ public abstract class SequenceAnnotationService extends GenericMetadataServic List params = WSUtil.getCommands(options, AACon.KEY_VALUE_SEPARATOR); confAACon.addParameters(params); - return WSUtil.analize(sequences, confAACon, log, "customAnalize", - getLimit("")); + return WSUtil.analize(sequences, confAACon, log, "customAnalize", getLimit("")); } public String presetAnalize(List sequences, Preset preset) - throws UnsupportedRuntimeException, LimitExceededException, - JobSubmissionException, WrongParameterException { + throws UnsupportedRuntimeException, LimitExceededException, JobSubmissionException, WrongParameterException { WSUtil.validateAAConInput(sequences); if (preset == null) { throw new WrongParameterException("Preset must be provided!"); } + @SuppressWarnings("unchecked") ConfiguredExecutable confAAcon = init(sequences); confAAcon.addParameters(preset.getOptions()); + @SuppressWarnings("unchecked") Limit limit = getLimit(preset.getName()); - return WSUtil - .analize(sequences, confAAcon, log, "presetAnalize", limit); + return WSUtil.analize(sequences, confAAcon, log, "presetAnalize", limit); } - }