Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HML XSD to version 1.0.2. #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion hml/HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
6 changes: 3 additions & 3 deletions hml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -89,8 +89,8 @@
<configuration>
<xsdOptions>
<xsdOption>
<xsd>src/main/xsd/hml-1.0.1.xsd</xsd>
<bindingFile>src/main/xsd/hml-1.0.1.xjb</bindingFile>
<xsd>src/main/xsd/hml-1.0.2.xsd</xsd>
<bindingFile>src/main/xsd/hml-1.0.2.xjb</bindingFile>
<extension>true</extension>
</xsdOption>
</xsdOptions>
Expand Down
4 changes: 2 additions & 2 deletions hml/src/main/java/org/nmdp/ngs/hml/HmlReader.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -77,7 +77,7 @@ public static Hml read(final Reader reader) throws IOException {
JAXBContext context = JAXBContext.newInstance(Hml.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
URL schemaURL = HmlReader.class.getResource("/org/nmdp/ngs/hml/xsd/hml-1.0.1.xsd");
URL schemaURL = HmlReader.class.getResource("/org/nmdp/ngs/hml/xsd/hml-1.0.2.xsd");
Schema schema = schemaFactory.newSchema(schemaURL);
unmarshaller.setSchema(schema);
return (Hml) unmarshaller.unmarshal(reader);
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/HmlValidationRule.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/HmlValidator.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
4 changes: 2 additions & 2 deletions hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -75,7 +75,7 @@ public static void write(final Hml data, final Writer writer) throws IOException
JAXBContext context = JAXBContext.newInstance(Hml.class);
Marshaller marshaller = context.createMarshaller();
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
URL schemaURL = HmlReader.class.getResource("/org/nmdp/ngs/hml/xsd/hml-1.0.1.xsd");
URL schemaURL = HmlReader.class.getResource("/org/nmdp/ngs/hml/xsd/hml-1.0.2.xsd");
Schema schema = schemaFactory.newSchema(schemaURL);
marshaller.setSchema(schema);
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/jaxb/package-info.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/package-info.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/rules/MiringModule.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
2 changes: 1 addition & 1 deletion hml/src/main/java/org/nmdp/ngs/hml/rules/package-info.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*

ngs-hml Mapping for HML XSDs.
Copyright (c) 2014-2015 National Marrow Donor Program (NMDP)
Copyright (c) 2014-2017 National Marrow Donor Program (NMDP)

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

-->
<xs:schema
xmlns="http://schemas.nmdp.org/spec/hml/1.0.1"
xmlns:hmlns="http://schemas.nmdp.org/spec/hml/1.0.1"
xmlns="http://schemas.nmdp.org/spec/hml/1.0"
xmlns:hmlns="http://schemas.nmdp.org/spec/hml/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="http://schemas.nmdp.org/spec/hml/1.0.1"
version="1.0.1">
targetNamespace="http://schemas.nmdp.org/spec/hml/1.0"
version="1.0.2">

<!-- HML document root -->
<xs:element name="hml" id="hml" nillable="false">
Expand Down Expand Up @@ -59,7 +59,8 @@
</xs:sequence>
<xs:attribute name="version" use="required">
<xs:annotation><xs:documentation>
Expected to be '1.0.1' to use this version of the HML schema.
Expected to be a '1.0.x' version like '1.0.2' to use this version of the HML schema.
HML 1.0.2 released March 2016.
</xs:documentation></xs:annotation>
<xs:simpleType id="version">
<xs:restriction base="xs:string">
Expand All @@ -79,42 +80,6 @@
</xs:element>


<!-- REPORTING-CENTER -->
<xs:element name="reporting-center" id="reporting-center">
<xs:annotation><xs:documentation>
This element identifies the entity/organization sending this HML data.
If included, must contain a unique ID identifying the sender as well as
a context which defines to whom the ID is meaningful or the source
of the ID.
This element is required for NMDP transactions and if context is not
included, is assumed to be "NMDP".

Attributes:
-----------
- reporting-center-id: (required) Unique id of reporting center
like "789".
- reporting-center-context: (optional) Source of the reporting center ID
like "NMDP". To whom the ID is meaningful.
</xs:documentation></xs:annotation>
<xs:complexType>
<xs:attribute name="reporting-center-id" use="required" >
<xs:simpleType>
<xs:restriction base="xs:string" >
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="reporting-center-context" use="optional" default="NMDP">
<xs:simpleType>
<xs:restriction base="xs:string" >
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>


<!-- HMLID -->
<xs:complexType name="hmlid">
<xs:annotation><xs:documentation>
Expand All @@ -132,9 +97,16 @@
-----------
- root: Unique publicly registered identifier for the HML
creator's organization.
(ex: NMDP HL7 id is "2.16.840.1.113883.3.1470")
Format is expected to be a string of digits and dot
delimiters. (required)
Examples:

HL7: NMDP HL7 id is "2.16.840.1.113883.3.1470"
<hmlid root="2.16.840.1.113883.3.1470" extension="20160316-testrun001" />

UUID:
<hmlid root="b044f879-f10b-4942-b8e6-e00e42d57fbe" />

Root format is expected to be a string of digits with
dot or dash delimiters. (required)
- extension: A unique document identifier managed internally by the
organization specified in 'root'. Can be any alpha-numeric
format desired by the organization. (ex: "hml-0.9.7-123456789.23a")
Expand All @@ -154,10 +126,11 @@
<xs:annotation><xs:documentation>
Unique publicly registered identifier for the HML creator's organization.
This can be an HL7 compliant field (ex: NMDP is "2.16.840.1.113883.3.1470")
Format is expected to be a string of digits and dot delimiters. (required)
The format can also be a UUID like "5177ec14-495b-4fea-a8fc-de1311f241cd".
Format is expected to be a string of digits and dot or hyphen delimiters. (required)
</xs:documentation></xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="([0-9\.])+" />
<xs:pattern value="([0-9a-zA-Z\.\-])+" />
</xs:restriction>
</xs:simpleType>

Expand All @@ -177,6 +150,42 @@
</xs:simpleType>


<!-- REPORTING-CENTER -->
<xs:element name="reporting-center" id="reporting-center">
<xs:annotation><xs:documentation>
This element identifies the entity/organization sending this HML data.
If included, must contain a unique ID identifying the sender as well as
a context which defines to whom the ID is meaningful or the source
of the ID.
This element is required for NMDP transactions and if context is not
included, is assumed to be "NMDP".

Attributes:
-----------
- reporting-center-id: (required) Unique id of reporting center
like "789".
- reporting-center-context: (optional) Source of the reporting center ID
like "NMDP". To whom the ID is meaningful.
</xs:documentation></xs:annotation>
<xs:complexType>
<xs:attribute name="reporting-center-id" use="required" >
<xs:simpleType>
<xs:restriction base="xs:string" >
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="reporting-center-context" use="optional" default="NMDP">
<xs:simpleType>
<xs:restriction base="xs:string" >
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>


<!-- TYPING-TEST-NAMES -->
<xs:complexType name="typing-test-names">
<xs:annotation><xs:documentation>
Expand Down Expand Up @@ -245,7 +254,7 @@
</xs:documentation></xs:annotation>
<xs:sequence>
<!-- Extensible letting a property have special-use child elements -->
<xs:any minOccurs="0" maxOccurs="unbounded" />
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" use="required">
<xs:simpleType>
Expand Down Expand Up @@ -754,7 +763,7 @@

Children:
---------
- amplification (required, qty: 1)
- amplification (not required, qty: 0 or 1)
- sub-amplification (not required, qty: 0 or more)
- gssp (not required, qty: 0 or more)

Expand Down Expand Up @@ -783,7 +792,7 @@
</xs:documentation></xs:annotation>
<xs:sequence>
<xs:element name="property" type="hmlns:property" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="amplification" type="hmlns:amplification" minOccurs="1" maxOccurs="1" />
<xs:element name="amplification" type="hmlns:amplification" minOccurs="0" maxOccurs="1" />
<xs:element name="sub-amplification" type="hmlns:sub-amplification" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="gssp" type="hmlns:gssp" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
Expand Down Expand Up @@ -833,9 +842,7 @@
<xs:restriction base="hmlns:sequence">
<xs:attribute name="registered-name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1" />
</xs:restriction>
<xs:restriction base="xs:string"></xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:restriction>
Expand Down Expand Up @@ -1313,7 +1320,7 @@
<!--
Genome Reference Consortium:
<reference-database ... >
<reference-sequence id="1"
<reference-sequence id="ref1"
name="HSCHR6_MHC_MCF_CTG1"
start="0"
end="4827813"
Expand All @@ -1324,7 +1331,7 @@

IMGT/HLA:
<reference-database ... >
<reference-sequence id="3"
<reference-sequence id="ref3"
name="HLA-A*01:01:01:01"
start="0"
end="3053"
Expand All @@ -1335,7 +1342,7 @@

No database reference:
<reference-database availability="none">
<reference-sequence id="0"/>
<reference-sequence id="ref0"/>
</reference-database>
-->

Expand Down Expand Up @@ -1564,8 +1571,8 @@
- paired: true/false (default) (required)
- pooled: true/false (default) (required)
- availability: public|private|permission (optional)
- adapterTrimmed: true/false (default) (required)
- qualityTrimmed: true/false (default) (required)
- adapter-trimmed: true/false (default) (required)
- quality-trimmed: true/false (default) (required)
</xs:documentation></xs:annotation>
<xs:attribute name="uri" use="required">
<xs:simpleType>
Expand Down
Loading