Examples of LocalAttribute


Examples of ch.interlis.ili2c.metamodel.LocalAttribute

                        featBuilder.set(roleName.toLowerCase(),
                                refoid.toString());
                    }
                }
            } else if (tableObj instanceof LocalAttribute) {
                LocalAttribute localAttr = (LocalAttribute) tag2class
                        .get(iomObj.getobjecttag());
                Type type = localAttr.getDomainResolvingAliases();

                if (type instanceof SurfaceType) {
                    isSurfaceHelper = true;
                    geomName = localAttr.getName().toLowerCase();

                    String fkName = ch.interlis.iom_j.itf.ModelUtilities
                            .getHelperTableMainTableRef(localAttr);
                    IomObject structvalue = iomObj.getattrobj(fkName, 0);
                    String refoid = null;
                    if (((ItfReader) ioxReader).isRenumberTids()) {
                        refoid = getTidOrRef(structvalue.getobjectrefoid());
                    } else {
                        refoid = structvalue.getobjectrefoid();
                    }
                    featBuilder.set("_itf_ref", refoid);

                    IomObject value = iomObj.getattrobj(
                            ch.interlis.iom_j.itf.ModelUtilities
                                    .getHelperTableGeomAttrName(localAttr), 0);
                    if (value != null) {
                        PrecisionDecimal maxOverlaps = ((SurfaceType) type)
                                .getMaxOverlap();
                        if (maxOverlaps == null) {
                            featBuilder.set(localAttr.getName().toLowerCase(),
                                    Iox2wkt.polyline2jts(value, 0.02));
                        } else {
                            // featBuilder.set(localAttr.getName().toLowerCase(),
                            // Iox2wkt.polyline2jts( value,
                            // maxOverlaps.doubleValue() ) );
                            featBuilder.set(localAttr.getName().toLowerCase(),
                                    Iox2wkt.polyline2jts(value, 0.001));
                        }
                    }
                } else if (type instanceof AreaType) {
                    isAreaHelper = true;
                    geomName = localAttr.getName().toLowerCase();

                    String fkName = ch.interlis.iom_j.itf.ModelUtilities
                            .getHelperTableMainTableRef(localAttr);
                    IomObject structvalue = iomObj.getattrobj(fkName, 0);

                    featBuilder.set("_itf_ref", null);

                    IomObject value = iomObj.getattrobj(
                            ch.interlis.iom_j.itf.ModelUtilities
                                    .getHelperTableGeomAttrName(localAttr), 0);
                    if (value != null) {
                        PrecisionDecimal maxOverlaps = ((AreaType) type)
                                .getMaxOverlap();
                        if (maxOverlaps == null) {
                            featBuilder.set(localAttr.getName().toLowerCase(),
                                    Iox2wkt.polyline2jts(value, 0.02));
                        } else {
                            // featBuilder.set(localAttr.getName().toLowerCase(),
                            // Iox2wkt.polyline2jts(value,
                            // maxOverlaps.doubleValue()));
                            featBuilder.set(localAttr.getName().toLowerCase(),
                                    Iox2wkt.polyline2jts(value, 0.001));
                        }
                    }
                }
            }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") || attrURI.equals(uri)) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                TypeHost th; String refAtt;
                if( ap.isCollection() ) {
                    th = localAttribute.simpleType().list();
                    refAtt = "itemType";
                } else {
                    th = localAttribute;
                    refAtt = "type";
                }
                writeTypeRef(th, ap, refAtt);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("required");
            }
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

/* 1069 */       return false;
/*      */     }
/*      */
/*      */     private void handleAttributeProp(AttributePropertyInfo<T, C> ap, AttrDecls attr)
/*      */     {
/* 1102 */       LocalAttribute localAttribute = attr.attribute();
/*      */
/* 1104 */       String attrURI = ap.getXmlName().getNamespaceURI();
/* 1105 */       if (attrURI.equals("")) {
/* 1106 */         localAttribute.name(ap.getXmlName().getLocalPart());
/*      */
/* 1108 */         writeAttributeTypeRef(ap, localAttribute);
/*      */
/* 1110 */         this.attributeFormDefault.writeForm(localAttribute, ap.getXmlName());
/*      */       } else {
/* 1112 */         localAttribute.ref(ap.getXmlName());
/*      */       }
/*      */
/* 1115 */       if (ap.isRequired())
/*      */       {
/* 1117 */         localAttribute.use("required");
/*      */       }
/*      */     }
View Full Code Here

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.LocalAttribute

            //   <attribute name="foo" type="xs:int"/>
            // </>
            //
            // or it could also be an in-lined type (attr ref)
            //
            LocalAttribute localAttribute = attr.attribute();

            final String attrURI = ap.getXmlName().getNamespaceURI();
            if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
                localAttribute.name(ap.getXmlName().getLocalPart());

                writeAttributeTypeRef(ap, localAttribute);

                attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
            } else { // generate an attr ref
                localAttribute.ref(ap.getXmlName());
            }

            if(ap.isRequired()) {
                // TODO: not type safe
                localAttribute.use("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.