Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,36 @@

<modules>
<module>shapechange-core</module>
<module>shapechange-ea</module>
<module>shapechange-app</module>
</modules>

<profiles>
<!--
Enterprise Architect support. Active by default, so the standard build is
unchanged. The shapechange-ea module compiles against org.sparx:eaapi, which
ships with an Enterprise Architect installation and is not available from any
public repository, so a machine or CI runner without EA cannot build it.

Building with -DskipEa leaves out that module and the dependency on it,
producing a distribution that supports every non-EA input type (SCXML, XMI,
GCSR). EA model readers and the EA database-model writer are resolved by class
name at runtime (see DefaultModelProvider and SqlDdl), so nothing in
shapechange-core or shapechange-app references them at compile time.
-->
<profile>
<id>ea</id>
<activation>
<property>
<name>!skipEa</name>
</property>
</activation>
<modules>
<module>shapechange-ea</module>
</modules>
</profile>
</profiles>


<scm>
<url>https://github.com/ShapeChange/ShapeChange</url>
<connection>scm:git:https://github.com/ShapeChange/ShapeChange.git</connection>
Expand Down
58 changes: 42 additions & 16 deletions shapechange-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
<artifactId>shapechange-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>shapechange-ea</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
Expand Down Expand Up @@ -67,17 +62,6 @@
<exclude>*.properties</exclude>
</excludes>
</resource>
<resource>
<directory>../shapechange-ea/src/main/resources</directory>
<filtering>true</filtering>
<targetPath>${project.basedir}/sc-resources</targetPath>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>*.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
Expand Down Expand Up @@ -413,4 +397,46 @@
</extension>
</extensions>
</build>
<profiles>
<!--
Enterprise Architect support; see the 'ea' profile in the parent POM. Active by
default, so the standard build is unchanged. Disabled with -DskipEa, which drops the
dependency on shapechange-ea and its EA-only resources, letting this module build
without the proprietary org.sparx:eaapi artifact that ships with an Enterprise
Architect installation. Main.java references no EA type, and EA model readers are
resolved by class name at runtime (see DefaultModelProvider), so nothing here needs
EA at compile time.
-->
<profile>
<id>ea</id>
<activation>
<property>
<name>!skipEa</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>shapechange-ea</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>../shapechange-ea/src/main/resources</directory>
<filtering>true</filtering>
<targetPath>${project.basedir}/sc-resources</targetPath>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>*.properties</exclude>
</excludes>
</resource>
</resources>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@prefix ex: <http://example.org/ontology/test#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:Road.width rdf:type owl:DatatypeProperty;
rdfs:domain ex:Road;
rdfs:range xsd:double .

ex:Road.lane rdf:type owl:ObjectProperty;
rdfs:domain ex:Road;
rdfs:range ex:Lane .

ex:Road.length rdf:type owl:DatatypeProperty;
rdfs:domain ex:Road;
rdfs:range xsd:double .

ex:Road rdf:type owl:Class;
rdfs:subClassOf [ rdf:type owl:Restriction;
owl:onClass ex:Lane;
owl:onProperty ex:Road.lane;
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
];
rdfs:subClassOf [ rdf:type owl:Restriction;
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger;
owl:onDataRange xsd:integer;
owl:onProperty ex:Road.speedLimit
];
rdfs:subClassOf [ rdf:type owl:Restriction;
owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger;
owl:onDataRange xsd:double;
owl:onProperty ex:Road.width
];
rdfs:subClassOf [ rdf:type owl:Restriction;
owl:onDataRange xsd:double;
owl:onProperty ex:Road.length;
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
] .

ex:Lane rdf:type owl:Class .

ex:Road.speedLimit rdf:type owl:DatatypeProperty;
rdfs:domain ex:Road;
rdfs:range xsd:integer .

<http://example.org/ontology/test>
rdf:type owl:Ontology .
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<ShapeChangeConfiguration xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1"
xmlns:sc="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1 ../../../../sc-resources/schema/ShapeChangeConfiguration.xsd">
<input id="INPUT">
<parameter name="inputModelType" value="EA7" />
<parameter name="inputFile"
value="src/integrationtests/owl/qualifiedCardinalityRestrictions/test_qualifiedCardinalityRestrictions.qea" />
<parameter name="appSchemaName" value="Test Schema" />
<parameter name="publicOnly" value="true" />
<parameter name="checkingConstraints" value="disabled" />
<parameter name="sortedSchemaOutput" value="true" />
<xi:include href="sc-resources/config/StandardAliases.xml" />
</input>
<log>
<parameter name="reportLevel" value="INFO" />
<parameter name="logFile"
value="testResults/owl/qualifiedCardinalityRestrictions/log.xml" />
</log>
<targets>
<TargetOwl inputs="INPUT"
class="de.interactive_instruments.shapechange.core.target.ontology.OWLISO19150"
mode="enabled">
<targetParameter name="outputDirectory"
value="testResults/owl/qualifiedCardinalityRestrictions/owl" />
<targetParameter name="outputFormat" value="turtle" />
<targetParameter name="sortedOutput" value="true" />
<targetParameter name="defaultEncodingRule" value="MyRule" />
<targetParameter name="language" value="en" />
<targetParameter name="defaultTypeImplementation" value="owl:Class" />
<targetParameter name="ontologyNameCode" value="test" />
<targetParameter name="source" value="Test ontology" />
<targetParameter name="URIbase" value="http://example.org/ontology" />

<xi:include href="sc-resources/config/StandardMapEntries-owl.xml" />
<xi:include href="sc-resources/config/StandardNamespaces-owl.xml" />

<rules>
<EncodingRule name="MyRule" extends="*">
<rule name="rule-owl-pkg-singleOntologyPerSchema" />
<rule name="rule-owl-pkg-ontologyName-code" />
<rule name="rule-owl-cls-encode-featuretypes" />
<rule name="rule-owl-prop-general" />
<rule name="rule-owl-prop-range-global" />
<rule name="rule-owl-prop-multiplicityAsQualifiedCardinalityRestriction" />
</EncodingRule>
</rules>
</TargetOwl>
</targets>
</ShapeChangeConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?><ShapeChangeConfiguration xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1 ../../../../sc-resources/schema/ShapeChangeConfiguration.xsd">
<input id="INPUT">
<parameter name="inputModelType" value="SCXML"/>
<parameter name="inputFile" value="src/integrationtests/owl/qualifiedCardinalityRestrictions/test_qualifiedCardinalityRestrictions.zip"/>
<parameter name="appSchemaName" value="Test Schema"/>
<parameter name="publicOnly" value="true"/>
<parameter name="checkingConstraints" value="disabled"/>
<parameter name="sortedSchemaOutput" value="true"/>
<stereotypeAliases xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">


<StereotypeAlias alias="applicationSchema" wellknown="Application Schema"/>
<StereotypeAlias alias="requirementsClass" wellknown="Application Schema"/>
<StereotypeAlias alias="bundle" wellknown=""/>
<StereotypeAlias alias="leaf" wellknown=""/>

<StereotypeAlias alias="abstract" wellknown=""/>
<StereotypeAlias alias="conceptScheme" wellknown="CodeList"/>
<StereotypeAlias alias="vocabulary" wellknown="CodeList"/>
<StereotypeAlias alias="request" wellknown="DataType"/>
<StereotypeAlias alias="response" wellknown="DataType"/>
<StereotypeAlias alias="feature" wellknown="FeatureType"/>
<StereotypeAlias alias="interface" wellknown="Type"/>
<StereotypeAlias alias="attributeValueConcept" wellknown="valueConcept"/>

<StereotypeAlias alias="property" wellknown=""/>
<StereotypeAlias alias="enum" wellknown=""/>
</stereotypeAliases>
</input>
<log>
<parameter name="reportLevel" value="INFO"/>
<parameter name="logFile" value="testResults/owl/qualifiedCardinalityRestrictions/log.xml"/>
</log>
<targets>
<TargetOwl class="de.interactive_instruments.shapechange.core.target.ontology.OWLISO19150" inputs="INPUT" mode="enabled">
<targetParameter name="outputDirectory" value="testResults/owl/qualifiedCardinalityRestrictions/owl"/>
<targetParameter name="outputFormat" value="turtle"/>
<targetParameter name="sortedOutput" value="true"/>
<targetParameter name="defaultEncodingRule" value="MyRule"/>
<targetParameter name="language" value="en"/>
<targetParameter name="defaultTypeImplementation" value="owl:Class"/>
<targetParameter name="ontologyNameCode" value="test"/>
<targetParameter name="source" value="Test ontology"/>
<targetParameter name="URIbase" value="http://example.org/ontology"/>

<rdfMapEntries xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1" xmlns:xi="http://www.w3.org/2001/XInclude">
<rdfMapEntries xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">


<RdfTypeMapEntry target="xsd:string" targetType="datatype" type="CharacterString"/>
<RdfTypeMapEntry target="xsd:date" targetType="datatype" type="Date"/>
<RdfTypeMapEntry target="xsd:dateTime" targetType="datatype" type="DateTime"/>
<RdfTypeMapEntry target="xsd:integer" targetType="datatype" type="Integer"/>
<RdfTypeMapEntry target="xsd:double" targetType="datatype" type="Decimal"/>
<RdfTypeMapEntry target="xsd:double" targetType="datatype" type="Real"/>
<RdfTypeMapEntry target="xsd:boolean" targetType="datatype" type="Boolean"/>
<RdfTypeMapEntry target="xsd:Name" targetType="datatype" type="GenericName"/>
<RdfTypeMapEntry target="xsd:NCName" targetType="datatype" type="LocalName"/>
<RdfTypeMapEntry target="rdfs:Resource" type="ScopedName"/>
<RdfTypeMapEntry target="xsd:NCName" targetType="datatype" type="TypeName"/>
<RdfTypeMapEntry target="xsd:Name" targetType="datatype" type="MemberName"/>

<RdfTypeMapEntry target="xsd:string" targetType="datatype" type="Character"/>
<RdfTypeMapEntry target="xsd:double" targetType="datatype" type="Number"/>
<RdfTypeMapEntry target="xsd:time" targetType="datatype" type="ClockTime"/>
<RdfTypeMapEntry target="xsd:boolean" targetType="datatype" type="Bit"/>

<RdfTypeMapEntry target="xsd:anyURI" targetType="datatype" type="URI"/>
<RdfTypeMapEntry target="xsd:time" targetType="datatype" type="Time"/>


<RdfTypeMapEntry target="sc:Measure" targetType="datatype" type="Measure"/>
<RdfTypeMapEntry target="sc:Measure" targetType="datatype" type="Length"/>
<RdfTypeMapEntry target="sc:Measure" targetType="datatype" type="Distance"/>
<RdfTypeMapEntry target="sc:Measure" targetType="datatype" type="Area"/>
<RdfTypeMapEntry target="sc:Measure" targetType="datatype" type="Volume"/>
<RdfTypeMapEntry target="sc:Measure" targetType="datatype" type="Velocity"/>

<RdfTypeMapEntry target="owl:Class" targetType="class" type="Any"/>


</rdfMapEntries>
<rdfMapEntries xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">
<RdfTypeMapEntry target="sc:Sign" targetType="datatype" type="Sign"/>

</rdfMapEntries>
<rdfMapEntries xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">

<RdfTypeMapEntry target="gsp:Geometry" type="DirectPosition"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Object"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Point"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Curve"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Surface"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Solid"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_MultiPoint"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_MultiCurve"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_MultiSurface"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_MultiSolid"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Aggregate"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_CompositePoint"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_CompositeCurve"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_CompositeSurface"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_CompositeSolid"/>
<RdfTypeMapEntry target="gsp:Geometry" type="GM_Complex"/>




</rdfMapEntries>
<rdfMapEntries xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">

</rdfMapEntries>
<rdfMapEntries xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">
<RdfTypeMapEntry target="gsp:Feature" type="GFI_Feature"/>

</rdfMapEntries>

</rdfMapEntries>
<namespaces xmlns="http://www.interactive-instruments.de/ShapeChange/Configuration/1.1">
<Namespace ns="http://www.w3.org/2001/XMLSchema#" nsabr="xsd"/>
<Namespace ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" nsabr="rdf"/>
<Namespace ns="http://www.w3.org/2000/01/rdf-schema#" nsabr="rdfs"/>
<Namespace ns="http://www.w3.org/2002/07/owl#" nsabr="owl"/>
<Namespace ns="http://purl.org/dc/elements/1.1/" nsabr="dc"/>
<Namespace location="https://www.w3.org/ns/dcat.ttl" ns="http://www.w3.org/ns/dcat#" nsabr="dcat"/>
<Namespace ns="http://www.w3.org/ns/prov#" nsabr="prov"/>
<Namespace location="http://www.w3.org/2004/02/skos/core" ns="http://www.w3.org/2004/02/skos/core#" nsabr="skos"/>
<Namespace location="http://def.isotc211.org/iso19150/-2/2012/base" ns="http://def.isotc211.org/iso19150/-2/2012/base#" nsabr="iso19150-2"/>
<Namespace location="http://www.opengis.net/ont/geosparql" ns="http://www.opengis.net/ont/geosparql#" nsabr="gsp"/>
<Namespace location="http://www.opengis.net/ont/sf" ns="http://www.opengis.net/ont/sf#" nsabr="sfowl"/>
<Namespace location="http://www.opengis.net/ont/gml" ns="http://www.opengis.net/ont/gml#" nsabr="gmlowl"/>
<Namespace location="http://shapechange.net/resources/ont/base" ns="http://shapechange.net/resources/ont/base#" nsabr="sc"/>
<Namespace location="http://def.isotc211.org/iso19109/2013/GeneralFeatureModel" ns="http://def.isotc211.org/iso19109/2013/GeneralFeatureModel#" nsabr="gfm"/>
<Namespace location="https://www.w3.org/ns/locn.ttl" ns="https://www.w3.org/ns/locn#" nsabr="locn"/>
<Namespace location="www.w3.org/2006/time" ns="http://www.w3.org/2006/time#" nsabr="time"/>
</namespaces>

<rules>
<EncodingRule extends="*" name="MyRule">
<rule name="rule-owl-pkg-singleOntologyPerSchema"/>
<rule name="rule-owl-pkg-ontologyName-code"/>
<rule name="rule-owl-cls-encode-featuretypes"/>
<rule name="rule-owl-prop-general"/>
<rule name="rule-owl-prop-range-global"/>
<rule name="rule-owl-prop-multiplicityAsQualifiedCardinalityRestriction"/>
</EncodingRule>
</rules>
</TargetOwl>
</targets>
</ShapeChangeConfiguration>
Binary file not shown.
Binary file not shown.
Loading