Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.SchemaProperty


        SchemaProperty[] props = this.getAttributeProperties();

        for (int i = 0; i < props.length; i++)
        {
            SchemaProperty prop = props[i];
            qnsb.remove(prop.getName());
        }

        return qnsb.toQNameSet();
    }
View Full Code Here


    {
        assert(_isComplexContent());
        if (!_isComplexContent())
            throw new IllegalStateException();

        SchemaProperty prop = schemaType().getElementProperty(eltName);
        if (prop == null)
            return "";
        return prop.getDefaultText();
    }
View Full Code Here

    {
        assert(_isComplexType());
        if (!_isComplexType())
            throw new IllegalStateException();

        SchemaProperty prop = schemaType().getAttributeProperty(attrName);
        if (prop == null)
            return "";
        return prop.getDefaultText();
    }
View Full Code Here

    public int get_elementflags(QName eltName)
    {
        if (!_isComplexContent())
            return 0;

        SchemaProperty prop = schemaType().getElementProperty(eltName);
        if (prop == null)
            return 0;
        if (prop.hasDefault() == SchemaProperty.VARIABLE ||
            prop.hasFixed() == SchemaProperty.VARIABLE ||
            prop.hasNillable() == SchemaProperty.VARIABLE)
            return -1;
        return
            (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) |
            (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) |
            (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE);
    }
View Full Code Here

     */
    public int get_attributeflags(QName attrName)
    {
        if (!_isComplexType())
            return 0;
        SchemaProperty prop = schemaType().getAttributeProperty(attrName);
        if (prop == null)
            return 0;
        return
            (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) |
            (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED);
        // BUGBUG: todo: hook up required?
    }
View Full Code Here

     * same name, or at the very first slot if it is the first elt
     * with that name).
     */
    public final QNameSet get_element_ending_delimiters(QName eltname)
    {
        SchemaProperty prop = schemaType().getElementProperty(eltname);
        if (prop == null)
            return null;
        return prop.getJavaSetterDelimiter();
    }
View Full Code Here

    * @return DOCUMENT_ME
    */
   public static long getMaxOccurs( SchemaType schemaType,
                                    QName      elemQName )
   {
      SchemaProperty elemSchemaProp = schemaType.getElementProperty( elemQName );
      if ( elemSchemaProp == null )
      {
         throw new IllegalArgumentException( "No such element: " + elemQName );
      }

      BigInteger maxOccurs = elemSchemaProp.getMaxOccurs(  );
      return ( maxOccurs != null ) ? maxOccurs.longValue(  ) : ( -1 );
   }
View Full Code Here

    * @return DOCUMENT_ME
    */
   public static long getMinOccurs( SchemaType schemaType,
                                    QName      elemQName )
   {
      SchemaProperty elemSchemaProp = schemaType.getElementProperty( elemQName );
      if ( elemSchemaProp == null )
      {
         throw new IllegalArgumentException( "No such element: " + elemQName );
      }

      return elemSchemaProp.getMinOccurs(  ).longValue(  );
   }
View Full Code Here

    * @return DOCUMENT_ME
    */
   protected final SchemaProperty getTopicSpaceElementSchemaProperty(  )
   {
      SchemaProperty[] elemSchemaProps          = getPropertiesXmlBean(  ).schemaType(  ).getElementProperties(  );
      SchemaProperty   topicSpaceElemSchemaProp = null;
      for ( int i = 0; i < elemSchemaProps.length; i++ )
      {
         SchemaProperty elemSchemaProp = elemSchemaProps[i];
         if ( elemSchemaProp.getType(  ).getName(  ).equals( TopicsConstants.TYPE_TOPIC_SPACE ) )
         {
            topicSpaceElemSchemaProp = elemSchemaProp;
            break;
         }
      }
View Full Code Here

      if ( propQName == null )
      {
         throw new InvalidResourcePropertyQNameFaultException( "Property name cannot be null." );
      }

      SchemaProperty elemSchemaProp = m_resourceProps.schemaType(  ).getElementProperty( propQName );
      if ( elemSchemaProp == null )
      {
         throw new InvalidResourcePropertyQNameFaultException( "Invalid property name: " + propQName );
      }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.SchemaProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.