Skip to content

Commit

Permalink
testdata (ili-models) for the use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Jul 14, 2023
1 parent 6876553 commit 06a6b4c
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/testdata/ilimodels/Bauplanung_V1_1.ili
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
INTERLIS 2.3;

/* Bauplanung as national model importing the infrastrukture used for using geometry types and connectiong to strasse.
Having STRUCTURE and a many-to-many ASSOCIATION */
MODEL Bauplanung_V1_1 (en) AT "https://modelbaker.ch" VERSION "2023-07-13" =
IMPORTS Infrastruktur_V1;

TOPIC Konstruktionen =
OID AS INTERLIS.UUIDOID;
DEPENDS ON Infrastruktur_V1.Strassen;

DOMAIN
STRUCTURE Material =
Bezeichnung : MANDATORY TEXT;
END Material;

CLASS Gebaeude =
Name : TEXT*99;
Materialien: BAG {1..*} OF Material;
Geometrie : MANDATORY Infrastruktur_V1.CHSurface;
END Gebaeude;

/*new many-to-many association*/
ASSOCIATION Strassen_Gebaeude =
Strasse (EXTERNAL) -- {0..*} Infrastruktur_V1.Strassen.Strasse;
Gebaeude -- {0..*} Gebaeude;
END Strassen_Gebaeude;

END Konstruktionen;

END Bauplanung_V1_1.
29 changes: 29 additions & 0 deletions tests/testdata/ilimodels/Kantonale_Bauplanung_V1_1.ili
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
INTERLIS 2.3;

/* Extended Bauplanung as cantonal model importing national model.
Extending STRUCTURE and a many-to-many ASSOCIATION */
MODEL Kantonale_Bauplanung_V1_1 (en) AT "https://modelbaker.ch" VERSION "2023-07-13" =
IMPORTS Bauplanung_V1_1, Infrastruktur_V1;

TOPIC Konstruktionen EXTENDS Bauplanung_V1_1.Konstruktionen =
OID AS INTERLIS.UUIDOID;
DEPENDS ON Infrastruktur_V1.Strassen;

DOMAIN
STRUCTURE Material (EXTENDED) =
Details : MANDATORY TEXT;
END Material;

CLASS Gebaeude (EXTENDED) =
DetailMaterialien: BAG {1..*} OF Material;
END Gebaeude;

/*extension of many-to-many association */
ASSOCIATION Strassen_Gebaeude (EXTENDED) =
Strasse (EXTENDED,EXTERNAL) -- {1..*} Infrastruktur_V1.Strassen.Strasse;
Gebaeude (EXTENDED) -- {1..*} Gebaeude;
END Strassen_Gebaeude;

END Konstruktionen;

END Kantonale_Bauplanung_V1_1.
63 changes: 63 additions & 0 deletions tests/testdata/ilimodels/Polymorphic_Ortsplanung_V1_1.ili
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
INTERLIS 2.3;

/* Model to test several types of extended classes */
MODEL Polymorphic_Ortsplanung_V1_1 (en) AT "https://modelbaker.ch" VERSION "2023-07-13" =
IMPORTS Ortsplanung_V1_1,Infrastruktur_V1;

TOPIC Gewerbe EXTENDS Ortsplanung_V1_1.Konstruktionen =
OID AS INTERLIS.UUIDOID;
DEPENDS ON Infrastruktur_V1.Strassen;

CLASS Gebaeude (EXTENDED) =
Firma : TEXT*99;
END Gebaeude;

END Gewerbe;

TOPIC Freizeit EXTENDS Ortsplanung_V1_1.Konstruktionen =
OID AS INTERLIS.UUIDOID;
DEPENDS ON Infrastruktur_V1.Strassen;

CLASS Gebaeude (EXTENDED) =
Unterhaltungsart : TEXT*99;
END Gebaeude;

END Freizeit;

TOPIC IndustrieGewerbe EXTENDS Polymorphic_Ortsplanung_V1_1.Gewerbe =
OID AS INTERLIS.UUIDOID;
DEPENDS ON Infrastruktur_V1.Strassen;

CLASS Gebaeude (EXTENDED) =
Sektion : TEXT*99;
END Gebaeude;

END IndustrieGewerbe;

TOPIC Hallen EXTENDS Ortsplanung_V1_1.Konstruktionen =
OID AS INTERLIS.UUIDOID;
DEPENDS ON Infrastruktur_V1.Strassen;

CLASS Gebaeude (EXTENDED) =
Groesse : TEXT*99;
END Gebaeude;

CLASS Markthalle EXTENDS Gebaeude =
Standplaetze : 1 .. 100;
END Markthalle;

CLASS Turnhalle (ABSTRACT) EXTENDS Gebaeude =
Bodenbelag :TEXT*99;
END Turnhalle;

CLASS TurnhalleTyp1 EXTENDS Turnhalle =
AnzahlKoerbe : 1 .. 8;
END TurnhalleTyp1;

CLASS TurnhalleTyp2 EXTENDS Turnhalle =
AnzahlTore : 1 .. 8;
END TurnhalleTyp2;

END Hallen;

END Polymorphic_Ortsplanung_V1_1.

0 comments on commit 06a6b4c

Please sign in to comment.