Skip to content

Commit 54b9d62

Browse files
committed
Issue #62.
1 parent 7305c0a commit 54b9d62

28 files changed

+3154
-26
lines changed

compiler/src/main/java/org/hisrc/jsonix/xml/xsom/MultiplicityCounterNG.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.hisrc.jsonix.xml.xsom;
22

33
import static com.sun.tools.xjc.model.Multiplicity.ONE;
4+
import static com.sun.tools.xjc.model.Multiplicity.ZERO;
45

56
import java.math.BigInteger;
67

@@ -61,6 +62,10 @@ public Multiplicity modelGroup(XSModelGroup group) {
6162
r = Multiplicity.group(r, m);
6263
}
6364
}
65+
if (r == null)
66+
{
67+
return ZERO;
68+
}
6469
return r;
6570
}
6671

tests/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<module>filter</module>
1313
<module>wps</module>
1414
<module>zero</module>
15+
<module>reqif</module>
1516
</modules>
1617
<build>
1718
<pluginManagement>

tests/reqif/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
target
1+
/target/
2+
.classpath
3+
.project
4+
.settings

tests/reqif/pom.xml

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22
<modelVersion>4.0.0</modelVersion>
3-
<artifactId>jsonix-schema-compiler-test-filter</artifactId>
3+
<artifactId>jsonix-schema-compiler-test-reqif</artifactId>
44
<packaging>jar</packaging>
55
<name>Jsonix Schema Compiler Test [reqif]</name>
66
<parent>
@@ -9,56 +9,47 @@
99
<version>2.3.8-SNAPSHOT</version>
1010
</parent>
1111
<dependencies>
12+
<dependency>
13+
<groupId>org.hisrc.jsonix</groupId>
14+
<artifactId>jsonix-scripts</artifactId>
15+
</dependency>
1216
<dependency>
1317
<groupId>org.jvnet.jaxb2_commons</groupId>
1418
<artifactId>jaxb2-basics-runtime</artifactId>
1519
</dependency>
1620
<dependency>
1721
<groupId>org.hisrc.jsonix</groupId>
18-
<artifactId>jsonix-scripts</artifactId>
22+
<artifactId>jsonix-schema-compiler</artifactId>
23+
<version>${project.version}</version>
24+
<scope>test</scope>
1925
</dependency>
2026
<dependency>
2127
<groupId>org.glassfish.jaxb</groupId>
2228
<artifactId>jaxb-runtime</artifactId>
2329
<scope>provided</scope>
2430
</dependency>
31+
<dependency>
32+
<groupId>org.jvnet.jaxb2.maven2</groupId>
33+
<artifactId>maven-jaxb2-plugin-testing</artifactId>
34+
<version>${maven-jaxb2-plugin.version}</version>
35+
<scope>test</scope>
36+
</dependency>
2537
</dependencies>
2638
<build>
27-
<resources>
28-
<resource>
29-
<directory>src/main/resources</directory>
30-
</resource>
31-
<resource>
32-
<directory>src/main/javascript</directory>
33-
</resource>
34-
<resource>
35-
<directory>target/generated-sources/xjc</directory>
36-
<includes>
37-
<include>META-INF/**/*.*</include>
38-
<include>**/*.js</include>
39-
</includes>
40-
</resource>
41-
</resources>
42-
<testResources>
43-
<testResource>
44-
<directory>src/test/resources</directory>
45-
</testResource>
46-
<testResource>
47-
<directory>src/test/javascript</directory>
48-
</testResource>
49-
</testResources>
5039
<plugins>
5140
<plugin>
5241
<groupId>org.jvnet.jaxb2.maven2</groupId>
5342
<artifactId>maven-jaxb2-plugin</artifactId>
5443
<configuration>
5544
<strict>false</strict>
5645
<extension>true</extension>
46+
<schemaIncludes/>
5747
<schemas>
5848
<schema>
5949
<url>http://www.omg.org/spec/ReqIF/20110401/reqif.xsd</url>
6050
</schema>
6151
</schemas>
52+
<catalog>src/main/resources/catalog.cat</catalog>
6253
<args>
6354
<arg>-XtoString</arg>
6455
<arg>-Xequals</arg>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REWRITE_SYSTEM "http://www.omg.org" "www.omg.org"
2+
REWRITE_SYSTEM "http://www.w3.org" "www.w3.org"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
2+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:jsonix="http://jsonix.highsource.org/customizations"
4+
jaxb:extensionBindingPrefixes="jsonix">
5+
6+
<jaxb:bindings
7+
schemaLocation="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
8+
node="/xs:schema">
9+
10+
<jaxb:schemaBindings>
11+
<jaxb:package name="org.omg.spec.reqif.v_20110401"/>
12+
</jaxb:schemaBindings>
13+
14+
<jsonix:mapping package="org.omg.spec.reqif.v_20110401" name="ReqIF_20110401"/>
15+
16+
<jaxb:bindings node="xs:complexType[@name='SPECIFICATION']/xs:all/xs:element[@name='TYPE']/xs:complexType">
17+
<jaxb:factoryMethod name="SpecificationTypeElement"/>
18+
</jaxb:bindings>
19+
20+
<jaxb:bindings node="xs:complexType[@name='SPEC-RELATION']/xs:all/xs:element[@name='TYPE']/xs:complexType">
21+
<jaxb:factoryMethod name="SpecRelationTypeElement"/>
22+
</jaxb:bindings>
23+
24+
<jaxb:bindings node="xs:complexType[@name='SPEC-OBJECT']/xs:all/xs:element[@name='TYPE']/xs:complexType">
25+
<jaxb:factoryMethod name="SpecObjectTypeElement"/>
26+
</jaxb:bindings>
27+
28+
<jaxb:bindings node="xs:complexType[@name='RELATION-GROUP']/xs:all/xs:element[@name='TYPE']/xs:complexType">
29+
<jaxb:factoryMethod name="RelationGroupTypeElement"/>
30+
</jaxb:bindings>
31+
32+
</jaxb:bindings>
33+
34+
<jaxb:bindings
35+
schemaLocation="http://www.omg.org/spec/ReqIF/20110402/driver.xsd"
36+
node="/xs:schema">
37+
38+
<jaxb:schemaBindings>
39+
<jaxb:package name="org.omg.spec.reqif.v_20110402.driver"/>
40+
</jaxb:schemaBindings>
41+
42+
<jsonix:mapping package="org.omg.spec.reqif.v_20110402.driver" name="ReqIF_20110402_Driver"/>
43+
</jaxb:bindings>
44+
45+
46+
</jaxb:bindings>

0 commit comments

Comments
 (0)