Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * This class was automatically generated with 
   * <a href="http://www.castor.org">Castor 1.3.0.1</a>, using an XML
   * Schema.
   * $Id$
   */
  
  package com.sporniket.studio.schema.model.set.javabean.descriptors;
  
   //---------------------------------/
  //- Imported classes and packages -/
 //---------------------------------/
 
Class BeanDescriptor.

Version:
$Revision$ $Date$
 
 
 
       //--------------------------/
      //- 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;

    
Field _identity.
 
 
 
       //----------------/
      //- Constructors -/
     //----------------/
 
     public BeanDescriptor() {
         super();
          = "http://schema.sporniket-studio.com/model/set/javabean";
          = "Bean";
          = false;
 
         //-- 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
 
         //-- _name
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class"_name""name".....);
         desc.setImmutable(true);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             @Override
             public java.lang.Object getValuejava.lang.Object object ) 
                 throws IllegalStateException
             {
                 Bean target = (Beanobject;
                 return target.getName();
             }
             @Override
             public void setValuejava.lang.Object objectjava.lang.Object value
                 throws IllegalStateExceptionIllegalArgumentException
             {
                 try {
                     Bean target = (Beanobject;
                     target.setName( (java.lang.Stringvalue);
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
             }
             @Override
             @SuppressWarnings("unused")
             public java.lang.Object newInstance(java.lang.Object parent) {
                 return null;
             }
         };
         desc.setSchemaType("string");
        desc.setHandler(handler);
        desc.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        //-- validation code for: _name
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
            org.exolab.castor.xml.validators.StringValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
            fieldValidator.setValidator(typeValidator);
            typeValidator.setWhiteSpace("preserve");
        }
        desc.setValidator(fieldValidator);
        //-- _extends
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class"_extends""extends".....);
        desc.setImmutable(true);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            @Override
            public java.lang.Object getValuejava.lang.Object object ) 
                throws IllegalStateException
            {
                Bean target = (Beanobject;
                return target.getExtends();
            }
            @Override
            public void setValuejava.lang.Object objectjava.lang.Object value
                throws IllegalStateExceptionIllegalArgumentException
            {
                try {
                    Bean target = (Beanobject;
                    target.setExtends( (java.lang.Stringvalue);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            @Override
            @SuppressWarnings("unused")
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setSchemaType("string");
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        //-- validation code for: _extends
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            org.exolab.castor.xml.validators.StringValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
            fieldValidator.setValidator(typeValidator);
            typeValidator.setWhiteSpace("preserve");
        }
        desc.setValidator(fieldValidator);
        //-- initialize element descriptors
        //-- _annotation
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.sporniket.studio.schema.model.set.javabean.GroupAnnotation.class"_annotation""annotation".....);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            @Override
            public java.lang.Object getValuejava.lang.Object object ) 
                throws IllegalStateException
            {
                Bean target = (Beanobject;
                return target.getAnnotation();
            }
            @Override
            public void setValuejava.lang.Object objectjava.lang.Object value
                throws IllegalStateExceptionIllegalArgumentException
            {
                try {
                    Bean target = (Beanobject;
                    target.setAnnotation( (com.sporniket.studio.schema.model.set.javabean.GroupAnnotationvalue);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            @Override
            @SuppressWarnings("unused")
            public java.lang.Object newInstance(java.lang.Object parent) {
                return new com.sporniket.studio.schema.model.set.javabean.GroupAnnotation();
            }
        };
        desc.setSchemaType("GroupAnnotation");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://schema.sporniket-studio.com/model/set/javabean");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
        //-- validation code for: _annotation
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _propertyList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.sporniket.studio.schema.model.set.javabean.Property.class"_propertyList""property".....);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            @Override
            public java.lang.Object getValuejava.lang.Object object ) 
                throws IllegalStateException
            {
                Bean target = (Beanobject;
                return target.getProperty();
            }
            @Override
            public void setValuejava.lang.Object objectjava.lang.Object value
                throws IllegalStateExceptionIllegalArgumentException
            {
                try {
                    Bean target = (Beanobject;
                    target.addProperty( (com.sporniket.studio.schema.model.set.javabean.Propertyvalue);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object objectthrows IllegalStateExceptionIllegalArgumentException {
                try {
                    Bean target = (Beanobject;
                    target.removeAllProperty();
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            @Override
            @SuppressWarnings("unused")
            public java.lang.Object newInstance(java.lang.Object parent) {
                return new com.sporniket.studio.schema.model.set.javabean.Property();
            }
        };
        desc.setSchemaType("list");
        desc.setComponentType("Property");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://schema.sporniket-studio.com/model/set/javabean");
        desc.setRequired(true);
        desc.setMultivalued(true);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
        //-- validation code for: _propertyList
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
    }
      //-----------/
     //- Methods -/
    //-----------/

    
Method getAccessMode.

Returns:
the access mode specified for this class.
    @Override()
    ) {
        return null;
    }

    
Method getIdentity.

Returns:
the identity field, null if this class has no identity.
    @Override()
    ) {
        return ;
    }

    
Method getJavaClass.

Returns:
the Java class represented by this descriptor.
    @Override()
    public java.lang.Class getJavaClass(
    ) {
        return com.sporniket.studio.schema.model.set.javabean.Bean.class;
    }

    
Method getNameSpacePrefix.

Returns:
the namespace prefix to use when marshaling as XML.
    @Override()
    ) {
        return ;
    }

    
Method getNameSpaceURI.

Returns:
the namespace URI used when marshaling and unmarshaling as XML.
    @Override()
    ) {
        return ;
    }

    
Method getValidator.

Returns:
a specific validator for the class described by this ClassDescriptor.
    @Override()
    ) {
        return this;
    }

    
Method getXMLName.

Returns:
the XML Name for the Class being described.
    @Override()
    public java.lang.String getXMLName(
    ) {
        return ;
    }

    
Method isElementDefinition.

Returns:
true if XML schema definition of this Class is that of a global element or element with anonymous type definition.
    public boolean isElementDefinition(
    ) {
        return ;
    }
New to GrepCode? Check out our FAQ X