From 73763f8d209523fbf84e4a10d2572dbebdcf2e40 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Fri, 1 Mar 2024 16:45:02 +0100 Subject: [PATCH] first draft Issue #339 --- .../XSDClasspathResourceResolver.java | 20 + .../bpmn/validation/XSDLSInputImpl.java | 87 + .../bpmn/validation/XSDValidator.java | 54 + .../src/main/resources/BPMN20.xsd | 39 + .../src/main/resources/BPMNDI.xsd | 100 ++ open-bpmn.metamodel/src/main/resources/DC.xsd | 29 + open-bpmn.metamodel/src/main/resources/DI.xsd | 100 ++ .../src/main/resources/Semantic.xsd | 1559 +++++++++++++++++ .../dom/ClasspathResourceResolver.java | 20 + .../java/org/openbpmn/dom/LSInputImpl.java | 88 + .../java/org/openbpmn/dom/TestValidate.java | 117 ++ .../src/test/resources/BPMN20.xsd | 39 + .../src/test/resources/BPMNDI.xsd | 100 ++ open-bpmn.metamodel/src/test/resources/DC.xsd | 29 + open-bpmn.metamodel/src/test/resources/DI.xsd | 100 ++ .../src/test/resources/Semantic.xsd | 1559 +++++++++++++++++ .../src/test/resources/xsd/BPMN20.xsd | 39 + .../src/test/resources/xsd/BPMNDI.xsd | 100 ++ .../src/test/resources/xsd/DC.xsd | 29 + .../src/test/resources/xsd/DI.xsd | 100 ++ .../src/test/resources/xsd/Semantic.xsd | 1559 +++++++++++++++++ .../src/test/resources/xsd/test-01.bpmn | 57 + 22 files changed, 5924 insertions(+) create mode 100644 open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDClasspathResourceResolver.java create mode 100644 open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDLSInputImpl.java create mode 100644 open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDValidator.java create mode 100644 open-bpmn.metamodel/src/main/resources/BPMN20.xsd create mode 100644 open-bpmn.metamodel/src/main/resources/BPMNDI.xsd create mode 100644 open-bpmn.metamodel/src/main/resources/DC.xsd create mode 100644 open-bpmn.metamodel/src/main/resources/DI.xsd create mode 100644 open-bpmn.metamodel/src/main/resources/Semantic.xsd create mode 100644 open-bpmn.metamodel/src/test/java/org/openbpmn/dom/ClasspathResourceResolver.java create mode 100644 open-bpmn.metamodel/src/test/java/org/openbpmn/dom/LSInputImpl.java create mode 100644 open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestValidate.java create mode 100644 open-bpmn.metamodel/src/test/resources/BPMN20.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/BPMNDI.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/DC.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/DI.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/Semantic.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/xsd/BPMN20.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/xsd/BPMNDI.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/xsd/DC.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/xsd/DI.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/xsd/Semantic.xsd create mode 100644 open-bpmn.metamodel/src/test/resources/xsd/test-01.bpmn diff --git a/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDClasspathResourceResolver.java b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDClasspathResourceResolver.java new file mode 100644 index 00000000..72b66d29 --- /dev/null +++ b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDClasspathResourceResolver.java @@ -0,0 +1,20 @@ +package org.openbpmn.bpmn.validation; + +import java.io.InputStream; +import java.io.InputStreamReader; + +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSResourceResolver; + +public class XSDClasspathResourceResolver implements LSResourceResolver { + @Override + public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) { + XSDLSInputImpl input = new XSDLSInputImpl(); + InputStream stream = getClass().getClassLoader().getResourceAsStream(systemId); + input.setPublicId(publicId); + input.setSystemId(systemId); + input.setBaseURI(baseURI); + input.setCharacterStream(new InputStreamReader(stream)); + return input; + } +} \ No newline at end of file diff --git a/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDLSInputImpl.java b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDLSInputImpl.java new file mode 100644 index 00000000..657d3077 --- /dev/null +++ b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDLSInputImpl.java @@ -0,0 +1,87 @@ +package org.openbpmn.bpmn.validation; + +import java.io.InputStream; +import java.io.Reader; + +import org.w3c.dom.ls.LSInput; + +public class XSDLSInputImpl implements LSInput { + private Reader characterStream; + private InputStream byteStream; + private String stringData; + private String systemId; + private String publicId; + private String baseURI; + private String encoding; + private boolean certifiedText; + + // Getters and setters here + public Reader getCharacterStream() { + return characterStream; + } + + public void setCharacterStream(Reader characterStream) { + this.characterStream = characterStream; + } + + public InputStream getByteStream() { + return byteStream; + } + + public void setByteStream(InputStream byteStream) { + this.byteStream = byteStream; + } + + public String getStringData() { + return stringData; + } + + public void setStringData(String stringData) { + this.stringData = stringData; + } + + public String getSystemId() { + return systemId; + } + + public void setSystemId(String systemId) { + this.systemId = systemId; + } + + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + + public String getBaseURI() { + return baseURI; + } + + public void setBaseURI(String baseURI) { + this.baseURI = baseURI; + } + + public String getEncoding() { + return encoding; + } + + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + public boolean isCertifiedText() { + return certifiedText; + } + + public void setCertifiedText(boolean certifiedText) { + this.certifiedText = certifiedText; + } + + @Override + public boolean getCertifiedText() { + throw new UnsupportedOperationException("Unimplemented method 'getCertifiedText'"); + } +} diff --git a/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDValidator.java b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDValidator.java new file mode 100644 index 00000000..51ce0672 --- /dev/null +++ b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/validation/XSDValidator.java @@ -0,0 +1,54 @@ +package org.openbpmn.bpmn.validation; + +import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Logger; + +import javax.xml.XMLConstants; +import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; + +import org.xml.sax.SAXException; + +public class XSDValidator { + private static Logger logger = Logger.getLogger(XSDValidator.class.getName()); + + public boolean validate(String xmlFilePath) throws SAXException, IOException { + + // Path to the XSD files + String xsdFilePath1 = "/BPMN20.xsd"; + + InputStream xmlInputStream = getClass().getResourceAsStream(xmlFilePath); + InputStream xsdInputStream1 = getClass().getResourceAsStream(xsdFilePath1); + + if (xmlInputStream == null || xsdInputStream1 == null) { + + } + logger.info("...validate model..."); + + // create SchemaFactory + + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + schemaFactory.setResourceResolver(new XSDClasspathResourceResolver()); + + // Lade die XSD-Dateien in ein Schema + Schema schema = schemaFactory.newSchema(new Source[] { + new StreamSource(xsdInputStream1) + }); + + // Erstelle einen Validator aus dem Schema + Validator validator = schema.newValidator(); + + // Validiere die XML-Datei + validator.validate(new StreamSource(xmlInputStream)); + + System.out.println("Validation successful."); + + logger.info("...validation completed"); + return true; + } + +} diff --git a/open-bpmn.metamodel/src/main/resources/BPMN20.xsd b/open-bpmn.metamodel/src/main/resources/BPMN20.xsd new file mode 100644 index 00000000..4d811106 --- /dev/null +++ b/open-bpmn.metamodel/src/main/resources/BPMN20.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/main/resources/BPMNDI.xsd b/open-bpmn.metamodel/src/main/resources/BPMNDI.xsd new file mode 100644 index 00000000..75e2995f --- /dev/null +++ b/open-bpmn.metamodel/src/main/resources/BPMNDI.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/main/resources/DC.xsd b/open-bpmn.metamodel/src/main/resources/DC.xsd new file mode 100644 index 00000000..8b622c33 --- /dev/null +++ b/open-bpmn.metamodel/src/main/resources/DC.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/main/resources/DI.xsd b/open-bpmn.metamodel/src/main/resources/DI.xsd new file mode 100644 index 00000000..aa985889 --- /dev/null +++ b/open-bpmn.metamodel/src/main/resources/DI.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/main/resources/Semantic.xsd b/open-bpmn.metamodel/src/main/resources/Semantic.xsd new file mode 100644 index 00000000..6d380b33 --- /dev/null +++ b/open-bpmn.metamodel/src/main/resources/Semantic.xsd @@ -0,0 +1,1559 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/ClasspathResourceResolver.java b/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/ClasspathResourceResolver.java new file mode 100644 index 00000000..7118f0e9 --- /dev/null +++ b/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/ClasspathResourceResolver.java @@ -0,0 +1,20 @@ +package org.openbpmn.dom; + +import java.io.InputStream; +import java.io.InputStreamReader; + +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSResourceResolver; + +public class ClasspathResourceResolver implements LSResourceResolver { + @Override + public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) { + LSInputImpl input = new LSInputImpl(); + InputStream stream = getClass().getClassLoader().getResourceAsStream(systemId); + input.setPublicId(publicId); + input.setSystemId(systemId); + input.setBaseURI(baseURI); + input.setCharacterStream(new InputStreamReader(stream)); + return input; + } +} \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/LSInputImpl.java b/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/LSInputImpl.java new file mode 100644 index 00000000..5d43a692 --- /dev/null +++ b/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/LSInputImpl.java @@ -0,0 +1,88 @@ +package org.openbpmn.dom; + +import java.io.InputStream; +import java.io.Reader; + +import org.w3c.dom.ls.LSInput; + +public class LSInputImpl implements LSInput { + private Reader characterStream; + private InputStream byteStream; + private String stringData; + private String systemId; + private String publicId; + private String baseURI; + private String encoding; + private boolean certifiedText; + + // Getters and setters here + public Reader getCharacterStream() { + return characterStream; + } + + public void setCharacterStream(Reader characterStream) { + this.characterStream = characterStream; + } + + public InputStream getByteStream() { + return byteStream; + } + + public void setByteStream(InputStream byteStream) { + this.byteStream = byteStream; + } + + public String getStringData() { + return stringData; + } + + public void setStringData(String stringData) { + this.stringData = stringData; + } + + public String getSystemId() { + return systemId; + } + + public void setSystemId(String systemId) { + this.systemId = systemId; + } + + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + + public String getBaseURI() { + return baseURI; + } + + public void setBaseURI(String baseURI) { + this.baseURI = baseURI; + } + + public String getEncoding() { + return encoding; + } + + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + public boolean isCertifiedText() { + return certifiedText; + } + + public void setCertifiedText(boolean certifiedText) { + this.certifiedText = certifiedText; + } + + @Override + public boolean getCertifiedText() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getCertifiedText'"); + } +} \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestValidate.java b/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestValidate.java new file mode 100644 index 00000000..855ca103 --- /dev/null +++ b/open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestValidate.java @@ -0,0 +1,117 @@ +package org.openbpmn.dom; + +import static org.junit.jupiter.api.Assertions.fail; + +import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Logger; + +import javax.xml.XMLConstants; +import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; + +import org.junit.jupiter.api.Test; +import org.openbpmn.bpmn.exceptions.BPMNModelException; +import org.openbpmn.bpmn.validation.XSDValidator; +import org.xml.sax.SAXException; + +/** + * This test class reads and validates a bpmn file against the XSD schemata. + * + * See also + * + * https://stackoverflow.com/questions/2342808/how-to-validate-an-xml-file-using-java-with-an-xsd-having-an-include + * + * https://blog.frankel.ch/xml-validation-with-importedincluded-schemas/ + * + * @author rsoika + * + */ +public class TestValidate { + + private static Logger logger = Logger.getLogger(TestValidate.class.getName()); + + /** + * This test parses a bpmn file + * + * @throws BPMNModelException + */ + @Test + public void testReadEmptyModel() throws BPMNModelException { + // Path to the XML file you want to validate + String xmlFilePath = "/xsd/test-01.bpmn"; + + // Path to the XSD files + String xsdFilePath1 = "/xsd/BPMN20.xsd"; + + InputStream xmlInputStream = getClass().getResourceAsStream(xmlFilePath); + InputStream xsdInputStream1 = getClass().getResourceAsStream(xsdFilePath1); + + if (xmlInputStream == null || xsdInputStream1 == null) { + fail("Failed to load test resources."); + } + logger.info("...validate model..."); + + try { + // create SchemaFactory + + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + schemaFactory.setResourceResolver(new ClasspathResourceResolver()); + + // Lade die XSD-Dateien in ein Schema + Schema schema = schemaFactory.newSchema(new Source[] { + new StreamSource(xsdInputStream1) + }); + + // Erstelle einen Validator aus dem Schema + Validator validator = schema.newValidator(); + + // Validiere die XML-Datei + validator.validate(new StreamSource(xmlInputStream)); + + System.out.println("Validation successful."); + + } catch (SAXException | IOException e) { + System.err.println("Validation failed: " + e.getMessage()); + e.printStackTrace(); + fail(); + } + + logger.info("...validation completed"); + } + + /** + * Test the XSDValidator + * + * @throws BPMNModelException + */ + @Test + public void testXSDValidator() throws BPMNModelException { + // Path to the XML file you want to validate + String xmlFilePath = "/xsd/test-01.bpmn"; + + try { + + XSDValidator xsdValidator = new XSDValidator(); + + boolean result = xsdValidator.validate(xmlFilePath); + + if (result) { + System.out.println("Validation successful."); + } else { + fail(); + } + + } catch (SAXException | IOException e) { + System.err.println("Validation failed: " + e.getMessage()); + e.printStackTrace(); + fail(); + } + + logger.info("...validation completed"); + } + +} diff --git a/open-bpmn.metamodel/src/test/resources/BPMN20.xsd b/open-bpmn.metamodel/src/test/resources/BPMN20.xsd new file mode 100644 index 00000000..4d811106 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/BPMN20.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/BPMNDI.xsd b/open-bpmn.metamodel/src/test/resources/BPMNDI.xsd new file mode 100644 index 00000000..75e2995f --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/BPMNDI.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/DC.xsd b/open-bpmn.metamodel/src/test/resources/DC.xsd new file mode 100644 index 00000000..8b622c33 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/DC.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/DI.xsd b/open-bpmn.metamodel/src/test/resources/DI.xsd new file mode 100644 index 00000000..aa985889 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/DI.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/Semantic.xsd b/open-bpmn.metamodel/src/test/resources/Semantic.xsd new file mode 100644 index 00000000..6d380b33 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/Semantic.xsd @@ -0,0 +1,1559 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/xsd/BPMN20.xsd b/open-bpmn.metamodel/src/test/resources/xsd/BPMN20.xsd new file mode 100644 index 00000000..4d811106 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/xsd/BPMN20.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/xsd/BPMNDI.xsd b/open-bpmn.metamodel/src/test/resources/xsd/BPMNDI.xsd new file mode 100644 index 00000000..75e2995f --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/xsd/BPMNDI.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/xsd/DC.xsd b/open-bpmn.metamodel/src/test/resources/xsd/DC.xsd new file mode 100644 index 00000000..8b622c33 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/xsd/DC.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/xsd/DI.xsd b/open-bpmn.metamodel/src/test/resources/xsd/DI.xsd new file mode 100644 index 00000000..aa985889 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/xsd/DI.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/xsd/Semantic.xsd b/open-bpmn.metamodel/src/test/resources/xsd/Semantic.xsd new file mode 100644 index 00000000..6d380b33 --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/xsd/Semantic.xsd @@ -0,0 +1,1559 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-bpmn.metamodel/src/test/resources/xsd/test-01.bpmn b/open-bpmn.metamodel/src/test/resources/xsd/test-01.bpmn new file mode 100644 index 00000000..9383cb2c --- /dev/null +++ b/open-bpmn.metamodel/src/test/resources/xsd/test-01.bpmn @@ -0,0 +1,57 @@ + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file