Examples of SchemaProperty


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

Examples of org.apache.xmlbeans.SchemaProperty

     * 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

Examples of org.apache.xmlbeans.SchemaProperty

        SchemaProperty[] eltProperties = state._type.getElementProperties();

        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()))
            {
                message = "Expected element " + QNameHelper.pretty(sProp.getName()) + " instead of " + QNameHelper.pretty(qName) + " here";
                break;
            }
        }
        return message;
    }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

        String message = null;

        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()))
            {
                message = "Expected element " + QNameHelper.pretty(sProp.getName()) +
                          " at the end of the content";
                break;
            }
        }
        return message;
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

                // indentDBG();
                Map childModel = buildContentPropertyModelByQName(children[i], owner);
                // outdentDBG();
                for (Iterator j = childModel.values().iterator(); j.hasNext(); )
                {
                    SchemaProperty iProp = (SchemaProperty)j.next();
                    SchemaPropertyImpl oProp = (SchemaPropertyImpl)model.get(iProp.getName());
                    if (oProp == null)
                    {
                        if (!asSequence)
                            ((SchemaPropertyImpl)iProp).setMinOccurs(BigInteger.ZERO);
                        model.put(iProp.getName(), iProp);
                        continue;
                    }
                    // consistency verified in an earlier step
                    assert(oProp.getType().equals(iProp.getType()));

                    mergeProperties(oProp, iProp, asSequence);
                }
            }

            // finally deal with minOccurs, maxOccurs over whole group
            BigInteger min = part.getMinOccurs();
            BigInteger max = part.getMaxOccurs();

            for (Iterator j = model.values().iterator(); j.hasNext(); )
            {
                SchemaProperty oProp = (SchemaProperty)j.next();
                BigInteger minOccurs = oProp.getMinOccurs();
                BigInteger maxOccurs = oProp.getMaxOccurs();

                minOccurs = minOccurs.multiply(min);
                if (max != null && max.equals(BigInteger.ZERO))
                    maxOccurs = BigInteger.ZERO;
                else if (maxOccurs != null && !maxOccurs.equals(BigInteger.ZERO))
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

    static Map buildElementPropertyModel(SchemaLocalElement epart, SchemaType owner)
    {
        Map result = new HashMap(1);

        SchemaProperty sProp = buildUseProperty(epart, owner);
        result.put(sProp.getName(), sProp);
        return result;
    }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

        if (_propertyModelByAttributeName != null)
            results.addAll(_propertyModelByAttributeName.values());

        for (Iterator it = results.iterator() ; it.hasNext() ; )
        {
            SchemaProperty prop = (SchemaProperty)it.next();
            SchemaProperty baseProp = prop.isAttribute() ?
                baseType.getAttributeProperty(prop.getName()) :
                baseType.getElementProperty(prop.getName());


            // Remove the derived property from the results if it is
            // A) present in the base type and
            // B) all the details are the same (cardinality, nillability)

            if (baseProp != null)
            {
                if ( eq(prop.getMinOccurs(), baseProp.getMinOccurs()) &&
                     eq(prop.getMaxOccurs(), baseProp.getMaxOccurs()) &&
                     prop.hasNillable() == baseProp.hasNillable())
                {
                    it.remove();
                }

            }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

        {
            _validSubstitutions = new LinkedHashSet();
            Collection eltProps = _propertyModelByElementName.values();
            for (Iterator it = eltProps.iterator() ; it.hasNext() ; )
            {
                SchemaProperty prop = (SchemaProperty)it.next();
                QName[] names = prop.acceptedNames();
                for (int i = 0 ; i < names.length ; i++)
                {
                    if (! _propertyModelByElementName.containsKey(names[i]))
                        _validSubstitutions.add(names[i]);
                }
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

    {
        if (isSimpleType() || !containsElements() || isNoType())
            return BuiltinSchemaTypeSystem.ST_NO_TYPE;

        SchemaType type;
        SchemaProperty prop = (SchemaProperty)_propertyModelByElementName.get(eltName);
        if (prop != null)
        {
            type = prop.getType();
        }
        else
        {
            if (!_typedWildcardElements.contains(eltName) || wildcardTypeLoader == null)
                return BuiltinSchemaTypeSystem.ST_NO_TYPE;
View Full Code Here

Examples of org.apache.xmlbeans.SchemaProperty

            return BuiltinSchemaTypeSystem.ST_NO_TYPE;

        if (isURType())
            return BuiltinSchemaTypeSystem.ST_ANY_SIMPLE;

        SchemaProperty prop = (SchemaProperty)_propertyModelByAttributeName.get(attrName);
        if (prop != null)
            return prop.getType();

        if (!_typedWildcardAttributes.contains(attrName) || wildcardTypeLoader == null)
            return BuiltinSchemaTypeSystem.ST_NO_TYPE;

        SchemaGlobalAttribute attr = wildcardTypeLoader.findAttribute(attrName);
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.