X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FWebServiceParameterSet.java;h=822a17501623e8ab7108faede745757577df1f38;hb=c94c1390298db2e80abc04b371d3e7767f5e5968;hp=7120203567391c03ddd125ce4c619763cb7bbdc3;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git
diff --git a/src/jalview/schemabinding/version2/WebServiceParameterSet.java b/src/jalview/schemabinding/version2/WebServiceParameterSet.java
index 7120203..822a175 100644
--- a/src/jalview/schemabinding/version2/WebServiceParameterSet.java
+++ b/src/jalview/schemabinding/version2/WebServiceParameterSet.java
@@ -1,25 +1,30 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 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
+ * Note: Just in case the collection contents are changing in another thread, + * we pass a 0-length Array of the correct type into the API call. This way we + * know that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getServiceURL() + { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._serviceURLList.toArray(array); + } + + /** + * Method getServiceURLCount. + * + * @return the size of this collection + */ + public int getServiceURLCount() + { + return this._serviceURLList.size(); + } + + /** + * Returns the value of field 'version'. The field 'version' has the following + * description: A Jalview Web Service Parameter Set container version number. + * Version 1 created for storing Jaba user presets. + * + * + * @return the value of field 'Version'. + */ + public java.lang.String getVersion() + { + return this._version; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid() + { + try + { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) + { + return false; } - - /** - * Returns the value of field 'description'. The field - * 'description' has the following description: Short - * description - as utf8 encoded text. This is - * usually displayed - * in the body of an HTML capable tooltip, so HTML tags may be - * embedded - * using standard UTF8 encoding. - * - * - * @return the value of field 'Description'. + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void marshal(final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException + * if an IOException occurs during marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + */ + public void marshal(final org.xml.sax.ContentHandler handler) + throws java.io.IOException, + org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); + } + + /** */ - public java.lang.String getDescription( - ) { - return this._description; + public void removeAllServiceURL() + { + this._serviceURLList.clear(); + } + + /** + * Method removeServiceURL. + * + * @param vServiceURL + * @return true if the object was removed from the collection. + */ + public boolean removeServiceURL(final java.lang.String vServiceURL) + { + boolean removed = _serviceURLList.remove(vServiceURL); + return removed; + } + + /** + * Method removeServiceURLAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeServiceURLAt(final int index) + { + java.lang.Object obj = this._serviceURLList.remove(index); + return (java.lang.String) obj; + } + + /** + * Sets the value of field 'description'. The field 'description' has the + * following description: Short description - as utf8 encoded text. This is + * usually displayed in the body of an HTML capable tooltip, so HTML tags may + * be embedded using standard UTF8 encoding. + * + * + * @param description + * the value of field 'description'. + */ + public void setDescription(final java.lang.String description) + { + this._description = description; + } + + /** + * Sets the value of field 'name'. The field 'name' has the following + * description: The short name for the parameter set. This will be shown + * amongst the other presets for the web service. + * + * + * @param name + * the value of field 'name'. + */ + public void setName(final java.lang.String name) + { + this._name = name; + } + + /** + * Sets the value of field 'parameters'. The field 'parameters' has the + * following description: UTF8 encoded string to be processed into a specific + * web services' parameter set. Note - newlines may be important to the + * structure of this file. + * + * + * @param parameters + * the value of field 'parameters'. + */ + public void setParameters(final java.lang.String parameters) + { + this._parameters = parameters; + } + + /** + * + * + * @param index + * @param vServiceURL + * @throws java.lang.IndexOutOfBoundsException + * if the index given is outside the bounds of the collection + */ + public void setServiceURL(final int index, + final java.lang.String vServiceURL) + throws java.lang.IndexOutOfBoundsException + { + // check bounds for index + if (index < 0 || index >= this._serviceURLList.size()) + { + throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{ + "setServiceURL", + Integer.valueOf(index).toString(), + Integer.valueOf((this._serviceURLList.size() - 1)).toString() + })); } - /** - * Returns the value of field 'name'. The field 'name' has the - * following description: The short name for the parameter set. - * This will be shown amongst the - * other presets for the web service. - * - * - * @return the value of field 'Name'. - */ - public java.lang.String getName( - ) { - return this._name; - } - - /** - * Returns the value of field 'parameters'. The field - * 'parameters' has the following description: UTF8 encoded - * string to be processed into a specific web services' - * parameter set. Note - newlines may be important to the - * structure - * of this file. - * - * - * @return the value of field 'Parameters'. - */ - public java.lang.String getParameters( - ) { - return this._parameters; - } - - /** - * Method getServiceURL. - * - * @param index - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - * @return the value of the java.lang.String at the given index - */ - public java.lang.String getServiceURL( - final int index) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._serviceURLList.size()) { - throw new IndexOutOfBoundsException("getServiceURL: Index value '" + index + "' not in range [0.." + (this._serviceURLList.size() - 1) + "]"); - } - - return (java.lang.String) _serviceURLList.get(index); - } - - /** - * Method getServiceURL.Returns the contents of the collection - * in an Array.
Note: Just in case the collection contents - * are changing in another thread, we pass a 0-length Array of - * the correct type into the API call. This way we know - * that the Array returned is of exactly the correct length. - * - * @return this collection as an Array - */ - public java.lang.String[] getServiceURL( - ) { - java.lang.String[] array = new java.lang.String[0]; - return (java.lang.String[]) this._serviceURLList.toArray(array); - } - - /** - * Method getServiceURLCount. - * - * @return the size of this collection - */ - public int getServiceURLCount( - ) { - return this._serviceURLList.size(); - } - - /** - * Returns the value of field 'version'. The field 'version' - * has the following description: A Jalview Web Service - * Parameter Set container - * version number. - * Version 1 created for storing Jaba user presets. - * - * - * @return the value of field 'Version'. - */ - public java.lang.String getVersion( - ) { - return this._version; - } - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid( - ) { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void marshal( - final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException if an IOException occurs during - * marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - */ - public void marshal( - final org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - - /** - */ - public void removeAllServiceURL( - ) { - this._serviceURLList.clear(); - } - - /** - * Method removeServiceURL. - * - * @param vServiceURL - * @return true if the object was removed from the collection. - */ - public boolean removeServiceURL( - final java.lang.String vServiceURL) { - boolean removed = _serviceURLList.remove(vServiceURL); - return removed; - } - - /** - * Method removeServiceURLAt. - * - * @param index - * @return the element removed from the collection - */ - public java.lang.String removeServiceURLAt( - final int index) { - java.lang.Object obj = this._serviceURLList.remove(index); - return (java.lang.String) obj; - } - - /** - * Sets the value of field 'description'. The field - * 'description' has the following description: Short - * description - as utf8 encoded text. This is - * usually displayed - * in the body of an HTML capable tooltip, so HTML tags may be - * embedded - * using standard UTF8 encoding. - * - * - * @param description the value of field 'description'. - */ - public void setDescription( - final java.lang.String description) { - this._description = description; - } - - /** - * Sets the value of field 'name'. The field 'name' has the - * following description: The short name for the parameter set. - * This will be shown amongst the - * other presets for the web service. - * - * - * @param name the value of field 'name'. - */ - public void setName( - final java.lang.String name) { - this._name = name; - } - - /** - * Sets the value of field 'parameters'. The field 'parameters' - * has the following description: UTF8 encoded string to be - * processed into a specific web services' - * parameter set. Note - newlines may be important to the - * structure - * of this file. - * - * - * @param parameters the value of field 'parameters'. - */ - public void setParameters( - final java.lang.String parameters) { - this._parameters = parameters; - } - - /** - * - * - * @param index - * @param vServiceURL - * @throws java.lang.IndexOutOfBoundsException if the index - * given is outside the bounds of the collection - */ - public void setServiceURL( - final int index, - final java.lang.String vServiceURL) - throws java.lang.IndexOutOfBoundsException { - // check bounds for index - if (index < 0 || index >= this._serviceURLList.size()) { - throw new IndexOutOfBoundsException("setServiceURL: Index value '" + index + "' not in range [0.." + (this._serviceURLList.size() - 1) + "]"); - } - - this._serviceURLList.set(index, vServiceURL); - } - - /** - * - * - * @param vServiceURLArray - */ - public void setServiceURL( - final java.lang.String[] vServiceURLArray) { - //-- copy array - _serviceURLList.clear(); - - for (int i = 0; i < vServiceURLArray.length; i++) { - this._serviceURLList.add(vServiceURLArray[i]); - } - } - - /** - * Sets the value of field 'version'. The field 'version' has - * the following description: A Jalview Web Service Parameter - * Set container - * version number. - * Version 1 created for storing Jaba user presets. - * - * - * @param version the value of field 'version'. - */ - public void setVersion( - final java.lang.String version) { - this._version = version; - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException if object is - * null or if any SAXException is thrown during marshaling - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - * @return the unmarshaled - * jalview.schemabinding.version2.WebServiceParameterSet - */ - public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.WebServiceParameterSet.class, reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException if this - * object is an invalid instance according to the schema - */ - public void validate( - ) - throws org.exolab.castor.xml.ValidationException { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); + this._serviceURLList.set(index, vServiceURL); + } + + /** + * + * + * @param vServiceURLArray + */ + public void setServiceURL(final java.lang.String[] vServiceURLArray) + { + // -- copy array + _serviceURLList.clear(); + + for (int i = 0; i < vServiceURLArray.length; i++) + { + this._serviceURLList.add(vServiceURLArray[i]); } + } + + /** + * Sets the value of field 'version'. The field 'version' has the following + * description: A Jalview Web Service Parameter Set container version number. + * Version 1 created for storing Jaba user presets. + * + * + * @param version + * the value of field 'version'. + */ + public void setVersion(final java.lang.String version) + { + this._version = version; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException + * if object is null or if any SAXException is thrown during + * marshaling + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.WebServiceParameterSet + */ + public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller + .unmarshal( + jalview.schemabinding.version2.WebServiceParameterSet.class, + reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException + * if this object is an invalid instance according to the schema + */ + public void validate() throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } }