Examples of AttributeDef


Examples of ch.interlis.ili2c.metamodel.AttributeDef

                                while (attri.hasNext()) {
                                    ch.interlis.ili2c.metamodel.ViewableTransferElement attrObj = (ch.interlis.ili2c.metamodel.ViewableTransferElement) attri
                                            .next();
                                    if (attrObj.obj instanceof AttributeDef) {
                                        AttributeDef attrdefObj = (AttributeDef) attrObj.obj;
                                        Type type = attrdefObj
                                                .getDomainResolvingAliases();

                                        if (type instanceof PolylineType) {
                                            typeBuilder.add(attrdefObj
                                                    .getName().toLowerCase(),
                                                    LineString.class);
                                        } else if (type instanceof SurfaceType) {
                                            String name = attrdefObj.getName();

                                            // Neuen SimpleFeatureTypeBuilder
                                            // für
                                            // Surface Helper-Table erstellen:
                                            // - tid
                                            // - foreign key, zB.
                                            // '_itf_ref_XXXXX (eigentlich egal)
                                            // - Key (Name) des Builders ist
                                            // Tabellenname + '_Attributname"
                                            // Dem 'originalen' (Main-Table)
                                            // Builder wird
                                            // eine Polygonklasse hinzugefügt.

                                            SimpleFeatureTypeBuilder typeBuilderRef = new SimpleFeatureTypeBuilder();
                                            typeBuilderRef.setName(className
                                                    + "_ " + name);
                                            // typeBuilderRef.setNamespaceURI(
                                            // "http://www.catais.org" );
                                            typeBuilderRef.setSRS("EPSG:"
                                                    + epsg);

                                            typeBuilderRef.add("tid",
                                                    String.class);
                                            typeBuilderRef.add("_itf_ref",
                                                    String.class);
                                            typeBuilderRef.add(
                                                    name.toLowerCase(),
                                                    LineString.class);

                                            if (true) {
                                                typeBuilderRef.add("gem_bfs",
                                                        Integer.class);
                                                typeBuilderRef.add("los",
                                                        Integer.class);
                                                typeBuilderRef.add(
                                                        "lieferdatum",
                                                        Date.class);
                                            }

                                            SimpleFeatureType featureTypeRef = typeBuilderRef
                                                    .buildFeatureType();
                                            ret.put(className + "_" + name,
                                                    featureTypeRef);

                                            typeBuilder.add(name.toLowerCase(),
                                                    Polygon.class);
                                        } else if (type instanceof AreaType) {
                                            String name = attrdefObj.getName();

                                            // Neuen SimpleFeatureTypeBuilder
                                            // für
                                            // Area Helper-Table erstellen.
                                            // Ähnlich
                                            // wie oben, nur dass im 'original'
                                            // Builder
                                            // zusätzliche eine Point-Geometrie
                                            // hinzugefügt werden muss.

                                            SimpleFeatureTypeBuilder typeBuilderRef = new SimpleFeatureTypeBuilder();
                                            typeBuilderRef.setName(className
                                                    + "_" + name);
                                            // typeBuilderRef.setNamespaceURI(
                                            // "http://www.catais.org" );
                                            typeBuilderRef.setSRS("EPSG:"
                                                    + epsg);

                                            typeBuilderRef.add("tid",
                                                    String.class);
                                            typeBuilderRef.add("_itf_ref",
                                                    String.class);
                                            typeBuilderRef.add(
                                                    name.toLowerCase(),
                                                    LineString.class);

                                            if (false) {
                                                typeBuilderRef.add("gem_bfs",
                                                        Integer.class);
                                                typeBuilderRef.add("los",
                                                        Integer.class);
                                                typeBuilderRef.add(
                                                        "lieferdatum",
                                                        Date.class);
                                            }

                                            SimpleFeatureType featureTypeRef = typeBuilderRef
                                                    .buildFeatureType();
                                            ret.put(className + "_" + name,
                                                    featureTypeRef);

                                            typeBuilder.add(name.toLowerCase()
                                                    + "_point", Point.class);
                                            typeBuilder.add(name.toLowerCase(),
                                                    Polygon.class);

                                        } else if (type instanceof CoordType) {
                                            typeBuilder.add(attrdefObj
                                                    .getName().toLowerCase(),
                                                    Point.class);
                                        } else if (type instanceof NumericType) {
                                            typeBuilder.add(attrdefObj
                                                    .getName().toLowerCase(),
                                                    Double.class);
                                        } else if (type instanceof EnumerationType) {
                                            typeBuilder.add(attrdefObj
                                                    .getName().toLowerCase(),
                                                    Integer.class);
                                            if (true) {
                                                typeBuilder.add(attrdefObj
                                                        .getName()
                                                        .toLowerCase()
                                                        + "_txt", String.class);
                                            }

                                        } else {
                                            typeBuilder.add(attrdefObj
                                                    .getName().toLowerCase(),
                                                    String.class);
                                        }
                                    }
                                    if (attrObj.obj instanceof RoleDef) {
View Full Code Here

Examples of ch.interlis.ili2c.metamodel.AttributeDef

                                while (attri.hasNext()) {
                                    ch.interlis.ili2c.metamodel.ViewableTransferElement attrObj = (ch.interlis.ili2c.metamodel.ViewableTransferElement) attri
                                            .next();

                                    if (attrObj.obj instanceof AttributeDef) {
                                        AttributeDef attrdefObj = (AttributeDef) attrObj.obj;
                                        Type type = attrdefObj
                                                .getDomainResolvingAliases();
                                        String attrName = attrdefObj.getName()
                                                .toLowerCase();

                                        if (type instanceof PolylineType
                                                || type instanceof SurfaceType
                                                || type instanceof AreaType
View Full Code Here

Examples of ch.interlis.ili2c.metamodel.AttributeDef

                while (attri.hasNext()) {
                    ViewableTransferElement obj = (ViewableTransferElement) attri
                            .next();

                    if (obj.obj instanceof AttributeDef) {
                        AttributeDef attr = (AttributeDef) obj.obj;
                        Type type = attr.getDomainResolvingAliases();
                        String attrName = attr.getName();

                        // what is this good for?
                        if (type instanceof CompositionType) {
                            logger.debug("CompositionType");
                            int valuec = iomObj.getattrvaluecount(attrName);
View Full Code Here

Examples of ch.interlis.ili2c.metamodel.AttributeDef

                                while (attri.hasNext()) {
                                    ch.interlis.ili2c.metamodel.ViewableTransferElement attrObj = (ch.interlis.ili2c.metamodel.ViewableTransferElement) attri
                                            .next();

                                    if (attrObj.obj instanceof AttributeDef) {
                                        AttributeDef attrdefObj = (AttributeDef) attrObj.obj;
                                        Type type = attrdefObj
                                                .getDomainResolvingAliases();

                                        String attrName = attrdefObj.getName()
                                                .toLowerCase();

                                        if (type instanceof PolylineType) {
                                            tables.append(" ");
                                            tables.append(attrName + " ");
                                            tables.append("geometry(LINESTRING, "
                                                    + epsg + "),\n");

                                            geomType.add("LINESTRING");
                                            geomName.add(attrName);
                                        } else if (type instanceof SurfaceType) {
                                            tables.append(" ");
                                            tables.append(attrName + " ");
                                            tables.append("geometry(POLYGON, "
                                                    + epsg + "),\n");

                                            geomType.add("POLYGON");
                                            geomName.add(attrName);
                                        } else if (type instanceof AreaType) {
                                            tables.append(" ");
                                            tables.append(attrName + " ");
                                            tables.append("geometry(POLYGON, "
                                                    + epsg + "),\n");

                                            geomType.add("POLYGON");
                                            geomName.add(attrName);
                                        } else if (type instanceof CoordType) {
                                            tables.append(" ");
                                            tables.append(attrName + " ");
                                            tables.append("geometry(POINT, "
                                                    + epsg + "),\n");

                                            geomType.add("POINT");
                                            geomName.add(attrName);
                                        } else if (type instanceof NumericType) {
                                            tables.append(" ");
                                            tables.append(attrName + " ");
                                            tables.append("DOUBLE PRECISION,\n");
                                        } else if (type instanceof EnumerationType) {
                                            tables.append(" ");
                                            tables.append(attrName + " ");
                                            tables.append("INTEGER,\n");

                                            // append also the text
                                            // representation of the enumeration
                                            if (true) {
                                                tables.append(" ");
                                                tables.append(attrName
                                                        + "_txt ");
                                                tables.append("VARCHAR,\n");
                                            }

                                            Type attrType = (Type) attrdefObj
                                                    .getDomain();
                                            if (attrType instanceof EnumerationType) {
                                                EnumerationType enumerationType = (EnumerationType) attrType;
                                                ch.interlis.ili2c.metamodel.Enumeration enumerations = (ch.interlis.ili2c.metamodel.Enumeration) enumerationType
                                                        .getConsolidatedEnumeration();
View Full Code Here

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

     */
    protected static void addNewAttributeToStructure(StructureDef structure, Method method, final String attrName,
                                                     boolean isReadonly,
                                                     boolean isKey) {
        // TODO: Factory class die we kunnen delen met XSDProcessor
        final AttributeDef attrDef =
            new AttributeDef(attrName, structure, method.getReturnType().getName(), isReadonly, isKey);
        structure.addAttribute(attrDef);
    }
View Full Code Here

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

            // 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;
View Full Code Here

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

        addStructureProperties(structDef, type);

        if (type.isSimpleContent()) {
            // Fake attribute _value for the SimpleContent for this complexType
            final XSDSimpleType simpleType = type.getSimpleType();
            final AttributeDef attrDef =
                createDCAttribute(SIMPLETYPE_ATTRIBUTE, structDef, getTypeMapper().getJavaType(simpleType));
            addAttributeProperties(attrDef, /*attrOrElem*/null, getTypeMapper().getMappableType(simpleType),
                                   LeafNodeType.ELEMENT);
        }
        for (XSDAttribute attribute : type.getAttributeDeclarations()) {
View Full Code Here

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

        XSDSimpleType simpleType = (XSDSimpleType) attribute.getType();
        if (isAnyType(simpleType) && !hasTypeAttribute(attribute)) {
            simpleType = null;
        }
        final AttributeDef attrDef =
            createDCAttribute(Utility.normalizeString(attribute.getName()), parent,
                              getTypeMapper().getJavaType(simpleType));
        addAttributeProperties(attrDef, attribute, getTypeMapper().getMappableType(simpleType), LeafNodeType.ATTRIBUTE);
        return attrDef;
    }
View Full Code Here

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

        return createDCStructure(parent, parent.getFullName());
    }

    protected AttributeDef createDCAttribute(final String name, final MovableStructureDef parent,
                                             final String javaType) {
        final AttributeDef attrDef = new AttributeDef(name, parent, javaType, READONLY_FALSE, KEY_FALSE);
        parent.addAttribute(attrDef);
        return attrDef;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.mapping.model.AttributeDef

    public Entity createEntity(String id, String entityType, String[]... attrKeyValuePairs){
       
        EntityImpl stubEntity = new EntityImpl("user", id, new HashSet<AttributeDef>(attributeDefs.values()));
        for (int i = 0; i < attrKeyValuePairs.length; i++)
        {
            AttributeDef def = attributeDefs.get(attrKeyValuePairs[i][0]);
            if (def!=null){
                stubEntity.setAttribute(def.getName(), attrKeyValuePairs[i][1]);
            }
        }
        stubEntity.setInternalId(id); // simply use the id
        return stubEntity;
    }
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.