Search in sources :

Example 6 with NumericType

use of ch.interlis.ili2c.metamodel.NumericType in project ili2db by claeis.

the class TransferFromXtf method allReferencesKnownHelper.

private void allReferencesKnownHelper(IomObject iomObj, AttributeDef attr, FixIomObjectExtRefs extref) {
    String attrName = attr.getName();
    if (attr.isDomainBoolean()) {
    } else if (attr.isDomainIli1Date()) {
    } else if (attr.isDomainIli2Date()) {
    } else if (attr.isDomainIli2Time()) {
    } else if (attr.isDomainIli2DateTime()) {
    } else {
        Type type = attr.getDomainResolvingAliases();
        if (type instanceof CompositionType) {
            // enqueue struct values
            int structc = iomObj.getattrvaluecount(attrName);
            for (int structi = 0; structi < structc; structi++) {
                IomObject struct = iomObj.getattrobj(attrName, structi);
                allReferencesKnownHelper(struct, extref);
            }
        } else if (type instanceof PolylineType) {
        } else if (type instanceof SurfaceOrAreaType) {
        } else if (type instanceof CoordType) {
        } else if (type instanceof NumericType) {
        } else if (type instanceof EnumerationType) {
        } else if (type instanceof ReferenceType) {
            IomObject structvalue = iomObj.getattrobj(attrName, 0);
            String refoid = null;
            if (structvalue != null) {
                refoid = structvalue.getobjectrefoid();
            }
            if (refoid != null) {
                Viewable targetClass = ((ReferenceType) type).getReferred();
                if (!oidPool.containsXtfid(Ili2cUtility.getRootViewable(targetClass).getScopedName(null), refoid)) {
                    extref.addFix(structvalue, targetClass);
                }
            }
        } else {
        }
    }
}
Also used : PolylineType(ch.interlis.ili2c.metamodel.PolylineType) NumericType(ch.interlis.ili2c.metamodel.NumericType) PolylineType(ch.interlis.ili2c.metamodel.PolylineType) Type(ch.interlis.ili2c.metamodel.Type) ReferenceType(ch.interlis.ili2c.metamodel.ReferenceType) SurfaceOrAreaType(ch.interlis.ili2c.metamodel.SurfaceOrAreaType) SurfaceType(ch.interlis.ili2c.metamodel.SurfaceType) CompositionType(ch.interlis.ili2c.metamodel.CompositionType) EnumerationType(ch.interlis.ili2c.metamodel.EnumerationType) NumericType(ch.interlis.ili2c.metamodel.NumericType) ObjectType(ch.interlis.ili2c.metamodel.ObjectType) CoordType(ch.interlis.ili2c.metamodel.CoordType) IomObject(ch.interlis.iom.IomObject) SurfaceOrAreaType(ch.interlis.ili2c.metamodel.SurfaceOrAreaType) EnumerationType(ch.interlis.ili2c.metamodel.EnumerationType) Viewable(ch.interlis.ili2c.metamodel.Viewable) CompositionType(ch.interlis.ili2c.metamodel.CompositionType) ReferenceType(ch.interlis.ili2c.metamodel.ReferenceType) CoordType(ch.interlis.ili2c.metamodel.CoordType)

Aggregations

EnumerationType (ch.interlis.ili2c.metamodel.EnumerationType)6 NumericType (ch.interlis.ili2c.metamodel.NumericType)6 PrecisionDecimal (ch.interlis.ili2c.metamodel.PrecisionDecimal)5 BlackboxType (ch.interlis.ili2c.metamodel.BlackboxType)4 IomObject (ch.interlis.iom.IomObject)4 DbColBoolean (ch.ehi.sqlgen.repository.DbColBoolean)3 DbColDate (ch.ehi.sqlgen.repository.DbColDate)3 DbColDateTime (ch.ehi.sqlgen.repository.DbColDateTime)3 DbColTime (ch.ehi.sqlgen.repository.DbColTime)3 TextType (ch.interlis.ili2c.metamodel.TextType)3 Type (ch.interlis.ili2c.metamodel.Type)3 GregorianCalendar (java.util.GregorianCalendar)3 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)3 ConverterException (ch.ehi.ili2db.converter.ConverterException)2 CompositionType (ch.interlis.ili2c.metamodel.CompositionType)2 CoordType (ch.interlis.ili2c.metamodel.CoordType)2 ObjectType (ch.interlis.ili2c.metamodel.ObjectType)2 PolylineType (ch.interlis.ili2c.metamodel.PolylineType)2 ReferenceType (ch.interlis.ili2c.metamodel.ReferenceType)2 SurfaceOrAreaType (ch.interlis.ili2c.metamodel.SurfaceOrAreaType)2