/******************************************************************************* * ALMA - Atacama Large Millimeter Array * Copyright (c) ESO - European Southern Observatory, 2011 * (in the framework of the ALMA collaboration). * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * 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 GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *******************************************************************************/ /* * This class was automatically generated with * <a href="http://castor.exolab.org">Castor 0.9.3.9+</a>, using an * XML Schema. * $Id$ */ package alma.acs.tools.comphelpergen.generated; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.mapping.AccessMode; import org.exolab.castor.mapping.ClassDescriptor; import org.exolab.castor.mapping.FieldDescriptor; import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; import org.exolab.castor.xml.TypeValidator; import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.handlers.*; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; import org.exolab.castor.xml.validators.*; /** * * * @version $Revision$ $Date$ **/ public class ComponentHelperInfoDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ private java.lang.String nsPrefix; private java.lang.String nsURI; private java.lang.String xmlName; private org.exolab.castor.xml.XMLFieldDescriptor identity; //----------------/ //- Constructors -/ //----------------/ public ComponentHelperInfoDescriptor() { super(); xmlName = "ComponentHelperInfo"; XMLFieldDescriptorImpl desc = null; XMLFieldHandler handler = null; FieldValidator fieldValidator = null; //-- set grouping compositor setCompositorAsSequence(); //-- initialize attribute descriptors //-- _outputRootDirectory desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_outputRootDirectory", "outputRootDirectory", NodeType.Attribute); desc.setImmutable(true); handler = (new XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { ComponentHelperInfo target = (ComponentHelperInfo) object; return target.getOutputRootDirectory(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { ComponentHelperInfo target = (ComponentHelperInfo) object; target.setOutputRootDirectory( (java.lang.String) value); } catch (Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return null; } } ); desc.setHandler(handler); desc.setRequired(true); addFieldDescriptor(desc); //-- validation code for: _outputRootDirectory fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope StringValidator sv = new StringValidator(); sv.setWhiteSpace("preserve"); fieldValidator.setValidator(sv); } desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _componentInterfaceList desc = new XMLFieldDescriptorImpl(ComponentInterface.class, "_componentInterfaceList", "ComponentInterface", NodeType.Element); handler = (new XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { ComponentHelperInfo target = (ComponentHelperInfo) object; return target.getComponentInterface(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { ComponentHelperInfo target = (ComponentHelperInfo) object; target.addComponentInterface( (ComponentInterface) value); } catch (Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return new ComponentInterface(); } } ); desc.setHandler(handler); desc.setMultivalued(true); addFieldDescriptor(desc); //-- validation code for: _componentInterfaceList fieldValidator = new FieldValidator(); fieldValidator.setMinOccurs(0); desc.setValidator(fieldValidator); } //-- alma.acs.tools.comphelpergen.generated.ComponentHelperInfoDescriptor() //-----------/ //- Methods -/ //-----------/ /** **/ public org.exolab.castor.mapping.AccessMode getAccessMode() { return null; } //-- org.exolab.castor.mapping.AccessMode getAccessMode() /** **/ public org.exolab.castor.mapping.ClassDescriptor getExtends() { return null; } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { return identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** **/ public java.lang.Class getJavaClass() { return alma.acs.tools.comphelpergen.generated.ComponentHelperInfo.class; } //-- java.lang.Class getJavaClass() /** **/ public java.lang.String getNameSpacePrefix() { return nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** **/ public java.lang.String getNameSpaceURI() { return nsURI; } //-- java.lang.String getNameSpaceURI() /** **/ public org.exolab.castor.xml.TypeValidator getValidator() { return this; } //-- org.exolab.castor.xml.TypeValidator getValidator() /** **/ public java.lang.String getXMLName() { return xmlName; } //-- java.lang.String getXMLName() }