CONTRACTED TYPE MODEL INTERLIS (en) AT "http://www.interlis.ch/"
DIMENSIONLESS (ABSTRACT);
ELECTRIC_CURRENT (ABSTRACT);
AMOUNT_OF_MATTER (ABSTRACT);
LUMINOUS_INTENSITY (ABSTRACT);
METER [m] EXTENDS LENGTH;
KILOGRAM [kg] EXTENDS MASS;
AMPERE [A] EXTENDS ELECTRIC_CURRENT;
DEGREE_KELVIN [K] EXTENDS TEMPERATURE;
MOLE [mol] EXTENDS AMOUNT_OF_MATTER;
RADIAN [rad] EXTENDS ANGLE;
STERADIAN [sr] EXTENDS SOLID_ANGLE;
CANDELA [cd] EXTENDS LUMINOUS_INTENSITY;
INTERLIS_1_DATE (FINAL) = TEXT*8;
I32OID = OID 0 .. 2147483647;
STANDARDOID = OID TEXT*16;
LineCoord (ABSTRACT) = COORD NUMERIC, NUMERIC;
FUNCTION myClass (Object: ANYSTRUCTURE): STRUCTURE;
FUNCTION isSubClass (potSubClass: STRUCTURE; potSuperClass: STRUCTURE):
FUNCTION isOfClass (Object: ANYSTRUCTURE; Class: STRUCTURE): BOOLEAN;
FUNCTION elementCount (bag: BAG OF ANYSTRUCTURE): NUMERIC;
FUNCTION objectCount (Objects: OBJECTS OF ANYCLASS): NUMERIC;
FUNCTION len (TextVal: TEXT): NUMERIC;
FUNCTION lenM (TextVal: MTEXT): NUMERIC;
FUNCTION trim (TextVal: TEXT): TEXT;
FUNCTION trimM (TextVal: MTEXT): MTEXT;
FUNCTION isEnumSubVal (SubVal: ENUMTREEVAL; NodeVal: ENUMTREEVAL): BOOLEAN;
FUNCTION inEnumRange (Enum: ENUMVAL;
MaxVal: ENUMTREEVAL): BOOLEAN;
FUNCTION convertUnit (from: NUMERIC): NUMERIC;
FUNCTION areAreas (Objects: OBJECTS OF ANYCLASS;
SurfaceBag: ATTRIBUTE OF @ Objects
RESTRICTION (BAG OF ANYSTRUCTURE);
SurfaceAttr: ATTRIBUTE OF @ SurfaceBag
RESTRICTION (SURFACE)): BOOLEAN;
CLASS METAOBJECT (ABSTRACT) =
CLASS METAOBJECT_TRANSLATION =
NameInBaseLanguage: MANDATORY NAME;
UNIQUE NameInBaseLanguage;
END METAOBJECT_TRANSLATION;
CLASS REFSYSTEM (ABSTRACT) EXTENDS METAOBJECT =
CLASS COORDSYSTEM (ABSTRACT) EXTENDS REFSYSTEM =
Axis: LIST {1..3} OF AXIS;
CLASS SCALSYSTEM (ABSTRACT) EXTENDS REFSYSTEM =
CLASS SIGN (ABSTRACT) EXTENDS METAOBJECT =
CLASS CALENDAR EXTENDS INTERLIS.SCALSYSTEM =
Unit(EXTENDED): NUMERIC [TIME];
CLASS TIMEOFDAYSYS EXTENDS INTERLIS.SCALSYSTEM =
Unit(EXTENDED): NUMERIC [TIME];
Minute [min] = 60 [INTERLIS.s];
Month [M] EXTENDS INTERLIS.TIME;
Year [Y] EXTENDS INTERLIS.TIME;
REFSYSTEM BASKET BaseTimeSystems ~ TIMESYSTEMS
OBJECTS OF CALENDAR: GregorianCalendar
OBJECTS OF TIMEOFDAYSYS: UTC;
STRUCTURE TimeOfDay (ABSTRACT) =
Hours: 0 .. 23 CIRCULAR [h];
CONTINUOUS SUBDIVISION Minutes: 0 .. 59 CIRCULAR [min];
CONTINUOUS SUBDIVISION Seconds: 0.000 .. 59.999 CIRCULAR [INTERLIS.s];
STRUCTURE UTC EXTENDS TimeOfDay =
Hours(EXTENDED): 0 .. 23 {UTC};
GregorianYear = 1582 .. 2999 [Y] {GregorianCalendar};
STRUCTURE GregorianDate =
SUBDIVISION Month: 1 .. 12 [M];
SUBDIVISION Day: 1 .. 31 [d];
STRUCTURE GregorianDateTime EXTENDS GregorianDate =
SUBDIVISION Hours: 0 .. 23 CIRCULAR [h] {UTC};
CONTINUOUS SUBDIVISION Minutes: 0 .. 59 CIRCULAR [min];
CONTINUOUS SUBDIVISION Seconds: 0.000 .. 59.999 CIRCULAR [INTERLIS.s];
DOMAIN XMLTime = FORMAT BASED ON UTC ( Hours/2 ":" Minutes ":" Seconds );
DOMAIN XMLDate = FORMAT BASED ON GregorianDate ( Year "-" Month "-" Day );
DOMAIN XMLDateTime EXTENDS XMLDate = FORMAT BASED ON GregorianDateTime
( INHERITANCE "T" Hours/2 ":" Minutes
STRUCTURE LineSegment (ABSTRACT) =
SegmentEndPoint: MANDATORY LineCoord;
STRUCTURE StartSegment (FINAL) EXTENDS LineSegment =
STRUCTURE StraightSegment (FINAL) EXTENDS LineSegment =
STRUCTURE ArcSegment (FINAL) EXTENDS LineSegment =
ArcPoint: MANDATORY LineCoord;
Radius: NUMERIC [LENGTH];
Geometry: DIRECTED POLYLINE;
STRUCTURE SurfaceBoundary =
Lines: LIST OF SurfaceEdge;
Segments: LIST OF LineSegment;
MANDATORY CONSTRAINT isOfClass (Segments[FIRST],StartSegment);