Examples of SchemaProperty


Examples of org.apache.xmlbeans.SchemaProperty

    }

    public XmlObject createElementType(QName eltName, QName xsiType, SchemaTypeLoader wildcardTypeLoader)
    {
        SchemaType type = null;
        SchemaProperty prop = null;
        if (isSimpleType() || !containsElements() || isNoType())
        {
            type = BuiltinSchemaTypeSystem.ST_NO_TYPE;
        }
        else
        {
            prop = (SchemaProperty)_propertyModelByElementName.get(eltName);
            if (prop != null)
            {
                type = prop.getType();
            }
            else if (!_typedWildcardElements.contains(eltName) &&
                     !_validSubstitutions.contains(eltName))
            {
                type = BuiltinSchemaTypeSystem.ST_NO_TYPE;
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

    }

    public XmlObject createAttributeType(QName attrName, SchemaTypeLoader wildcardTypeLoader)
    {
        SchemaTypeImpl type = null;
        SchemaProperty prop = null;
        if (isSimpleType() || isNoType())
        {
            type = BuiltinSchemaTypeSystem.ST_NO_TYPE;
        }
        else if (isURType())
        {
            type = BuiltinSchemaTypeSystem.ST_ANY_SIMPLE;
        }
        else
        {
            prop = (SchemaProperty)_propertyModelByAttributeName.get(attrName);
            if (prop != null)
            {
                type = (SchemaTypeImpl)prop.getType();
            }
            else if (!_typedWildcardAttributes.contains(attrName))
            {
                type = BuiltinSchemaTypeSystem.ST_NO_TYPE;
            }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

    }

    SchemaProperty[] attrProps = stype.getAttributeProperties();
    for( int i = 0; i < attrProps.length; i++ )
    {
      SchemaProperty attr = attrProps[i];
      if( attr.getMinOccurs().intValue() == 0 && ignoreOptional )
        continue;

      if( attr.getName().equals( new QName( "http://www.w3.org/2005/05/xmlmime", "contentType" ) ) )
      {
        xmlc.insertAttributeWithValue( attr.getName(), "application/?" );
        continue;
      }

      if( _soapEnc )
      {
        if( SKIPPED_SOAP_ATTRS.contains( attr.getName() ) )
          continue;
        if( ENC_ARRAYTYPE.equals( attr.getName() ) )
        {
          SOAPArrayType arrayType = ( ( SchemaWSDLArrayType )stype.getAttributeModel().getAttribute(
              attr.getName() ) ).getWSDLArrayType();
          if( arrayType != null )
            xmlc.insertAttributeWithValue( attr.getName(),
                formatQName( xmlc, arrayType.getQName() ) + arrayType.soap11DimensionString() );
          continue;
        }
      }

      String value = null;
      if( multiValues != null )
      {
        String[] values = multiValues.get( attr.getName() );
        if( values != null )
          value = StringUtils.join( values, "," );
      }
      if( value == null )
        value = attr.getDefaultText();
      if( value == null )
        value = sampleDataForSimpleType( attr.getType() );

      xmlc.insertAttributeWithValue( attr.getName(), value );
    }
  }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

      {
        SchemaType parentSchemaType = getParent().getSchemaType();
        if( parentSchemaType != null )
        {
          positionCursor( cursor );
          SchemaProperty attributeProperty = parentSchemaType.getAttributeProperty( cursor.getName() );
          if( attributeProperty != null )
          {
            schemaType = attributeProperty.getType();
            documentation = SchemaUtils.getDocumentation( schemaType );

            // SchemaAnnotation annotation = schemaType.getAnnotation();
            // if( annotation != null )
            // {
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

        ArrayList optionalNames = new ArrayList();

        for (int ii = 0; ii < eltProperties.length; ii++)
        {
            //Get the element from the schema
            SchemaProperty sProp = eltProperties[ii];

            // test if the element is valid
            if (state.test(sProp.getName()))
            {
                if (0 == BigInteger.ZERO.compareTo(sProp.getMinOccurs()))
                    optionalNames.add(sProp.getName());
                else
                    expectedNames.add(sProp.getName());
            }
        }

        List names = (expectedNames.size() > 0 ? expectedNames : optionalNames);
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

        ArrayList optionalNames = new ArrayList();

        for (int ii = 0; ii < eltProperties.length; ii++)
        {
            //Get the element from the schema
            SchemaProperty sProp = eltProperties[ii];

            // test if the element is valid
            if (state.test(sProp.getName()))
            {
                if (0 == BigInteger.ZERO.compareTo(sProp.getMinOccurs()))
                    optionalNames.add(sProp.getName());
                else
                    expectedNames.add(sProp.getName());
            }
        }

        List names = (expectedNames.size() > 0 ? expectedNames : optionalNames);
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

        if (XmlBeans.ASSERTS)
            XmlBeans.assertTrue(_isComplexContent());
        if (!_isComplexContent())
            throw new IllegalStateException();

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

Examples of org.apache.xmlbeans.SchemaProperty

        if (XmlBeans.ASSERTS)
            XmlBeans.assertTrue(_isComplexType());
        if (!_isComplexType())
            throw new IllegalStateException();

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

Examples of org.apache.xmlbeans.SchemaProperty

    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

Examples of org.apache.xmlbeans.SchemaProperty

     */
    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
TOP
Copyright © 2018 www.massapi.com. 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.