Examples of AccessorDef


Examples of oracle.adf.model.adapter.dataformat.AccessorDef

        final String safeElementName = Utility.normalizeString(element.getName());
        final boolean collection = isCollection(element);

        if (type instanceof XSDSimpleType || noType || explicitAnyType) { // simpletype, geen type (dus string) en anytype moeten allemaal
            // attribuut worden
            AccessorDef collAccessor = null;
            MovableStructureDef attrParent = parent;
            LeafNodeType leafNodeType = LeafNodeType.ELEMENT;
            if (collection) { // collectie van attributen kan niet, dus collection accessor maken met
                // "fake" structure
                // TODO: beter beschrijven scalar collection??
                collAccessor =
                    createDCAccessor(safeElementName + SCALAR_COLLECTION_POSTFIX, parent, collection,
                                     SCALAR_COLLECTION_TRUE);
                addAccessorProperties(collAccessor, element);
                //createCompound(type, accessorDef); // maak StructureDefinition
                // maak StructureDefinition met enkel attribuut
                final MovableStructureDef collStructure = createDCStructure(collAccessor);
                // attribute voor element laten aanmaken in nieuwe structureDef en niet
                // in gegeven parent (waar nu een accessor en andere structure in
                // geplaatst zijn)
                attrParent = collStructure;
                leafNodeType = LeafNodeType.SCALAR_COLLECTION_ELEMENT;
            }
            // TODO: kunnen we code delen met resolveElement bij een simpleType???
            // TODO: kunnen we code delen met collectie van simpleType???
            // attribuut maken en deze toe voegen aan gegeven parent of "fake"
            // parent die we net gemaakt hebben igv collectie
            // wanneer expliciet anyType is opgegeven dan hele XML element exposen
            if (explicitAnyType) {
                final AttributeDef attrDef = createDCAttribute(safeElementName, attrParent, "org.w3c.dom.Element");
                addAttributeProperties(attrDef, element, type.getQName(), leafNodeType);
            } else {
                final XSDSimpleType simpleType = (XSDSimpleType) type;
                final AttributeDef attrDef =
                    createDCAttribute(safeElementName, attrParent, getTypeMapper().getJavaType(simpleType));
                addAttributeProperties(attrDef, element, getTypeMapper().getMappableType(simpleType), leafNodeType);
            }
        } else if (type instanceof XSDComplexType) { // complexType (niet anyType) als accessor met structure maken
            final XSDComplexType complexType = (XSDComplexType) type;
            final AccessorDef accessorDef =
                createDCAccessor(safeElementName, parent, collection, SCALAR_COLLECTION_FALSE);
            addAccessorProperties(accessorDef, element);
            final MovableStructureDef structDef =
                resolveComplexType(complexType, accessorDef); // maak StructureDefinition
            addStructureProperties(structDef, complexType);
View Full Code Here

Examples of oracle.adf.model.adapter.dataformat.AccessorDef

    }

    protected AccessorDef createDCAccessor(final String name, final MovableStructureDef parent,
                                           final boolean collection, final boolean scalarCollection) {
        // maak initieel aan zonder structure. Deze wordt later toegevoegd door aanroeper
        final AccessorDef accessorDef = new AccessorDef(name, parent, STRUCTURE_NULL, collection, scalarCollection);
        accessorDef.setReadOnly(READONLY_FALSE);
        parent.addAccessor(accessorDef);
        // operations toevoegen
        if (collection) {
            buildCollectionOperations(accessorDef, READONLY_FALSE);
        } else {
View Full Code Here

Examples of oracle.adf.model.adapter.dataformat.AccessorDef

            (XSDComplexType) (node instanceof XSDElement ? ((XSDElement) node).getType() : node);
        final String parentName = structName.substring(0, structName.lastIndexOf('.'));
        final String accessorName = structName.substring(structName.lastIndexOf('.') + 1);
        final MovableStructureDef tempStruct = createDCStructure(null, parentName);
        final boolean collection = node instanceof XSDElement ? isCollection((XSDElement) node) : false;
        final AccessorDef tempAccessor =
            createDCAccessor(accessorName, tempStruct, collection, SCALAR_COLLECTION_FALSE);
        MovableStructureDefinition retval = (MovableStructureDefinition) resolveComplexType(complexType, tempAccessor);
        retval.setParent(null);
        return retval;
    }
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.