Package ch.interlis.ili2c.metamodel

Examples of ch.interlis.ili2c.metamodel.Viewable


                        while (iter.hasNext()) {
                            Object obj = iter.next();

                            if (obj instanceof Viewable) {
                                Viewable v = (Viewable) obj;

                                if (isPureRefAssoc(v)) {
                                    continue;
                                }
                                String className = v.getScopedName(null);

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

                                typeBuilder.add("tid", String.class);

                                Iterator attri = v.getAttributesAndRoles2();

                                while (attri.hasNext()) {
                                    ch.interlis.ili2c.metamodel.ViewableTransferElement attrObj = (ch.interlis.ili2c.metamodel.ViewableTransferElement) attri
                                            .next();
                                    if (attrObj.obj instanceof AttributeDef) {
View Full Code Here


                        while (iter.hasNext()) {
                            Object obj = iter.next();

                            if (obj instanceof Viewable) {
                                Viewable v = (Viewable) obj;

                                if (IliUtils.isPureRefAssoc(v)) {
                                    continue;
                                }
                                String className = v.getScopedName(null);
                                logger.debug(className);

                                String tableName = (className
                                        .substring(className.indexOf(".") + 1))
                                        .replace(".", "_").toLowerCase();

                                ArrayList<String> geometryColumns = new ArrayList();
                                Iterator attri = v.getAttributesAndRoles2();

                                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
                                                || type instanceof CoordType) {
                                            geometryColumns.add(attrName);
                                        }
                                    }
                                }

                                if (geometryColumns.size() > 0) {

                                    for (String g : geometryColumns) {
                                        JSONObject jobjTable = new JSONObject();
                                        jobjTable.put("group", topicName);

                                        JSONObject langTableObj = new JSONObject();
                                        langTableObj.put("de", v.getName()
                                                + " (" + g + ")");
                                        langTableObj.put("fr", v.getName()
                                                + " (" + g + ")" + "_fr");

                                        jobjTable.put("title", langTableObj);

                                        jobjTable.put("featuretype", tableName);
                                        jobjTable.put("key", "ogc_fid");
                                        jobjTable.put("geom", g);
                                        jobjTable.put("readonly", 1);
                                        jobjTable.put("style", "");

                                        jTablesList.add(jobjTable);
                                    }
                                } else {
                                    JSONObject jobjTable = new JSONObject();
                                    jobjTable.put("group", topicName);

                                    JSONObject langTableObj = new JSONObject();
                                    langTableObj.put("de", v.getName());
                                    langTableObj.put("fr", v.getName() + "_fr");
                                    jobjTable.put("title", langTableObj);

                                    jobjTable.put("featuretype", tableName);
                                    jobjTable.put("key", "ogc_fid");
                                    jobjTable.put("readonly", 1);
View Full Code Here

                                    }
                                }
                            }

                            if (obj instanceof Viewable) {
                                Viewable v = (Viewable) obj;

                                if (isPureRefAssoc(v)) {
                                    continue;
                                }
                                String className = v.getScopedName(null);

                                // Array für btree Index
                                ArrayList btree_idx = new ArrayList();

                                String tableName = (className
View Full Code Here

TOP

Related Classes of ch.interlis.ili2c.metamodel.Viewable

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.