Search in sources :

Example 6 with ReferenceType

use of ch.interlis.ili2c.metamodel.ReferenceType 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

CompositionType (ch.interlis.ili2c.metamodel.CompositionType)6 CoordType (ch.interlis.ili2c.metamodel.CoordType)6 EnumerationType (ch.interlis.ili2c.metamodel.EnumerationType)6 ObjectType (ch.interlis.ili2c.metamodel.ObjectType)6 PolylineType (ch.interlis.ili2c.metamodel.PolylineType)6 ReferenceType (ch.interlis.ili2c.metamodel.ReferenceType)6 SurfaceOrAreaType (ch.interlis.ili2c.metamodel.SurfaceOrAreaType)6 SurfaceType (ch.interlis.ili2c.metamodel.SurfaceType)6 Type (ch.interlis.ili2c.metamodel.Type)6 AreaType (ch.interlis.ili2c.metamodel.AreaType)5 BlackboxType (ch.interlis.ili2c.metamodel.BlackboxType)5 ViewableWrapper (ch.ehi.ili2db.mapping.ViewableWrapper)4 NumericType (ch.interlis.ili2c.metamodel.NumericType)4 ArrayMapping (ch.ehi.ili2db.mapping.ArrayMapping)3 MultiLineMapping (ch.ehi.ili2db.mapping.MultiLineMapping)3 MultiPointMapping (ch.ehi.ili2db.mapping.MultiPointMapping)3 MultiSurfaceMapping (ch.ehi.ili2db.mapping.MultiSurfaceMapping)3 AttributeDef (ch.interlis.ili2c.metamodel.AttributeDef)3 IomObject (ch.interlis.iom.IomObject)3 ConverterException (ch.ehi.ili2db.converter.ConverterException)2