X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2Fdescriptors%2FCompoundMatcherDescriptor.java;fp=src%2Fjalview%2Fschemabinding%2Fversion2%2Fdescriptors%2FCompoundMatcherDescriptor.java;h=0000000000000000000000000000000000000000;hb=4d64932654de3f6ffe07db11d18f2d21f558c6e6;hp=2402d68992e52252a07010bc2923b7c6888e1733;hpb=382f5ff058a4c2fed1e9874bb712b40f16ec1a4e;p=jalview.git diff --git a/src/jalview/schemabinding/version2/descriptors/CompoundMatcherDescriptor.java b/src/jalview/schemabinding/version2/descriptors/CompoundMatcherDescriptor.java deleted file mode 100644 index 2402d68..0000000 --- a/src/jalview/schemabinding/version2/descriptors/CompoundMatcherDescriptor.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * This class was automatically generated with - * Castor 1.1, using an XML - * Schema. - * $Id$ - */ - -package jalview.schemabinding.version2.descriptors; - -//---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import jalview.schemabinding.version2.CompoundMatcher; - -/** - * Class CompoundMatcherDescriptor. - * - * @version $Revision$ $Date$ - */ -public class CompoundMatcherDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - // --------------------------/ - // - Class/Member Variables -/ - // --------------------------/ - - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; - - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; - - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; - - /** - * Field _xmlName. - */ - private java.lang.String _xmlName; - - // ----------------/ - // - Constructors -/ - // ----------------/ - - public CompoundMatcherDescriptor() - { - super(); - _xmlName = "compoundMatcher"; - _elementDefinition = true; - - // -- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - // -- initialize attribute descriptors - - // -- _and - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Boolean.TYPE, "_and", "and", - org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - CompoundMatcher target = (CompoundMatcher) object; - if (!target.hasAnd()) - { - return null; - } - return (target.getAnd() ? java.lang.Boolean.TRUE - : java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - CompoundMatcher target = (CompoundMatcher) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setAnd(((java.lang.Boolean) value).booleanValue()); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _and - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { // -- local scope - org.exolab.castor.xml.validators.BooleanValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - // -- initialize element descriptors - - // -- _matcherSetList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - jalview.schemabinding.version2.MatcherSet.class, - "_matcherSetList", "matcherSet", - org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - CompoundMatcher target = (CompoundMatcher) object; - return target.getMatcherSet(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - CompoundMatcher target = (CompoundMatcher) object; - target.addMatcherSet( - (jalview.schemabinding.version2.MatcherSet) value); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public void resetValue(Object object) - throws IllegalStateException, IllegalArgumentException - { - try - { - CompoundMatcher target = (CompoundMatcher) object; - target.removeAllMatcherSet(); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.MatcherSet(); - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - // -- validation code for: _matcherSetList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(2); - fieldValidator.setMaxOccurs(2); - { // -- local scope - } - desc.setValidator(fieldValidator); - } - - // -----------/ - // - Methods -/ - // -----------/ - - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } - - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return super.getIdentity(); - } - - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.CompoundMatcher.class; - } - - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix() - { - return _nsPrefix; - } - - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI() - { - return _nsURI; - } - - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } - - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName() - { - return _xmlName; - } - - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition() - { - return _elementDefinition; - } - -}