--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+ <classpathentry kind="src" path="src"/>\r
+ <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+ <name>org.simantics.xml.sax.base</name>\r
+ <comment></comment>\r
+ <projects>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.eclipse.pde.ManifestBuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.eclipse.pde.SchemaBuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.pde.PluginNature</nature>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ </natures>\r
+</projectDescription>\r
--- /dev/null
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7\r
+org.eclipse.jdt.core.compiler.compliance=1.7\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.7\r
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sax Parser Base
+Bundle-SymbolicName: org.simantics.xml.sax.base
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: VTT
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.simantics.db;bundle-version="1.1.0",
+ org.simantics.db.common;bundle-version="1.1.0",
+ org.simantics.db.layer0;bundle-version="1.1.0",
+ org.simantics.message;bundle-version="1.1.0"
+Export-Package: org.simantics.xml.sax.base
--- /dev/null
+source.. = src/\r
+output.. = bin/\r
+bin.includes = META-INF/,\\r
+ .\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.io.File;\r
+\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.Session;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.common.request.DelayedWriteRequest;\r
+import org.simantics.db.common.request.WriteRequest;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.util.Layer0Utils;\r
+import org.simantics.message.ILogger;\r
+import org.simantics.message.MessageService;\r
+\r
+\r
+public abstract class AbstractImporter {\r
+\r
+ \r
+ private Session session;\r
+ private File file;\r
+ private ILogger logger;\r
+ \r
+ private static final boolean USE_DELAYED = false;\r
+ \r
+ public AbstractImporter(Session session, File file) {\r
+ this.session = session;\r
+ this.file = file;\r
+ }\r
+ public Resource doImport() throws DatabaseException {\r
+ return doImport(MessageService.getDefault()); \r
+ }\r
+ \r
+ public Resource doImport(ILogger logger) throws DatabaseException {\r
+ this.logger = logger;\r
+ if (USE_DELAYED) {\r
+ ImportDelayedRequest req = new ImportDelayedRequest();\r
+ session.syncRequest(req);\r
+ return req.getResult();\r
+ } else {\r
+ ImportRequest req = new ImportRequest();\r
+ session.syncRequest(req);\r
+ return req.getResult();\r
+ }\r
+ }\r
+ \r
+ public File getFile() {\r
+ return file;\r
+ }\r
+ \r
+ public abstract void configure(XMLParser parser);\r
+ \r
+ private class ImportRequest extends WriteRequest {\r
+ private Resource result;\r
+ public ImportRequest() {\r
+ super();\r
+ }\r
+\r
+ @Override\r
+ public void perform(WriteGraph graph) throws DatabaseException {\r
+ result = doImport(graph);\r
+ }\r
+ \r
+ public Resource getResult() {\r
+ return result;\r
+ }\r
+ }\r
+ \r
+ private class ImportDelayedRequest extends DelayedWriteRequest {\r
+ private Resource result;\r
+ public ImportDelayedRequest() {\r
+ super();\r
+ }\r
+\r
+ @Override\r
+ public void perform(WriteGraph graph) throws DatabaseException {\r
+ result = doImport(graph);\r
+ }\r
+ \r
+ public Resource getResult() {\r
+ return result;\r
+ }\r
+ }\r
+ \r
+ private Resource doImport(WriteGraph graph) throws DatabaseException {\r
+ Layer0Utils.setDependenciesIndexingDisabled(graph, true);\r
+ try {\r
+ XMLParser parser = new XMLParser(graph);\r
+ configure(parser);\r
+ parser.parse(file, logger);\r
+ System.out.println(file.getAbsolutePath() + " imported");\r
+ Resource root = parser.getRoot();\r
+ if (root == null) {\r
+ throw new DatabaseException(file.getAbsolutePath() + " import failed. File is corrupted, or is not given type");\r
+ }\r
+ return root;\r
+ } catch (DatabaseException e) {\r
+ throw e;\r
+ } catch (Exception e) {\r
+ throw new DatabaseException(e);\r
+ } \r
+ }\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+public class Attribute {\r
+ public String localName;\r
+ public String qName;\r
+ public String uri;\r
+ public String value;\r
+ \r
+ public Attribute(String localName, String qName, String uri, String value) {\r
+ this.localName = localName;\r
+ this.qName = qName;\r
+ this.uri = uri;\r
+ this.value = value;\r
+ }\r
+ \r
+ \r
+ public String getUri() {\r
+ return uri;\r
+ }\r
+ \r
+ public String getQName() {\r
+ return qName;\r
+ }\r
+ \r
+ public String getLocalName() {\r
+ return localName;\r
+ }\r
+ \r
+ public String getValue() {\r
+ return value;\r
+ }\r
+ \r
+ \r
+}
\ No newline at end of file
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.io.Serializable;\r
+import java.util.Collection;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.simantics.db.Resource;\r
+import org.xml.sax.Attributes;\r
+\r
+public class Element implements Serializable {\r
+ private static final long serialVersionUID = -5207502156942818875L;\r
+ String uri;\r
+ String localName;\r
+ String qName;\r
+ Map<String,Attribute> attributes = new HashMap<String, Attribute>();\r
+ \r
+ XMLElementParser parser;\r
+ \r
+ public Element(String uri, String localName, String qName, Attributes attributes) {\r
+ this.uri = uri;\r
+ this.localName = localName;\r
+ this.qName = qName;\r
+ for (int i = 0; i < attributes.getLength(); i++) {\r
+ this.attributes.put(attributes.getLocalName(i),new Attribute(attributes.getLocalName(i),attributes.getQName(i),attributes.getURI(i),attributes.getValue(i)));\r
+ }\r
+ }\r
+ \r
+ public Element(String uri, String localName, String qName, Collection<Attribute> attributes) {\r
+ this.uri = uri;\r
+ this.localName = localName;\r
+ this.qName = qName;\r
+ for (Attribute a : attributes) {\r
+ this.attributes.put(a.localName,new Attribute(a.localName,a.qName,a.uri,a.value));\r
+ }\r
+ }\r
+\r
+ public String getUri() {\r
+ return uri;\r
+ }\r
+\r
+ public String getLocalName() {\r
+ return localName;\r
+ }\r
+\r
+ public String getQName() {\r
+ return qName;\r
+ }\r
+\r
+ public Collection<Attribute> getAttributes() {\r
+ return attributes.values();\r
+ }\r
+ \r
+ public Attribute getAttribute(String name) {\r
+ return attributes.get(name);\r
+ }\r
+\r
+ private Resource data;\r
+ \r
+ public void setData(Resource data) {\r
+ this.data = data;\r
+ }\r
+ \r
+ public Resource getData() {\r
+ return data;\r
+ }\r
+ \r
+ public void setParser(XMLElementParser parser) {\r
+ this.parser = parser;\r
+ }\r
+ \r
+ public XMLElementParser getParser() {\r
+ return parser;\r
+ }\r
+\r
+}
\ No newline at end of file
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.Map;\r
+\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public interface IDReferenceParser extends XMLElementParser{\r
+ \r
+ public boolean connectReferences(WriteGraph graph, Element element, Map<String,Element> map) throws DatabaseException;\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.Deque;\r
+\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public interface UnrecognizedElementParser {\r
+\r
+ public void configureChild(WriteGraph graph, Deque<Element> parents, Element element, Element child) throws DatabaseException;\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.Deque;\r
+\r
+import org.simantics.databoard.Bindings;\r
+import org.simantics.databoard.binding.Binding;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.layer0.Layer0;\r
+\r
+public class ValueElementParser extends XMLElementParserBase{\r
+ \r
+ String name;\r
+ Binding binding;\r
+ String relationURI;\r
+ \r
+ public ValueElementParser(String name, String relationURI,Binding binding) {\r
+ this.name = name;\r
+ this.relationURI = relationURI;\r
+ this.binding = binding;\r
+ }\r
+ \r
+ @Override\r
+ public String getElementId() {\r
+ return name;\r
+ }\r
+ \r
+ @Override\r
+ public Resource create(WriteGraph graph, Element element)\r
+ throws DatabaseException {\r
+ Resource res = graph.newResource();\r
+ return res;\r
+ }\r
+ \r
+ @Override\r
+ public void configure(WriteGraph graph, Deque<Element> parents, Element element) throws DatabaseException {\r
+ }\r
+ \r
+ @Override\r
+ public boolean connectParent(WriteGraph graph, Element parent, Element element)throws DatabaseException {\r
+ graph.claim(parent.getData(), graph.getResource(relationURI), element.getData());\r
+ return true;\r
+ }\r
+ \r
+ @Override\r
+ public boolean connectChild(WriteGraph graph, Element element, Element child) throws DatabaseException {\r
+ return false;\r
+ }\r
+ \r
+ @Override\r
+ public void configure(WriteGraph graph, Element element, String string) throws DatabaseException {\r
+ Layer0 l0 = Layer0.getInstance(graph);\r
+ if (binding == Bindings.STRING) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.String);\r
+ graph.claimValue(element.getData(), string, binding);\r
+ } else if (binding == Bindings.INTEGER) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.Integer);\r
+ graph.claimValue(element.getData(), Integer.parseInt(string), binding);\r
+ } else if (binding == Bindings.FLOAT) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.Float);\r
+ graph.claimValue(element.getData(), Float.parseFloat(string), binding);\r
+ } else if (binding == Bindings.DOUBLE) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.Double);\r
+ graph.claimValue(element.getData(), Double.parseDouble(string), binding);\r
+ } else if (binding == Bindings.BOOLEAN) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.Boolean);\r
+ graph.claimValue(element.getData(), Boolean.parseBoolean(string), binding);\r
+ } else if (binding == Bindings.LONG) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.Long);\r
+ graph.claimValue(element.getData(), Long.parseLong(string), binding);\r
+ } else if (binding == Bindings.BYTE) {\r
+ graph.claim(element.getData(), l0.InstanceOf, l0.Byte);\r
+ graph.claimValue(element.getData(), Byte.parseByte(string), binding);\r
+ } else {\r
+ throw new DatabaseException("Unknown datatype " + binding);\r
+ }\r
+ }\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.Map;\r
+\r
+public interface XMLElementNamedChildParser extends XMLElementParser{\r
+ Class<? extends XMLElementParser> getParser(Map<String,XMLElementParser> parsers, Element element, Element child);\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.HashMap;\r
+import java.util.HashSet;\r
+import java.util.Map;\r
+import java.util.Set;\r
+\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public abstract class XMLElementNamedChildParserBase implements XMLElementNamedChildParser{\r
+ \r
+ private Map<String,Class<? extends XMLElementParser>> namedParsers = new HashMap<String, Class<? extends XMLElementParser>>();\r
+ private Set<Class<? extends XMLElementParser>> parsers = new HashSet<Class<? extends XMLElementParser>>();\r
+ \r
+ @Override\r
+ public Class<? extends XMLElementParser> getParser(Map<String, XMLElementParser> parsers, Element element, Element child) {\r
+ Class<? extends XMLElementParser> parserClass = namedParsers.get(child.qName);\r
+ if (parserClass != null)\r
+ return parserClass;\r
+ XMLElementParser parser = parsers.get(child.qName);\r
+ if (parser == null)\r
+ return null;\r
+ parserClass = parser.getClass();\r
+ if (this.parsers.contains(parserClass))\r
+ return parserClass;\r
+ for (Class<?> c : this.parsers)\r
+ if (c.isAssignableFrom(parserClass))\r
+ return parserClass;\r
+ return null;\r
+ }\r
+ \r
+ public void addParser(String name, Class<? extends XMLElementParser> parser) {\r
+ namedParsers.put(name, parser);\r
+ }\r
+ \r
+ public void addParser(Class<? extends XMLElementParser> parser) {\r
+ parsers.add(parser);\r
+ }\r
+ \r
+// @Override\r
+// public void configureChild(WriteGraph graph, Stack<Element> parents, Element element, Element child) throws DatabaseException {\r
+//\r
+// }\r
+ \r
+ @Override\r
+ public void configure(WriteGraph graph, Element element, String string) throws DatabaseException {\r
+ \r
+ }\r
+ \r
+ @Override\r
+ public String getID() {\r
+ return null;\r
+ }\r
+ \r
+ @Override\r
+ public int idPriority() {\r
+ return 0;\r
+ }\r
+ \r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.Deque;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public interface XMLElementParser {\r
+ /**\r
+ * ID of the element\r
+ * @return\r
+ */\r
+ public String getElementId();\r
+ \r
+ \r
+ /**\r
+ * Priority of the Id. Used with overlapping IDs to select preferred element. \r
+ */\r
+ public int idPriority();\r
+ \r
+ /**\r
+ * Creates a resource for the element.\r
+ * \r
+ * Called on SAX.startElement\r
+ * @param graph\r
+ * @param element\r
+ * @return\r
+ * @throws DatabaseException\r
+ */\r
+ public Resource create(WriteGraph graph, Element element) throws DatabaseException;\r
+ /**\r
+ * Configures the element.\r
+ * \r
+ * Called on SAX.endElement\r
+ * @param graph\r
+ * @param parents\r
+ * @param element\r
+ * @throws DatabaseException\r
+ */\r
+ public void configure(WriteGraph graph, Deque<Element> parents, Element element) throws DatabaseException;\r
+ /**\r
+ * Configures element with characters content\r
+ * \r
+ * Called on SAX.charaters\r
+ * @param graph\r
+ * @param element\r
+ * @param string\r
+ * @throws DatabaseException\r
+ */\r
+ public void configure(WriteGraph graph, Element element, String string) throws DatabaseException;\r
+ \r
+ /**\r
+ * Adds child element. Primary method for connecting elements.\r
+ * @param graph\r
+ * @param element\r
+ * @param child\r
+ * @return true, if connection was done, otherwise return false.\r
+ * @throws DatabaseException\r
+ */\r
+ public abstract boolean connectChild(WriteGraph graph, Element element, Element child) throws DatabaseException;\r
+ /**\r
+ * Adds element to a parent. Secondary method for connecting elements. Called only if primary method fails.\r
+ * @param graph\r
+ * @param parent\r
+ * @param element\r
+ * @return true, if connection was done, otherwise return false.\r
+ * @throws DatabaseException\r
+ */\r
+ public abstract boolean connectParent(WriteGraph graph, Element parent, Element element) throws DatabaseException;\r
+ \r
+ \r
+ //public void configureChild(WriteGraph graph, Stack<Element> parents, Element element, Element child) throws DatabaseException;\r
+ public String getID();\r
+}
\ No newline at end of file
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public abstract class XMLElementParserBase implements XMLElementParser{\r
+ \r
+ \r
+ @Override\r
+ public void configure(WriteGraph graph, Element element, String string) throws DatabaseException {\r
+ \r
+ }\r
+ \r
+ @Override\r
+ public String getID() {\r
+ return null;\r
+ }\r
+ \r
+ @Override\r
+ public int idPriority() {\r
+ return 0;\r
+ }\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.base;\r
+\r
+import java.io.BufferedInputStream;\r
+import java.io.File;\r
+import java.io.FileInputStream;\r
+import java.io.Serializable;\r
+import java.util.ArrayDeque;\r
+import java.util.ArrayList;\r
+import java.util.Deque;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import javax.xml.parsers.SAXParser;\r
+import javax.xml.parsers.SAXParserFactory;\r
+\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.message.ILogger;\r
+import org.xml.sax.Attributes;\r
+import org.xml.sax.InputSource;\r
+import org.xml.sax.SAXException;\r
+import org.xml.sax.XMLReader;\r
+import org.xml.sax.helpers.DefaultHandler;\r
+\r
+public class XMLParser extends DefaultHandler implements Serializable {\r
+\r
+ private static final long serialVersionUID = 7360740940824360338L;\r
+ private static final boolean debug = false;\r
+ private ILogger logger;\r
+ private Resource root;\r
+ private Deque<Element> current = new ArrayDeque<Element>();\r
+ private Map<String, XMLElementParser> parsers = new HashMap<String, XMLElementParser>();\r
+ private WriteGraph graph;\r
+ \r
+ private Map<Class<? extends XMLElementParser>, XMLElementParser> namedParsers = new HashMap<Class<? extends XMLElementParser>, XMLElementParser>();\r
+ \r
+ public XMLParser(WriteGraph graph) {\r
+ this.graph = graph;\r
+ }\r
+ \r
+ public void add(XMLElementParser parser) {\r
+ if (parser.getElementId() != null)\r
+ parsers.put(parser.getElementId(), parser);\r
+ namedParsers.put(parser.getClass(), parser);\r
+ }\r
+ \r
+ \r
+ private List<Element> idReferenceElements = new ArrayList<Element>();\r
+ private void loadElement(Deque<Element> parents, Element element) throws SAXException{\r
+ XMLElementParser parser = null;\r
+ Element parent = null;\r
+ if (parents.size() > 0) {\r
+ parent = parents.peek();\r
+ if (parent.getParser() instanceof XMLElementNamedChildParser) {\r
+ // use parent's named child parser if it is supported\r
+ Class<? extends XMLElementParser> parserClass = ((XMLElementNamedChildParser)parent.getParser()).getParser(parsers,parent,element);\r
+ if (parserClass != null) {\r
+ parser = namedParsers.get(parserClass);\r
+ if (parser == null) {\r
+ try {\r
+ parser = parserClass.newInstance();\r
+ namedParsers.put(parserClass, parser);\r
+ } catch (IllegalAccessException | InstantiationException e) {\r
+ String err = "Element parsers must have accessible default constructor";\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, err));\r
+ throw new SAXException(err, e);\r
+ }\r
+ }\r
+ } \r
+// if (parser == null && ((XMLElementNamedChildParser)parent.getParser()).useGlobalRules())\r
+// parser = parsers.get(element.qName);\r
+ } else {\r
+ // otherwise use globally configured element parser\r
+ parser = parsers.get(element.qName);\r
+ }\r
+ } else {\r
+ // use globally configured element parser\r
+ parser = parsers.get(element.qName);\r
+ }\r
+ \r
+ if (parser != null) {\r
+ try {\r
+ \r
+ element.setData(parser.create(graph, element));\r
+ if (parser instanceof IDReferenceParser)\r
+ idReferenceElements.add(element);\r
+ element.setParser(parser);\r
+ } catch (DatabaseException e) {\r
+ throw new SAXException(e);\r
+ }\r
+ } else {\r
+ if (parent == null && parents.size() > 0)\r
+ parent = parents.peek();\r
+ String err = "Unknown element " + element.qName + ", parent " + (parent != null ? parent.getQName() : "None");\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, err));\r
+ if (debug) System.err.println(err);\r
+ }\r
+ }\r
+ \r
+ private Map<String, Element> idMap = new HashMap<String, Element>();\r
+ \r
+ private void handleElement(Deque<Element> parents, Element element) throws SAXException{\r
+ XMLElementParser parser = element.getParser();\r
+ if (parser != null) {\r
+ try {\r
+ parser.configure(graph, parents, element);\r
+ if (parents.size() > 0) {\r
+ Element parent = parents.peek();\r
+ if (parent.getParser() != null) {\r
+ if (!parent.getParser().connectChild(graph, parent, element))\r
+ if (!parser.connectParent(graph, parent, element)) {\r
+ String err = "Did not connect element " + element.qName + ", parent " + (parent != null ? parent.getQName() : "None");\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, err));\r
+ if (debug) System.err.println(err);\r
+ }\r
+ } else {\r
+ String err = "Did not connect element " + element.qName + ", parent " + (parent != null ? parent.getQName() : "None") + " was not imported";\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, err));\r
+ if (debug) System.err.println(err);\r
+ }\r
+ }\r
+ String id = parser.getID();\r
+ if (id != null) {\r
+ Element existing = idMap.put(id, element);\r
+ if (existing != null) {\r
+ // report error + use id priorities to select the kept element.\r
+ boolean useExt = existing.parser.idPriority() > element.parser.idPriority();\r
+ if (useExt)\r
+ idMap.put(id, existing);\r
+ String err = "Duplicate XML element id: " + id + " for " + element.getQName() + " and " + existing.getQName() + ", using " + (useExt ? existing.getQName() : element.getQName());\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, err));\r
+ if (debug) System.err.println(err);\r
+ }\r
+ }\r
+ } catch (DatabaseException e) {\r
+ throw new SAXException(e);\r
+ }\r
+ } else {\r
+ Element parent = parents.peek();\r
+ if (parent != null) { \r
+ parser = parent.getParser();\r
+ if (parser != null && parser instanceof UnrecognizedElementParser) {\r
+ try {\r
+ ((UnrecognizedElementParser)parser).configureChild(graph, parents, parent, element);\r
+ } catch (DatabaseException e) {\r
+ throw new SAXException(e);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ private void handleCharacters(Element element, String string) throws SAXException{\r
+ XMLElementParser parser = element.getParser();\r
+ if (parser != null) {\r
+ try {\r
+ parser.configure(graph, element, string);\r
+ } catch (DatabaseException e) {\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage()));\r
+ throw new SAXException(e);\r
+ }\r
+ }\r
+ }\r
+ \r
+ private static String PLUGIN_ID = "org.simantics.xml.sax.base";\r
+ \r
+ public void done() throws SAXException{\r
+ try {\r
+ for (Element e : idReferenceElements) {\r
+ IDReferenceParser parser = (IDReferenceParser)parsers.get(e.qName);\r
+ if (!parser.connectReferences(graph, e, idMap)) {\r
+ String err ="Could not resolve ID references for " + e.getQName() + " " + e.getUri();\r
+ logger.log(new Status(IStatus.ERROR, PLUGIN_ID, err));\r
+ if (debug) System.err.println(err);\r
+ }\r
+ }\r
+ } catch (DatabaseException e) {\r
+ throw new SAXException(e);\r
+ }\r
+ }\r
+ \r
+ public Resource getRoot() {\r
+ return root;\r
+ }\r
+ \r
+ @Override\r
+ public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {\r
+ Element e = new Element(uri,localName,name,attributes);\r
+ \r
+ loadElement(current,e);\r
+ current.push(e);\r
+ }\r
+ \r
+ @Override\r
+ public void endElement(String uri, String localName, String name)\r
+ throws SAXException {\r
+ Element e = null;\r
+ if (!current.isEmpty()) {\r
+ e = current.pop();\r
+ }\r
+ if (e != null) {\r
+ handleElement(current,e);\r
+ }\r
+ if (current.isEmpty()) {\r
+ root = e.getData();\r
+ }\r
+ }\r
+ \r
+ @Override\r
+ public void characters(char[] ch, int start, int length)\r
+ throws SAXException {\r
+ \r
+ if (!current.isEmpty()) {\r
+ String s = new String(ch,start,length);\r
+ Element e = current.peek();\r
+ handleCharacters(e, s);\r
+ }\r
+ \r
+ }\r
+ \r
+ public void parse(File file, ILogger logger) throws Exception {\r
+ this.logger = logger;\r
+ SAXParserFactory spf = SAXParserFactory.newInstance();\r
+ SAXParser saxParser = spf.newSAXParser();\r
+ \r
+ XMLReader reader = saxParser.getXMLReader();\r
+ reader.setContentHandler(this);\r
+ reader.parse(new InputSource(new BufferedInputStream(new FileInputStream(file))));\r
+ done();\r
+ }\r
+ \r
+ \r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+ <classpathentry kind="src" path="src"/>\r
+ <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+ <name>org.simantics.xml.sax.ui</name>\r
+ <comment></comment>\r
+ <projects>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.eclipse.pde.ManifestBuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.eclipse.pde.SchemaBuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.pde.PluginNature</nature>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ </natures>\r
+</projectDescription>\r
--- /dev/null
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7\r
+org.eclipse.jdt.core.compiler.compliance=1.7\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.7\r
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: XML Sax Parser Generator Ui
+Bundle-SymbolicName: org.simantics.xml.sax.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: VTT
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.simantics.xml.sax;bundle-version="1.0.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui,
+ org.simantics.utils.ui;bundle-version="1.1.0"
--- /dev/null
+source.. = src/\r
+output.. = bin/\r
+bin.includes = META-INF/,\\r
+ .,\\r
+ plugin.xml\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?eclipse version="3.4"?>\r
+<plugin>\r
+ <extension\r
+ point="org.eclipse.ui.importWizards">\r
+ <wizard\r
+ class="org.simantics.xml.sax.ui.wizard.SchemaConversionWizard"\r
+ id="org.simantics.xml.sax.ui.schemaconversionwizard"\r
+ name="XML Schema To Ontology">\r
+ <description>\r
+ Converts XML Schemas to Simantics ontologies and generates SAX Parser based importer for Schema compliant XML files\r
+ </description>\r
+ </wizard>\r
+ </extension>\r
+\r
+</plugin>\r
--- /dev/null
+package org.simantics.xml.sax.ui.wizard;\r
+\r
+import java.lang.reflect.InvocationTargetException;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.jface.layout.GridDataFactory;\r
+import org.eclipse.jface.operation.IRunnableWithProgress;\r
+import org.eclipse.jface.wizard.WizardPage;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.simantics.utils.ui.ErrorLogger;\r
+\r
+\r
+public class ImportProcessPage extends WizardPage {\r
+ private Composite composite;\r
+ \r
+ private Button button;\r
+ private Label label;\r
+ \r
+ private boolean doneImport = false;\r
+ private boolean importing = false;\r
+ \r
+ public ImportProcessPage() {\r
+ super("XML Schema conversion","Conversion Summary", null);\r
+ setPageComplete(false);\r
+ \r
+ }\r
+ \r
+ public boolean isDoneImport() {\r
+ return doneImport;\r
+ }\r
+ \r
+ @Override\r
+ public void createControl(Composite parent) {\r
+ composite = new Composite(parent, SWT.NONE);\r
+ composite.setLayout(new GridLayout(1,true));\r
+ \r
+ Label fileLabel = new Label(composite, SWT.NONE);\r
+ fileLabel.setText("File: ");\r
+ \r
+ label = new Label(composite, SWT.NONE);\r
+ label.setText("Import has not been started.");\r
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BOTTOM).grab(true, false).applyTo(label);\r
+ button = new Button(composite, SWT.PUSH);\r
+ button.setText("Import");\r
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(button);\r
+ button.addSelectionListener(new SelectionAdapter() {\r
+ @Override\r
+ public void widgetSelected(SelectionEvent e) {\r
+ doImport();\r
+ \r
+ }\r
+ });\r
+ setControl(composite); \r
+ }\r
+ \r
+ private Exception exception;\r
+\r
+ private void doImport() {\r
+ button.setEnabled(false);\r
+ label.setText("Import started.");\r
+ importing = true;\r
+ try {\r
+ getWizard().getContainer().run(true, true, new IRunnableWithProgress() {\r
+ \r
+ @Override\r
+ public void run(final IProgressMonitor monitor) throws InvocationTargetException,\r
+ InterruptedException {\r
+ try {\r
+ \r
+ monitor.beginTask("Database import", IProgressMonitor.UNKNOWN);\r
+ final SchemaConversionWizard wizard = (SchemaConversionWizard)getWizard();\r
+ wizard.doConversion();\r
+\r
+ \r
+ } catch (final Exception err) {\r
+ exception = err;\r
+ }\r
+ monitor.done();\r
+ }\r
+ });\r
+ } catch (InvocationTargetException err) {\r
+ exception = err;\r
+ } catch (InterruptedException err) {\r
+ exception = err;\r
+ }\r
+ if (exception != null) {\r
+ setErrorMessage("Conversion failed: " + exception.getMessage());\r
+ ErrorLogger.defaultLogError("Schema conversion failed.",exception);\r
+ label.setText("Schema conversion failed.");\r
+ } else {\r
+ label.setText("Schema conversion done.");\r
+ }\r
+ doneImport = true;\r
+ importing = false;\r
+ setPreviousPage(null);\r
+ setPageComplete(true);\r
+ getContainer().updateButtons();\r
+ \r
+ }\r
+ \r
+ public boolean isImporting() {\r
+ return importing;\r
+ }\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.ui.wizard;\r
+\r
+import org.eclipse.jface.layout.GridDataFactory;\r
+import org.eclipse.jface.wizard.WizardPage;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.simantics.utils.ui.widgets.DirectorySelectionWidget;\r
+import org.simantics.utils.ui.widgets.FileOrDirectorySelectionWidget;\r
+import org.simantics.utils.ui.widgets.FileSelectionListener;\r
+import org.simantics.utils.ui.widgets.FileSelectionWidget;\r
+\r
+public class InputSelectionPage extends WizardPage implements FileSelectionListener{\r
+ \r
+ public InputSelectionPage() {\r
+ super("InputPage","Select input files and output plug-in",null);\r
+ }\r
+\r
+ private FileSelectionWidget schemaSelection;\r
+ private FileSelectionWidget configurationSelection;\r
+ private DirectorySelectionWidget pluginSelection;\r
+\r
+ @Override\r
+ public void createControl(Composite parent) {\r
+ Composite composite = new Composite(parent, SWT.NONE);\r
+ composite.setLayout(new GridLayout(1,false));\r
+ GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(composite);\r
+ \r
+ schemaSelection = new FileSelectionWidget(composite, "Schema file", SWT.OPEN);\r
+ configurationSelection = new FileSelectionWidget(composite, "Configuration file (Optional)", SWT.OPEN);\r
+ pluginSelection = new DirectorySelectionWidget(composite, "Output plug-in", SWT.SAVE);\r
+ \r
+ schemaSelection.setFilterExtensions(new String[]{"*.xsd"});\r
+ schemaSelection.setFilterNames(new String[]{"XML schema files"});\r
+ \r
+ configurationSelection.setFilterExtensions(new String[]{"*.xml"});\r
+ configurationSelection.setFilterNames(new String[]{"XML files"});\r
+ \r
+ schemaSelection.addListener(this);\r
+ pluginSelection.addListener(this);\r
+ \r
+ setControl(composite);\r
+ setPageComplete(false);\r
+ }\r
+ \r
+ @Override\r
+ public void fileSelected(FileOrDirectorySelectionWidget source, String[] filename) {\r
+ setPageComplete(schemaSelection.getFilename() != null && pluginSelection.getFilename() != null);\r
+ \r
+ }\r
+ \r
+ public String getSchemaFilename() {\r
+ if (schemaSelection.getFilename() == null ||schemaSelection.getFilename().length == 0)\r
+ return null;\r
+ return schemaSelection.getFilename()[0];\r
+ }\r
+ \r
+ public String getConfigurationFilename() {\r
+ if (configurationSelection.getFilename() == null || configurationSelection.getFilename().length == 0)\r
+ return null;\r
+ return configurationSelection.getFilename()[0];\r
+ }\r
+ \r
+ public String getPluginFilename() {\r
+ if (pluginSelection.getFilename() == null ||pluginSelection.getFilename().length == 0)\r
+ return null;\r
+ return pluginSelection.getFilename()[0];\r
+ }\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax.ui.wizard;\r
+\r
+import java.io.File;\r
+\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.jface.wizard.Wizard;\r
+import org.eclipse.ui.IImportWizard;\r
+import org.eclipse.ui.IWorkbench;\r
+import org.simantics.xml.sax.SchemaConverter;\r
+\r
+public class SchemaConversionWizard extends Wizard implements IImportWizard {\r
+\r
+// FileSelectionPage fileselectionPage;\r
+// FileSelectionPage configurationSelectionPage;\r
+// DirectorySelectionPage pluginSelectionPage;\r
+ InputSelectionPage inputSelectionPage ;\r
+ ImportProcessPage importProcessPage;\r
+ \r
+ public SchemaConversionWizard() {\r
+ setWindowTitle("XML Schema conversion");\r
+ }\r
+\r
+ @Override\r
+ public void init(IWorkbench workbench, IStructuredSelection selection) {\r
+ // TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+ @Override\r
+ public boolean performFinish() {\r
+ if (importProcessPage.isImporting())\r
+ return false;\r
+ return true;\r
+ }\r
+ \r
+ \r
+ @Override\r
+ public void addPages() {\r
+// fileselectionPage = new FileSelectionPage();\r
+// fileselectionPage.setFilterExtensions(new String[]{"*.xsd"});\r
+// fileselectionPage.setFilterNames(new String[]{"XML schema files"});\r
+// pluginSelectionPage = new DirectorySelectionPage();\r
+// addPage(fileselectionPage);\r
+// addPage(pluginSelectionPage);\r
+ addPage(inputSelectionPage = new InputSelectionPage());\r
+ addPage(importProcessPage = new ImportProcessPage());\r
+ }\r
+ \r
+ public void doConversion() throws Exception {\r
+ SchemaConverter converter = new SchemaConverter();\r
+// File inputFile = new File(fileselectionPage.getFilename());\r
+// File outputPlugin = new File(pluginSelectionPage.getFilename());\r
+ \r
+ File inputFile = new File(inputSelectionPage.getSchemaFilename());\r
+ File configurationFile = null;\r
+ if (inputSelectionPage.getConfigurationFilename() != null)\r
+ configurationFile = new File(inputSelectionPage.getConfigurationFilename());\r
+ File outputPlugin = new File(inputSelectionPage.getPluginFilename());\r
+ \r
+ converter.convertSchema(inputFile,configurationFile,outputPlugin);\r
+ }\r
+\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+ <classpathentry kind="src" path="src"/>\r
+ <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+ <name>org.simantics.xml.sax</name>\r
+ <comment></comment>\r
+ <projects>\r
+ </projects>\r
+ <buildSpec>\r
+ <buildCommand>\r
+ <name>org.eclipse.jdt.core.javabuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.eclipse.pde.ManifestBuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ <buildCommand>\r
+ <name>org.eclipse.pde.SchemaBuilder</name>\r
+ <arguments>\r
+ </arguments>\r
+ </buildCommand>\r
+ </buildSpec>\r
+ <natures>\r
+ <nature>org.eclipse.pde.PluginNature</nature>\r
+ <nature>org.eclipse.jdt.core.javanature</nature>\r
+ </natures>\r
+</projectDescription>\r
--- /dev/null
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7\r
+org.eclipse.jdt.core.compiler.compliance=1.7\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.7\r
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sax parser generator
+Bundle-SymbolicName: org.simantics.xml.sax
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: VTT
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Export-Package: org.simantics.xml.sax
+Require-Bundle: org.simantics.utils.datastructures;bundle-version="1.1.0"
--- /dev/null
+source.. = src/\r
+output.. = bin/\r
+bin.includes = META-INF/,\\r
+ .\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp \r
+ Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp \r
+ </xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html">\r
+ The schema corresponding to this document is normative,\r
+ with respect to the syntactic constraints it expresses in the\r
+ XML Schema language. The documentation (within <documentation> elements)\r
+ below, is not normative, but rather highlights important aspects of\r
+ the W3C Recommendation of which this is a part</xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ The simpleType element and all of its members are defined\r
+ towards the end of this schema document</xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Get access to the xml: attribute groups for xml:lang\r
+ as declared on 'schema' and 'documentation' below\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:import>\r
+\r
+ <xs:complexType name="openAttrs">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ This type is extended by almost all schema types\r
+ to allow attributes from other namespaces to be\r
+ added to user schemas.\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:anyType">\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="annotated">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ This type is extended by all types which allow annotation\r
+ other than <schema> itself\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:openAttrs">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="id" type="xs:ID"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:group name="schemaTop">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ This group is for the\r
+ elements which occur freely at the top level of schemas.\r
+ All of their types are based on the "annotated" type by extension.</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:choice>\r
+ <xs:group ref="xs:redefinable"/>\r
+ <xs:element ref="xs:element"/>\r
+ <xs:element ref="xs:attribute"/>\r
+ <xs:element ref="xs:notation"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+ \r
+ <xs:group name="redefinable">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ This group is for the\r
+ elements which can self-redefine (see <redefine> below).</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:choice>\r
+ <xs:element ref="xs:simpleType"/>\r
+ <xs:element ref="xs:complexType"/>\r
+ <xs:element ref="xs:group"/>\r
+ <xs:element ref="xs:attributeGroup"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:simpleType name="formChoice">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:NMTOKEN">\r
+ <xs:enumeration value="qualified"/>\r
+ <xs:enumeration value="unqualified"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="reducedDerivationControl">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:derivationControl">\r
+ <xs:enumeration value="extension"/>\r
+ <xs:enumeration value="restriction"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="derivationSet">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ <xs:documentation>\r
+ #all or (possibly empty) subset of {extension, restriction}</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:union>\r
+ <xs:simpleType> \r
+ <xs:restriction base="xs:token">\r
+ <xs:enumeration value="#all"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:reducedDerivationControl"/>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="typeDerivationControl">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:derivationControl">\r
+ <xs:enumeration value="extension"/>\r
+ <xs:enumeration value="restriction"/>\r
+ <xs:enumeration value="list"/>\r
+ <xs:enumeration value="union"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="fullDerivationSet">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ <xs:documentation>\r
+ #all or (possibly empty) subset of {extension, restriction, list, union}</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:union>\r
+ <xs:simpleType> \r
+ <xs:restriction base="xs:token">\r
+ <xs:enumeration value="#all"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:typeDerivationControl"/>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+\r
+ <xs:element name="schema" id="schema">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:openAttrs">\r
+ <xs:sequence>\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element ref="xs:include"/>\r
+ <xs:element ref="xs:import"/>\r
+ <xs:element ref="xs:redefine"/>\r
+ <xs:element ref="xs:annotation"/>\r
+ </xs:choice>\r
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
+ <xs:group ref="xs:schemaTop"/>\r
+ <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ </xs:sequence>\r
+ <xs:attribute name="targetNamespace" type="xs:anyURI"/>\r
+ <xs:attribute name="version" type="xs:token"/>\r
+ <xs:attribute name="finalDefault" type="xs:fullDerivationSet" use="optional" default=""/>\r
+ <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>\r
+ <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>\r
+ <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>\r
+ <xs:attribute name="id" type="xs:ID"/>\r
+ <xs:attribute ref="xml:lang"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:key name="element">\r
+ <xs:selector xpath="xs:element"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+\r
+ <xs:key name="attribute">\r
+ <xs:selector xpath="xs:attribute"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+\r
+ <xs:key name="type">\r
+ <xs:selector xpath="xs:complexType|xs:simpleType"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+ \r
+ <xs:key name="group">\r
+ <xs:selector xpath="xs:group"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+ \r
+ <xs:key name="attributeGroup">\r
+ <xs:selector xpath="xs:attributeGroup"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+ \r
+ <xs:key name="notation">\r
+ <xs:selector xpath="xs:notation"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+\r
+ <xs:key name="identityConstraint">\r
+ <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>\r
+ <xs:field xpath="@name"/>\r
+ </xs:key>\r
+\r
+ </xs:element>\r
+\r
+ <xs:simpleType name="allNNI">\r
+ <xs:annotation><xs:documentation>\r
+ for maxOccurs</xs:documentation></xs:annotation>\r
+ <xs:union memberTypes="xs:nonNegativeInteger">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:NMTOKEN">\r
+ <xs:enumeration value="unbounded"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+\r
+ <xs:attributeGroup name="occurs">\r
+ <xs:annotation><xs:documentation>\r
+ for all particles</xs:documentation></xs:annotation>\r
+ <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>\r
+ <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>\r
+ </xs:attributeGroup>\r
+\r
+ <xs:attributeGroup name="defRef">\r
+ <xs:annotation><xs:documentation>\r
+ for element, group and attributeGroup,\r
+ which both define and reference</xs:documentation></xs:annotation>\r
+ <xs:attribute name="name" type="xs:NCName"/>\r
+ <xs:attribute name="ref" type="xs:QName"/>\r
+ </xs:attributeGroup>\r
+\r
+ <xs:group name="typeDefParticle">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ 'complexType' uses this</xs:documentation></xs:annotation>\r
+ <xs:choice>\r
+ <xs:element name="group" type="xs:groupRef"/>\r
+ <xs:element ref="xs:all"/>\r
+ <xs:element ref="xs:choice"/>\r
+ <xs:element ref="xs:sequence"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+ \r
+ \r
+\r
+ <xs:group name="nestedParticle">\r
+ <xs:choice>\r
+ <xs:element name="element" type="xs:localElement"/>\r
+ <xs:element name="group" type="xs:groupRef"/>\r
+ <xs:element ref="xs:choice"/>\r
+ <xs:element ref="xs:sequence"/>\r
+ <xs:element ref="xs:any"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+ \r
+ <xs:group name="particle">\r
+ <xs:choice>\r
+ <xs:element name="element" type="xs:localElement"/>\r
+ <xs:element name="group" type="xs:groupRef"/>\r
+ <xs:element ref="xs:all"/>\r
+ <xs:element ref="xs:choice"/>\r
+ <xs:element ref="xs:sequence"/>\r
+ <xs:element ref="xs:any"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+ \r
+ <xs:complexType name="attribute">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>\r
+ </xs:sequence>\r
+ <xs:attributeGroup ref="xs:defRef"/>\r
+ <xs:attribute name="type" type="xs:QName"/>\r
+ <xs:attribute name="use" use="optional" default="optional">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:NMTOKEN">\r
+ <xs:enumeration value="prohibited"/>\r
+ <xs:enumeration value="optional"/>\r
+ <xs:enumeration value="required"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:attribute name="default" type="xs:string"/>\r
+ <xs:attribute name="fixed" type="xs:string"/>\r
+ <xs:attribute name="form" type="xs:formChoice"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="topLevelAttribute">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:attribute">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="ref" use="prohibited"/>\r
+ <xs:attribute name="form" use="prohibited"/>\r
+ <xs:attribute name="use" use="prohibited"/>\r
+ <xs:attribute name="name" use="required" type="xs:NCName"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:group name="attrDecls">\r
+ <xs:sequence>\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element name="attribute" type="xs:attribute"/>\r
+ <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>\r
+ </xs:choice>\r
+ <xs:element ref="xs:anyAttribute" minOccurs="0"/>\r
+ </xs:sequence>\r
+ </xs:group>\r
+\r
+ <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:group name="complexTypeModel">\r
+ <xs:choice>\r
+ <xs:element ref="xs:simpleContent"/>\r
+ <xs:element ref="xs:complexContent"/>\r
+ <xs:sequence>\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ This branch is short for\r
+ <complexContent>\r
+ <restriction base="xs:anyType">\r
+ ...\r
+ </restriction>\r
+ </complexContent></xs:documentation>\r
+ </xs:annotation>\r
+ <xs:group ref="xs:typeDefParticle" minOccurs="0"/>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:complexType name="complexType" abstract="true">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:group ref="xs:complexTypeModel"/>\r
+ <xs:attribute name="name" type="xs:NCName">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Will be restricted to required or forbidden</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Not allowed if simpleContent child is chosen.\r
+ May be overriden by setting on complexContent child.</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>\r
+ <xs:attribute name="final" type="xs:derivationSet"/>\r
+ <xs:attribute name="block" type="xs:derivationSet"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="topLevelComplexType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:complexType">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:complexTypeModel"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" type="xs:NCName" use="required"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="localComplexType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:complexType">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:complexTypeModel"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" use="prohibited"/>\r
+ <xs:attribute name="abstract" use="prohibited"/>\r
+ <xs:attribute name="final" use="prohibited"/>\r
+ <xs:attribute name="block" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="restrictionType">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:choice minOccurs="0">\r
+ <xs:group ref="xs:typeDefParticle"/>\r
+ <xs:group ref="xs:simpleRestrictionModel"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="base" type="xs:QName" use="required"/>\r
+ </xs:extension>\r
+ </xs:complexContent> \r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="complexRestrictionType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:restrictionType">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0">\r
+ <xs:annotation>\r
+ <xs:documentation>This choice is added simply to\r
+ make this a valid restriction per the REC</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:group ref="xs:typeDefParticle"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent> \r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="extensionType">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:group ref="xs:typeDefParticle" minOccurs="0"/>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="base" type="xs:QName" use="required"/>\r
+ </xs:extension>\r
+ </xs:complexContent> \r
+ </xs:complexType>\r
+\r
+ <xs:element name="complexContent" id="complexContent">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:choice>\r
+ <xs:element name="restriction" type="xs:complexRestrictionType"/>\r
+ <xs:element name="extension" type="xs:extensionType"/>\r
+ </xs:choice> \r
+ <xs:attribute name="mixed" type="xs:boolean">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Overrides any setting on complexType parent.</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="simpleRestrictionType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:restrictionType">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0">\r
+ <xs:annotation>\r
+ <xs:documentation>This choice is added simply to\r
+ make this a valid restriction per the REC</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:group ref="xs:simpleRestrictionModel"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="simpleExtensionType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:extensionType">\r
+ <xs:sequence>\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ No typeDefParticle group reference</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="simpleContent" id="simpleContent">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:choice>\r
+ <xs:element name="restriction" type="xs:simpleRestrictionType"/>\r
+ <xs:element name="extension" type="xs:simpleExtensionType"/>\r
+ </xs:choice>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ \r
+ <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+\r
+ <xs:simpleType name="blockSet">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ <xs:documentation>\r
+ #all or (possibly empty) subset of {substitution, extension,\r
+ restriction}</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:union>\r
+ <xs:simpleType> \r
+ <xs:restriction base="xs:token">\r
+ <xs:enumeration value="#all"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType>\r
+ <xs:list>\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:derivationControl">\r
+ <xs:enumeration value="extension"/>\r
+ <xs:enumeration value="restriction"/>\r
+ <xs:enumeration value="substitution"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:list>\r
+ </xs:simpleType>\r
+ </xs:union> \r
+ </xs:simpleType>\r
+\r
+ <xs:complexType name="element" abstract="true">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ The element element can be used either\r
+ at the top level to define an element-type binding globally,\r
+ or within a content model to either reference a globally-defined\r
+ element or type or declare an element-type binding locally.\r
+ The ref form is not allowed at the top level.</xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:choice minOccurs="0">\r
+ <xs:element name="simpleType" type="xs:localSimpleType"/>\r
+ <xs:element name="complexType" type="xs:localComplexType"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attributeGroup ref="xs:defRef"/>\r
+ <xs:attribute name="type" type="xs:QName"/>\r
+ <xs:attribute name="substitutionGroup" type="xs:QName"/>\r
+ <xs:attributeGroup ref="xs:occurs"/>\r
+ <xs:attribute name="default" type="xs:string"/>\r
+ <xs:attribute name="fixed" type="xs:string"/>\r
+ <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>\r
+ <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>\r
+ <xs:attribute name="final" type="xs:derivationSet"/>\r
+ <xs:attribute name="block" type="xs:blockSet"/>\r
+ <xs:attribute name="form" type="xs:formChoice"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="topLevelElement">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:element">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0">\r
+ <xs:element name="simpleType" type="xs:localSimpleType"/>\r
+ <xs:element name="complexType" type="xs:localComplexType"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="ref" use="prohibited"/>\r
+ <xs:attribute name="form" use="prohibited"/>\r
+ <xs:attribute name="minOccurs" use="prohibited"/>\r
+ <xs:attribute name="maxOccurs" use="prohibited"/>\r
+ <xs:attribute name="name" use="required" type="xs:NCName"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="localElement">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:element">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0">\r
+ <xs:element name="simpleType" type="xs:localSimpleType"/>\r
+ <xs:element name="complexType" type="xs:localComplexType"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="substitutionGroup" use="prohibited"/>\r
+ <xs:attribute name="final" use="prohibited"/>\r
+ <xs:attribute name="abstract" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="element" type="xs:topLevelElement" id="element">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="group" abstract="true">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ group type for explicit groups, named top-level groups and\r
+ group references</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:attributeGroup ref="xs:defRef"/>\r
+ <xs:attributeGroup ref="xs:occurs"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="realGroup">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:group">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0" maxOccurs="1">\r
+ <xs:element ref="xs:all"/>\r
+ <xs:element ref="xs:choice"/>\r
+ <xs:element ref="xs:sequence"/>\r
+ </xs:choice>\r
+ </xs:sequence>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="namedGroup">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:realGroup">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="1" maxOccurs="1">\r
+ <xs:element name="all">\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:all">\r
+ <xs:group ref="xs:allModel"/>\r
+ <xs:attribute name="minOccurs" use="prohibited"/>\r
+ <xs:attribute name="maxOccurs" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ <xs:element name="choice" type="xs:simpleExplicitGroup"/>\r
+ <xs:element name="sequence" type="xs:simpleExplicitGroup"/>\r
+ </xs:choice>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" use="required" type="xs:NCName"/>\r
+ <xs:attribute name="ref" use="prohibited"/>\r
+ <xs:attribute name="minOccurs" use="prohibited"/>\r
+ <xs:attribute name="maxOccurs" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="groupRef">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:realGroup">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="ref" use="required" type="xs:QName"/>\r
+ <xs:attribute name="name" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="explicitGroup">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ group type for the three kinds of group</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:group">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" type="xs:NCName" use="prohibited"/>\r
+ <xs:attribute name="ref" type="xs:QName" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="simpleExplicitGroup">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:explicitGroup">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="minOccurs" use="prohibited"/>\r
+ <xs:attribute name="maxOccurs" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:group name="allModel">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:annotation>\r
+ <xs:documentation>This choice with min/max is here to\r
+ avoid a pblm with the Elt:All/Choice/Seq\r
+ Particle derivation constraint</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:element name="element" type="xs:narrowMaxMin"/>\r
+ </xs:choice>\r
+ </xs:sequence>\r
+ </xs:group>\r
+ \r
+ \r
+ <xs:complexType name="narrowMaxMin">\r
+ <xs:annotation>\r
+ <xs:documentation>restricted max/min</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:localElement">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:choice minOccurs="0">\r
+ <xs:element name="simpleType" type="xs:localSimpleType"/>\r
+ <xs:element name="complexType" type="xs:localComplexType"/>\r
+ </xs:choice>\r
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="minOccurs" use="optional" default="1">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:nonNegativeInteger">\r
+ <xs:enumeration value="0"/>\r
+ <xs:enumeration value="1"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:attribute name="maxOccurs" use="optional" default="1">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:allNNI">\r
+ <xs:enumeration value="0"/>\r
+ <xs:enumeration value="1"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="all">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Only elements allowed inside</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:explicitGroup">\r
+ <xs:group ref="xs:allModel"/>\r
+ <xs:attribute name="minOccurs" use="optional" default="1">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:nonNegativeInteger">\r
+ <xs:enumeration value="0"/>\r
+ <xs:enumeration value="1"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:attribute name="maxOccurs" use="optional" default="1">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:allNNI">\r
+ <xs:enumeration value="1"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="all" id="all" type="xs:all">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="choice" type="xs:explicitGroup" id="choice">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="sequence" type="xs:explicitGroup" id="sequence">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="group" type="xs:namedGroup" id="group">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="wildcard">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>\r
+ <xs:attribute name="processContents" use="optional" default="strict">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:NMTOKEN">\r
+ <xs:enumeration value="skip"/>\r
+ <xs:enumeration value="lax"/>\r
+ <xs:enumeration value="strict"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="any" id="any">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:wildcard">\r
+ <xs:attributeGroup ref="xs:occurs"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ simple type for the value of the 'namespace' attr of\r
+ 'any' and 'anyAttribute'</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Value is\r
+ ##any - - any non-conflicting WFXML/attribute at all\r
+\r
+ ##other - - any non-conflicting WFXML/attribute from\r
+ namespace other than targetNS\r
+\r
+ ##local - - any unqualified non-conflicting WFXML/attribute \r
+\r
+ one or - - any non-conflicting WFXML/attribute from\r
+ more URI the listed namespaces\r
+ references\r
+ (space separated)\r
+\r
+ ##targetNamespace or ##local may appear in the above list, to\r
+ refer to the targetNamespace of the enclosing\r
+ schema or an absent targetNamespace respectively</xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:simpleType name="namespaceList">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:union>\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:token">\r
+ <xs:enumeration value="##any"/>\r
+ <xs:enumeration value="##other"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType>\r
+ <xs:list>\r
+ <xs:simpleType>\r
+ <xs:union memberTypes="xs:anyURI">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:token">\r
+ <xs:enumeration value="##targetNamespace"/>\r
+ <xs:enumeration value="##local"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+ </xs:list>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+\r
+ <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="attributeGroup" abstract="true">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:group ref="xs:attrDecls"/>\r
+ <xs:attributeGroup ref="xs:defRef"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ \r
+ <xs:complexType name="namedAttributeGroup">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:attributeGroup">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:attrDecls"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" use="required" type="xs:NCName"/>\r
+ <xs:attribute name="ref" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="attributeGroupRef">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:attributeGroup">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="ref" use="required" type="xs:QName"/>\r
+ <xs:attribute name="name" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="include" id="include">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="redefine" id="redefine">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:openAttrs">\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element ref="xs:annotation"/>\r
+ <xs:group ref="xs:redefinable"/>\r
+ </xs:choice>\r
+ <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>\r
+ <xs:attribute name="id" type="xs:ID"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="import" id="import">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="namespace" type="xs:anyURI"/>\r
+ <xs:attribute name="schemaLocation" type="xs:anyURI"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="selector" id="selector">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="xpath" use="required">\r
+ <xs:simpleType>\r
+ <xs:annotation>\r
+ <xs:documentation>A subset of XPath expressions for use\r
+in selectors</xs:documentation>\r
+ <xs:documentation>A utility type, not for public\r
+use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:token">\r
+ <xs:annotation>\r
+ <xs:documentation>The following pattern is intended to allow XPath\r
+ expressions per the following EBNF:\r
+ Selector ::= Path ( '|' Path )* \r
+ Path ::= ('.//')? Step ( '/' Step )* \r
+ Step ::= '.' | NameTest \r
+ NameTest ::= QName | '*' | NCName ':' '*' \r
+ child:: is also allowed\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">\r
+ </xs:pattern>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="field" id="field">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="xpath" use="required">\r
+ <xs:simpleType>\r
+ <xs:annotation>\r
+ <xs:documentation>A subset of XPath expressions for use\r
+in fields</xs:documentation>\r
+ <xs:documentation>A utility type, not for public\r
+use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:token">\r
+ <xs:annotation>\r
+ <xs:documentation>The following pattern is intended to allow XPath\r
+ expressions per the same EBNF as for selector,\r
+ with the following change:\r
+ Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) \r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">\r
+ </xs:pattern>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="keybase">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:selector"/>\r
+ <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" type="xs:NCName" use="required"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:group name="identityConstraint">\r
+ <xs:annotation>\r
+ <xs:documentation>The three kinds of identity constraints, all with\r
+ type of or derived from 'keybase'.\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:choice>\r
+ <xs:element ref="xs:unique"/>\r
+ <xs:element ref="xs:key"/>\r
+ <xs:element ref="xs:keyref"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:element name="unique" type="xs:keybase" id="unique">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element name="key" type="xs:keybase" id="key">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element name="keyref" id="keyref">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:keybase">\r
+ <xs:attribute name="refer" type="xs:QName" use="required"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="notation" id="notation">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="name" type="xs:NCName" use="required"/>\r
+ <xs:attribute name="public" type="xs:public"/>\r
+ <xs:attribute name="system" type="xs:anyURI"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:simpleType name="public">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ <xs:documentation>\r
+ A public identifier, per ISO 8879</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:token"/>\r
+ </xs:simpleType>\r
+\r
+ <xs:element name="appinfo" id="appinfo">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>\r
+ </xs:annotation>\r
+ <xs:complexType mixed="true">\r
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
+ <xs:any processContents="lax"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="source" type="xs:anyURI"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="documentation" id="documentation">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>\r
+ </xs:annotation>\r
+ <xs:complexType mixed="true">\r
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
+ <xs:any processContents="lax"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="source" type="xs:anyURI"/>\r
+ <xs:attribute ref="xml:lang"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="annotation" id="annotation">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:openAttrs">\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element ref="xs:appinfo"/>\r
+ <xs:element ref="xs:documentation"/>\r
+ </xs:choice>\r
+ <xs:attribute name="id" type="xs:ID"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ notations for use within XML Schema schemas</xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/>\r
+ <xs:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/>\r
+ \r
+ <xs:complexType name="anyType" mixed="true">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Not the real urType, but as close an approximation as we can\r
+ get in the XML representation</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:sequence>\r
+ <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>\r
+ </xs:sequence>\r
+ <xs:anyAttribute processContents="lax"/>\r
+ </xs:complexType>\r
+\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ First the built-in primitive datatypes. These definitions are for\r
+ information only, the real built-in definitions are magic.\r
+ </xs:documentation>\r
+\r
+ <xs:documentation>\r
+ For each built-in datatype in this schema (both primitive and\r
+ derived) can be uniquely addressed via a URI constructed\r
+ as follows:\r
+ 1) the base URI is the URI of the XML Schema namespace\r
+ 2) the fragment identifier is the name of the datatype\r
+\r
+ For example, to address the int datatype, the URI is:\r
+\r
+ http://www.w3.org/2001/XMLSchema#int\r
+\r
+ Additionally, each facet definition element can be uniquely\r
+ addressed via a URI constructed as follows:\r
+ 1) the base URI is the URI of the XML Schema namespace\r
+ 2) the fragment identifier is the name of the facet\r
+\r
+ For example, to address the maxInclusive facet, the URI is:\r
+\r
+ http://www.w3.org/2001/XMLSchema#maxInclusive\r
+\r
+ Additionally, each facet usage in a built-in datatype definition\r
+ can be uniquely addressed via a URI constructed as follows:\r
+ 1) the base URI is the URI of the XML Schema namespace\r
+ 2) the fragment identifier is the name of the datatype, followed\r
+ by a period (".") followed by the name of the facet\r
+\r
+ For example, to address the usage of the maxInclusive facet in\r
+ the definition of int, the URI is:\r
+\r
+ http://www.w3.org/2001/XMLSchema#int.maxInclusive\r
+\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:simpleType name="string" id="string">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#string"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="preserve" id="string.preserve"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="boolean" id="boolean">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="finite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="boolean.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="float" id="float">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="total"/>\r
+ <hfp:hasProperty name="bounded" value="true"/>\r
+ <hfp:hasProperty name="cardinality" value="finite"/>\r
+ <hfp:hasProperty name="numeric" value="true"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#float"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="float.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="double" id="double">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="total"/>\r
+ <hfp:hasProperty name="bounded" value="true"/>\r
+ <hfp:hasProperty name="cardinality" value="finite"/>\r
+ <hfp:hasProperty name="numeric" value="true"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="decimal" id="decimal">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="totalDigits"/>\r
+ <hfp:hasFacet name="fractionDigits"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="total"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="true"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="duration" id="duration">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#duration"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="duration.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="dateTime" id="dateTime">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="time" id="time">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#time"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="time.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="date" id="date">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#date"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="date.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="gYearMonth" id="gYearMonth">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="gYearMonth.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="gYear" id="gYear">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYear"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="gYear.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="gMonthDay" id="gMonthDay">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="gMonthDay.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="gDay" id="gDay">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gDay"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="gDay.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="gMonth" id="gMonth">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="maxInclusive"/>\r
+ <hfp:hasFacet name="maxExclusive"/>\r
+ <hfp:hasFacet name="minInclusive"/>\r
+ <hfp:hasFacet name="minExclusive"/>\r
+ <hfp:hasProperty name="ordered" value="partial"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="gMonth.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="hexBinary" id="hexBinary">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#binary"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="hexBinary.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="base64Binary" id="base64Binary">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="base64Binary.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="anyURI" id="anyURI">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="anyURI.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="QName" id="QName">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#QName"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="QName.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="NOTATION" id="NOTATION">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>\r
+ <xs:documentation>\r
+ NOTATION cannot be used directly in a schema; rather a type\r
+ must be derived from it by specifying at least one enumeration\r
+ facet whose value is the name of a NOTATION declared in the\r
+ schema.\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:anySimpleType">\r
+ <xs:whiteSpace value="collapse" fixed="true" id="NOTATION.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Now the derived primitive types\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+\r
+ <xs:simpleType name="normalizedString" id="normalizedString">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:string">\r
+ <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="token" id="token">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#token"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:normalizedString">\r
+ <xs:whiteSpace value="collapse" id="token.whiteSpace"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="language" id="language">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#language"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:token">\r
+ <xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.ietf.org/rfc/rfc3066.txt">\r
+ pattern specifies the content of section 2.12 of XML 1.0e2\r
+ and RFC 3066 (Revised version of RFC 1766).\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:pattern>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="IDREFS" id="IDREFS">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>\r
+ </xs:annotation>\r
+ <xs:restriction>\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:IDREF"/>\r
+ </xs:simpleType>\r
+ <xs:minLength value="1" id="IDREFS.minLength"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="ENTITIES" id="ENTITIES">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>\r
+ </xs:annotation>\r
+ <xs:restriction>\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:ENTITY"/>\r
+ </xs:simpleType>\r
+ <xs:minLength value="1" id="ENTITIES.minLength"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="NMTOKEN" id="NMTOKEN">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:token">\r
+ <xs:pattern value="\c+" id="NMTOKEN.pattern">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">\r
+ pattern matches production 7 from the XML spec\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:pattern>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="NMTOKENS" id="NMTOKENS">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasFacet name="length"/>\r
+ <hfp:hasFacet name="minLength"/>\r
+ <hfp:hasFacet name="maxLength"/>\r
+ <hfp:hasFacet name="enumeration"/>\r
+ <hfp:hasFacet name="whiteSpace"/>\r
+ <hfp:hasFacet name="pattern"/>\r
+ <hfp:hasProperty name="ordered" value="false"/>\r
+ <hfp:hasProperty name="bounded" value="false"/>\r
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
+ <hfp:hasProperty name="numeric" value="false"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>\r
+ </xs:annotation>\r
+ <xs:restriction>\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:NMTOKEN"/>\r
+ </xs:simpleType>\r
+ <xs:minLength value="1" id="NMTOKENS.minLength"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="Name" id="Name">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#Name"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:token">\r
+ <xs:pattern value="\i\c*" id="Name.pattern">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Name">\r
+ pattern matches production 5 from the XML spec\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:pattern>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="NCName" id="NCName">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NCName"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:Name">\r
+ <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">\r
+ pattern matches production 4 from the Namespaces in XML spec\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:pattern>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="ID" id="ID">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ID"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:NCName"/>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="IDREF" id="IDREF">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:NCName"/>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="ENTITY" id="ENTITY">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:NCName"/>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="integer" id="integer">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#integer"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:decimal">\r
+ <xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>\r
+ <xs:pattern value="[\-+]?[0-9]+"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:integer">\r
+ <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="negativeInteger" id="negativeInteger">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:nonPositiveInteger">\r
+ <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="long" id="long">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasProperty name="bounded" value="true"/>\r
+ <hfp:hasProperty name="cardinality" value="finite"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#long"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:integer">\r
+ <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>\r
+ <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="int" id="int">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#int"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:long">\r
+ <xs:minInclusive value="-2147483648" id="int.minInclusive"/>\r
+ <xs:maxInclusive value="2147483647" id="int.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="short" id="short">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#short"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:int">\r
+ <xs:minInclusive value="-32768" id="short.minInclusive"/>\r
+ <xs:maxInclusive value="32767" id="short.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="byte" id="byte">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#byte"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:short">\r
+ <xs:minInclusive value="-128" id="byte.minInclusive"/>\r
+ <xs:maxInclusive value="127" id="byte.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:integer">\r
+ <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="unsignedLong" id="unsignedLong">\r
+ <xs:annotation>\r
+ <xs:appinfo>\r
+ <hfp:hasProperty name="bounded" value="true"/>\r
+ <hfp:hasProperty name="cardinality" value="finite"/>\r
+ </xs:appinfo>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:nonNegativeInteger">\r
+ <xs:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="unsignedInt" id="unsignedInt">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:unsignedLong">\r
+ <xs:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="unsignedShort" id="unsignedShort">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:unsignedInt">\r
+ <xs:maxInclusive value="65535" id="unsignedShort.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="unsignedByte" id="unsignedByte">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:unsignedShort">\r
+ <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="positiveInteger" id="positiveInteger">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:nonNegativeInteger">\r
+ <xs:minInclusive value="1" id="positiveInteger.minInclusive"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:simpleType name="derivationControl">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:NMTOKEN">\r
+ <xs:enumeration value="substitution"/>\r
+ <xs:enumeration value="extension"/>\r
+ <xs:enumeration value="restriction"/>\r
+ <xs:enumeration value="list"/>\r
+ <xs:enumeration value="union"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+ <xs:group name="simpleDerivation">\r
+ <xs:choice>\r
+ <xs:element ref="xs:restriction"/>\r
+ <xs:element ref="xs:list"/>\r
+ <xs:element ref="xs:union"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:simpleType name="simpleDerivationSet">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ #all or (possibly empty) subset of {restriction, union, list}\r
+ </xs:documentation>\r
+ <xs:documentation>\r
+ A utility type, not for public use</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:union>\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:token">\r
+ <xs:enumeration value="#all"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType>\r
+ <xs:list>\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:derivationControl">\r
+ <xs:enumeration value="list"/>\r
+ <xs:enumeration value="union"/>\r
+ <xs:enumeration value="restriction"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:list>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+\r
+ <xs:complexType name="simpleType" abstract="true">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:group ref="xs:simpleDerivation"/>\r
+ <xs:attribute name="final" type="xs:simpleDerivationSet"/>\r
+ <xs:attribute name="name" type="xs:NCName">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Can be restricted to required or forbidden\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="topLevelSimpleType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:simpleType">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:simpleDerivation"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" use="required" type="xs:NCName">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Required at the top level\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="localSimpleType">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:simpleType">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ <xs:group ref="xs:simpleDerivation"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="name" use="prohibited">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ Forbidden when nested\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ <xs:attribute name="final" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:group name="facets">\r
+ <xs:annotation>\r
+ <xs:documentation>\r
+ We should use a substitution group for facets, but\r
+ that's ruled out because it would allow users to\r
+ add their own, which we're not ready for yet.\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:choice>\r
+ <xs:element ref="xs:minExclusive"/>\r
+ <xs:element ref="xs:minInclusive"/>\r
+ <xs:element ref="xs:maxExclusive"/>\r
+ <xs:element ref="xs:maxInclusive"/>\r
+ <xs:element ref="xs:totalDigits"/>\r
+ <xs:element ref="xs:fractionDigits"/>\r
+ <xs:element ref="xs:length"/>\r
+ <xs:element ref="xs:minLength"/>\r
+ <xs:element ref="xs:maxLength"/>\r
+ <xs:element ref="xs:enumeration"/>\r
+ <xs:element ref="xs:whiteSpace"/>\r
+ <xs:element ref="xs:pattern"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:group name="simpleRestrictionModel">\r
+ <xs:sequence>\r
+ <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>\r
+ <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ </xs:group>\r
+\r
+ <xs:element name="restriction" id="restriction">\r
+ <xs:complexType>\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-restriction">\r
+ base attribute and simpleType child are mutually\r
+ exclusive, but one or other is required\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:group ref="xs:simpleRestrictionModel"/>\r
+ <xs:attribute name="base" type="xs:QName" use="optional"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="list" id="list">\r
+ <xs:complexType>\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-list">\r
+ itemType attribute and simpleType child are mutually\r
+ exclusive, but one or other is required\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="itemType" type="xs:QName" use="optional"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="union" id="union">\r
+ <xs:complexType>\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-union">\r
+ memberTypes attribute must be non-empty or there must be\r
+ at least one simpleType child\r
+ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:sequence>\r
+ <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="memberTypes" use="optional">\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:QName"/>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="facet">\r
+ <xs:complexContent>\r
+ <xs:extension base="xs:annotated">\r
+ <xs:attribute name="value" use="required"/>\r
+ <xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:complexType name="noFixedFacet">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:facet">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="fixed" use="prohibited"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="minExclusive" id="minExclusive" type="xs:facet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element name="minInclusive" id="minInclusive" type="xs:facet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="maxExclusive" id="maxExclusive" type="xs:facet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element name="maxInclusive" id="maxInclusive" type="xs:facet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:complexType name="numFacet">\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:facet">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+\r
+ <xs:element name="totalDigits" id="totalDigits">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:numFacet">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="value" type="xs:positiveInteger" use="required"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ <xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="length" id="length" type="xs:numFacet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-length"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element name="minLength" id="minLength" type="xs:numFacet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element name="maxLength" id="maxLength" type="xs:numFacet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>\r
+ </xs:annotation>\r
+ </xs:element>\r
+\r
+ <xs:element name="whiteSpace" id="whiteSpace">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:facet">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="value" use="required">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:NMTOKEN">\r
+ <xs:enumeration value="preserve"/>\r
+ <xs:enumeration value="replace"/>\r
+ <xs:enumeration value="collapse"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+ <xs:element name="pattern" id="pattern">\r
+ <xs:annotation>\r
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>\r
+ </xs:annotation>\r
+ <xs:complexType>\r
+ <xs:complexContent>\r
+ <xs:restriction base="xs:noFixedFacet">\r
+ <xs:sequence>\r
+ <xs:element ref="xs:annotation" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute name="value" type="xs:string" use="required"/>\r
+ <xs:anyAttribute namespace="##other" processContents="lax"/>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+\r
+</xs:schema>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="2.0" xmlns:tns="http://www.simantics.org/xml/sax/configuration/" targetNamespace="http://www.simantics.org/xml/sax/configuration/" elementFormDefault="qualified">
+ \r
+ <element name="Configuration" type="tns:Configuration"></element>
+ <complexType name="Configuration">
+ <sequence maxOccurs="unbounded" minOccurs="0">
+ <element ref="tns:ConversionRule"></element>
+ </sequence>\r
+ </complexType> \r
+ \r
+ <complexType name="ConversionRule"></complexType>\r
+ <element name="ConversionRule" type="tns:ConversionRule"></element>\r
+\r
+ <element name="Attribute" type="tns:Attribute"></element>\r
+ <complexType name="Attribute">\r
+ <attribute name="Type" type="string"></attribute> \r
+ <attribute name="Name" type="string"></attribute>\r
+ </complexType>\r
+ \r
+ <element name="Element" type="tns:Element"></element>\r
+ <complexType name="Element">\r
+ <attribute name="Name" type="string"></attribute>\r
+ </complexType>\r
+ \r
+ <element name="ComplexType" type="tns:ComplexType"></element>\r
+ <complexType name="ComplexType">\r
+ <attribute name="Name" type="string"></attribute>\r
+ </complexType>\r
+
+ <element name="AttributeComposition" substitutionGroup="tns:ConversionRule">
+ <complexType>
+ <complexContent>
+ <extension base="tns:ConversionRule">
+ <sequence maxOccurs="unbounded" minOccurs="1">
+ <element ref="tns:Attribute">\r
+ </element>\r
+ </sequence>\r
+ <attribute name="Type" type="string"></attribute>\r
+ <attribute name="Name" type="string"></attribute>\r
+ </extension>\r
+ </complexContent>\r
+ </complexType>\r
+ </element>\r
+ \r
+ <element name="IDProvider" substitutionGroup="tns:ConversionRule">\r
+ <complexType>\r
+ <complexContent>\r
+ <extension base="tns:ConversionRule">\r
+ <sequence>\r
+ <choice>\r
+ <element ref="tns:Element"></element>\r
+ <element ref="tns:ComplexType"></element>\r
+ </choice>\r
+ <element ref="tns:Attribute"></element>\r
+ </sequence>\r
+ <attribute name="Priority" type="integer" use="optional"></attribute>\r
+ </extension>\r
+ </complexContent>\r
+ </complexType>\r
+ </element>\r
+ \r
+ <element name="IDReference" substitutionGroup="tns:ConversionRule">\r
+ <complexType>\r
+ <complexContent>\r
+ <extension base="tns:ConversionRule">\r
+ <sequence>\r
+ <choice>\r
+ <element ref="tns:Element"></element>\r
+ <element ref="tns:ComplexType"></element>\r
+ </choice>\r
+ <element name="IDSource" type="tns:Attribute"></element>\r
+ <element name="Reference" type="tns:Attribute"></element>\r
+ </sequence>\r
+ </extension>\r
+ </complexContent>\r
+ </complexType>\r
+ </element>\r
+\r
+ \r
+ <element name="UnrecognizedChildElement" substitutionGroup="tns:ConversionRule">\r
+ <complexType>\r
+ <complexContent>\r
+ <extension base="tns:ConversionRule">\r
+ <sequence>\r
+ <choice>\r
+ <element ref="tns:Element"></element>\r
+ <element ref="tns:ComplexType"></element>\r
+ </choice>\r
+ <element name="JavaMethod" type="string"></element>\r
+ </sequence>\r
+ </extension>\r
+ </complexContent>\r
+ </complexType>\r
+ </element>
+
+ <element name="OrderedChild" substitutionGroup="tns:ConversionRule">\r
+ <complexType>\r
+ <complexContent>\r
+ <extension base="tns:ConversionRule">\r
+ <sequence>\r
+ <choice>\r
+ <element ref="tns:Element"></element>\r
+ <element ref="tns:ComplexType"></element>\r
+ </choice>\r
+ <element name="Child" type="tns:Element" minOccurs="0"></element>\r
+ </sequence>\r
+ <attribute name="Type" type="string"></attribute>\r
+ <attribute name="Value" type="string"></attribute>\r
+ </extension>\r
+ </complexContent>\r
+ </complexType>\r
+ </element>
+</schema>
\ No newline at end of file
--- /dev/null
+"c:\Program Files\Java\jdk1.8.0_60\bin\xjc" -d ../src configuration.xsd\r
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import java.io.File;\r
+import java.io.IOException;\r
+import java.io.PrintWriter;\r
+import java.io.StringWriter;\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import javax.xml.namespace.QName;\r
+\r
+import org.simantics.utils.datastructures.BijectionMap;\r
+import org.simantics.utils.datastructures.Pair;\r
+import org.simantics.xml.sax.configuration.AttributeComposition;\r
+import org.simantics.xml.sax.configuration.Configuration;\r
+import org.simantics.xml.sax.configuration.IDProvider;\r
+import org.simantics.xml.sax.configuration.IDReference;\r
+import org.simantics.xml.sax.configuration.UnrecognizedChildElement;\r
+import org.w3._2001.xmlschema.Annotated;\r
+import org.w3._2001.xmlschema.Attribute;\r
+import org.w3._2001.xmlschema.AttributeGroup;\r
+import org.w3._2001.xmlschema.AttributeGroupRef;\r
+import org.w3._2001.xmlschema.ComplexType;\r
+import org.w3._2001.xmlschema.Element;\r
+import org.w3._2001.xmlschema.LocalComplexType;\r
+import org.w3._2001.xmlschema.LocalSimpleType;\r
+import org.w3._2001.xmlschema.NamedAttributeGroup;\r
+import org.w3._2001.xmlschema.OpenAttrs;\r
+import org.w3._2001.xmlschema.Restriction;\r
+import org.w3._2001.xmlschema.Schema;\r
+import org.w3._2001.xmlschema.SimpleType;\r
+import org.w3._2001.xmlschema.TopLevelAttribute;\r
+\r
+public class ImporterGenerator extends SchemaConversionBase{\r
+ \r
+ public ImporterGenerator(Configuration configuration) {\r
+ super(configuration);\r
+ }\r
+\r
+ String commentTag = "//";\r
+ \r
+ Schema schema;\r
+ String ontologyClassName;\r
+ SchemaConverter converter;\r
+ \r
+ List<String> ruleClassNames = new ArrayList<String>();\r
+ \r
+ String ontShort = "ONT"; \r
+ \r
+ File importParserDir;\r
+ String elementPackageName;\r
+ \r
+ public void createParser(Schema schema,String className, SchemaConverter converter) throws IOException {\r
+ this.schema = schema;\r
+ this.ontologyClassName = className;\r
+ this.converter = converter;\r
+ \r
+ \r
+ String packageParts[] = className.split("\\.");\r
+ String name = packageParts[packageParts.length-1];\r
+ \r
+ \r
+ ontShort = name.substring(0, 3).toUpperCase();\r
+ ontShort +=".";\r
+ String parserPackagePostfix = "_elem";\r
+ String importerClassPostfix = "Importer";\r
+ elementPackageName = name+parserPackagePostfix;\r
+ \r
+ importParserDir= new File(converter.getParserDir().getAbsolutePath()+"/"+elementPackageName);\r
+ if (!importParserDir.exists())\r
+ importParserDir.mkdirs();\r
+ \r
+ handle(schema);\r
+ \r
+ File importParserFile = new File(converter.getParserDir().getAbsolutePath()+"/"+name+importerClassPostfix+".java");\r
+ PrintWriter mainWriter = createFile(importParserFile);\r
+ mainWriter.println("package " + converter.getPluginName() +";");\r
+ mainWriter.println();\r
+ mainWriter.println("import java.io.File;");\r
+ mainWriter.println("import org.simantics.db.Session;");\r
+ mainWriter.println("import org.simantics.xml.sax.base.AbstractImporter;");\r
+ mainWriter.println("import org.simantics.xml.sax.base.XMLParser;");\r
+ mainWriter.println();\r
+ mainWriter.println("public class " + name + importerClassPostfix+" extends AbstractImporter {");\r
+ mainWriter.println();\r
+ mainWriter.println(" public " + name + importerClassPostfix+"(Session session, File file) {");\r
+ mainWriter.println(" super(session,file);");\r
+ mainWriter.println(" }");\r
+ mainWriter.println();\r
+ mainWriter.println(" @Override");\r
+ mainWriter.println(" public void configure(XMLParser parser) {");\r
+ for (String s : ruleClassNames) {\r
+ mainWriter.println(" parser.add(new "+s+"());");\r
+ }\r
+ mainWriter.println(" }");\r
+ mainWriter.println("}");\r
+ \r
+ mainWriter.println();\r
+ mainWriter.flush();\r
+ mainWriter.close();\r
+ }\r
+ \r
+ protected PrintWriter createFile(File file) throws IOException {\r
+ if (!file.exists())\r
+ file.createNewFile();\r
+ PrintWriter writer = new PrintWriter(file);\r
+ for (String s : converter.getHeader()) {\r
+ writer.println(commentTag + " " + s); \r
+ }\r
+ writer.println();\r
+ return writer;\r
+ }\r
+ \r
+ protected String getValueGetter(String binding,String name) {\r
+ if (binding == null)\r
+ return name+".getValue()";\r
+ if ("STRING".equals(binding))\r
+ return name+".getValue()";\r
+ if ("BOOLEAN".equals(binding))\r
+ return "Boolean.parseBoolean("+name+".getValue())";\r
+ if ("INTEGER".equals(binding))\r
+ return "Integer.parseInt("+name+".getValue())";\r
+ if ("DOUBLE".equals(binding))\r
+ return "Double.parseDouble("+name+".getValue())";\r
+ if ("FLOAT".equals(binding))\r
+ return "Float.parseFloat("+name+".getValue())";\r
+ return name+".getValue()";\r
+ }\r
+ \r
+ protected String getValueGetter(String binding) {\r
+ if (binding == null)\r
+ return "value";\r
+ if ("STRING".equals(binding))\r
+ return "value";\r
+ if ("BOOLEAN".equals(binding))\r
+ return "Boolean.parseBoolean(value)";\r
+ if ("INTEGER".equals(binding))\r
+ return "Integer.parseInt(value)";\r
+ if ("DOUBLE".equals(binding))\r
+ return "Double.parseDouble(value)";\r
+ if ("FLOAT".equals(binding))\r
+ return "Float.parseFloat(value)";\r
+ return "value";\r
+ }\r
+ \r
+ protected void handle(TopLevelAttribute topLevelAttribute) {\r
+\r
+ }\r
+ \r
+\r
+ \r
+ public static String getComplexTypePrefix() {\r
+ return "ComplexTypes_";\r
+ } \r
+ \r
+ public static String getAttributeGroupPrefix() {\r
+ return "AttributeGroups_";\r
+ }\r
+ \r
+ private Map<SchemaObject, FileWriter> writers = new HashMap<SchemaObject, ImporterGenerator.FileWriter>();\r
+ @Override\r
+ protected void handleComplexType(SchemaObject complexTypeObj) {\r
+ ComplexType topLevelComplexType = complexTypeObj.getComplexType();\r
+ \r
+ String name = getName(complexTypeObj);//topLevelComplexType.getName();\r
+ \r
+ String className = name;//"_"+name;\r
+ \r
+ FileWriter fw = new FileWriter();\r
+ try {\r
+ fw.writer = createFile(new File(importParserDir.getAbsolutePath()+"/"+className+".java"));\r
+ } catch (IOException e) {\r
+ throw new RuntimeException(e);\r
+ }\r
+ writers.put(complexTypeObj, fw);\r
+ \r
+ boolean isList = false;\r
+\r
+ String baseClass = "org.simantics.xml.sax.base.XMLElementNamedChildParserBase";\r
+ \r
+ boolean inherited = false;\r
+ \r
+ QName type = getComplexTypeBase(topLevelComplexType);\r
+ if (type != null && !type.getNamespaceURI().equals("http://www.w3.org/2001/XMLSchema")) {\r
+ baseClass = getName(complexTypeName.get(type.getLocalPart()));\r
+ inherited = true;\r
+ }\r
+ \r
+ provider = getIDProvider(topLevelComplexType);\r
+ List<IDReference> references = getIDReferences(topLevelComplexType);\r
+ UnrecognizedChildElement unknownChildElement = getUnknown(topLevelComplexType);\r
+\r
+ List<String> intrerfaces = new ArrayList<String>();\r
+ if (references.size() > 0)\r
+ intrerfaces.add("org.simantics.xml.sax.base.IDReferenceParser");\r
+ if (unknownChildElement != null)\r
+ intrerfaces.add("org.simantics.xml.sax.base.UnrecognizedElementParser");\r
+ \r
+ createClassHeader(fw.writer, isList);\r
+ writeClass(fw.writer,true, null, className, baseClass, intrerfaces);\r
+ \r
+ writeIDProvider(fw.writer);\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public Resource create(WriteGraph graph, Element element) throws DatabaseException{");\r
+ fw.writer.println(" Layer0 L0 = Layer0.getInstance(graph);");\r
+ fw.writer.println(" "+getOntologyImport());\r
+ if (!isList) {\r
+ fw.writer.println(" Resource res = graph.newResource();");\r
+ fw.writer.println(" graph.claim(res, L0.InstanceOf, "+ontShort+name+");");\r
+ } else {\r
+ fw.writer.println(" Resource res = ListUtils.create(graph, "+ontShort+name+", Collections.EMPTY_LIST);");\r
+ }\r
+ fw.writer.println(" return res;");\r
+ fw.writer.println(" }");\r
+ fw.writer.println();\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public boolean connectParent(WriteGraph graph, Element parent, Element element) throws DatabaseException{");\r
+ fw.writer.println(" "+getOntologyImport());\r
+ fw.writer.println(" graph.claim(parent.getData(), "+this.ontShort+getName(complexTypeObj,"has")+", element.getData());");\r
+ fw.writer.println(" return true;");\r
+ fw.writer.println(" }");\r
+ fw.writer.println();\r
+ \r
+ StringWriter stringWriter = new StringWriter();\r
+ fw.delayedWriter = new PrintWriter(stringWriter);\r
+ StringWriter stringWriter2 = new StringWriter();\r
+ fw.delayedWriter2 = new PrintWriter(stringWriter2);\r
+ \r
+ fw.writer.println(" public " + className + "() {");\r
+ fw.writer.println(" super();");\r
+ \r
+ handleComplexTypeExtension(complexTypeObj);\r
+ \r
+ fw.writer.println(" }");\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public boolean connectChild(WriteGraph graph, Element element, Element child) throws DatabaseException{");\r
+ fw.writer.println(" "+getOntologyImport());\r
+ \r
+ if (stringWriter.getBuffer().length() > 0) {\r
+ fw.writer.write(stringWriter.toString());\r
+ }\r
+ \r
+ \r
+ fw.writer.println(" return false;");\r
+ fw.writer.println(" }");\r
+ fw.writer.println();\r
+ \r
+ if (stringWriter2.getBuffer().length() > 0) {\r
+ fw.writer.write(stringWriter2.toString());\r
+ }\r
+ \r
+ stringWriter = null;\r
+ fw.delayedWriter.close();\r
+ fw.delayedWriter=null;\r
+ stringWriter2 = null;\r
+ fw.delayedWriter2.close();\r
+ fw.delayedWriter2 = null;\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public void configure(WriteGraph graph, Deque<Element> parents, Element element) throws DatabaseException {");\r
+ if (inherited) {\r
+ fw.writer.println(" super.configure(graph,parents,element);");\r
+ }\r
+ fw.writer.println(" "+getOntologyImport());\r
+ \r
+ handleComplexTypeAttributes(complexTypeObj);\r
+ handleExtensionAttributes(complexTypeObj);\r
+ \r
+ fw.writer.println(" }");\r
+ \r
+ writeIDReferences(fw.writer,name, references);\r
+ writeUnknownChild(fw.writer,name,unknownChildElement);\r
+ \r
+ fw.writer.println("}");\r
+ fw.writer.println();\r
+ fw.writer.flush();\r
+ fw.writer.close();\r
+ fw.writer = null;\r
+ writers.remove(complexTypeObj);\r
+ provider = null;\r
+ }\r
+ \r
+ @Override\r
+ protected void handle(SchemaObject parent, SchemaElement indicator, List<SchemaElement> elements) {\r
+ if (indicator.getType() == SchemaElement.ElementType.SEQUENCE || (indicator.getType() == SchemaElement.ElementType.CHOICE && indicator.getRestriction().many())) {\r
+ for (SchemaElement e : elements) {\r
+ handle(parent, indicator, e);\r
+ }\r
+ } else if (indicator.getType() == SchemaElement.ElementType.CHOICE) {\r
+ String name = getChoiceName(elements);\r
+\r
+ for (SchemaElement e : elements) {\r
+ Element localElement = e.getElement();\r
+ if (localElement.getName() != null) {\r
+ QName refType = localElement.getType();\r
+ if (refType != null)\r
+ handleIndicator(parent, indicator, e, false, name, refType);\r
+ } else if (localElement.getRef() != null) {\r
+ QName refType = localElement.getRef();\r
+ handleIndicator(parent, indicator, e, true, name, refType);\r
+ }\r
+ }\r
+ }\r
+ \r
+ }\r
+ \r
+ @Override\r
+ protected void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String ref, QName refType) {\r
+ FileWriter fw = getWriter(parent);\r
+ String binding = getBindingFromPrimitiveType(refType);\r
+ if (binding == null) {\r
+ SchemaObject refElement = elementName.get(refType.getLocalPart());\r
+ SchemaObject refComplexType = complexTypeName.get(refType.getLocalPart());\r
+// String className = refType.getLocalPart();\r
+// if (!isElementRef(refType.getLocalPart())) { \r
+// className = "_"+className;\r
+// }\r
+// \r
+// String refClassName = refType.getLocalPart();\r
+// if (isComplexTypeRef(refClassName)) {\r
+// refClassName = "_"+refClassName;\r
+// }\r
+ String className = null;\r
+ String refClassName = null;\r
+ if (refElement != null)\r
+ className = getName(refElement);\r
+ else\r
+ className = getName(refComplexType);\r
+ \r
+ if (refComplexType != null) {\r
+ refClassName = getName(refComplexType);\r
+ } else {\r
+ refClassName = getName(refElement);\r
+ }\r
+ \r
+ if (!reference)\r
+ fw.writer.println(" addParser(\""+ ref +"\", "+className+".class);");\r
+ else\r
+ fw.writer.println(" addParser("+className+".class);");\r
+ if (!className.equals(refClassName))\r
+ fw.writer.println(" addParser("+refClassName+".class);");\r
+ \r
+ fw.delayedWriter.println(" if (child.getParser() instanceof "+refClassName+"){");\r
+ fw.delayedWriter.println(" graph.claim(element.getData(), "+ontShort+getName(parent)+"_has"+ref + ", child.getData());");\r
+ if (useElementList(parent, indicator,element, reference, ref, refType)) {\r
+ \r
+ // element type specific list\r
+ fw.delayedWriter.println(" {");\r
+ fw.delayedWriter.println(" Resource list = graph.getPossibleObject(element.getData(),"+ontShort+getName(parent)+"_has"+ref + "List);");\r
+ fw.delayedWriter.println(" if (list == null) {");\r
+ fw.delayedWriter.println(" list = org.simantics.db.common.utils.ListUtils.create(graph, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" graph.claim(element.getData(),"+ontShort+getName(parent)+"_has"+ref + "List,list);");\r
+ fw.delayedWriter.println(" } else {");\r
+ fw.delayedWriter.println(" org.simantics.db.common.utils.ListUtils.insertBack(graph, list, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" }");\r
+ fw.delayedWriter.println(" }");\r
+ }\r
+ if (useOriginalList(parent, indicator,element, reference, ref, refType)) {\r
+ // generic list\r
+ fw.delayedWriter.println(" {");\r
+ fw.delayedWriter.println(" Resource list = graph.getPossibleObject(element.getData(),"+ontShort+"XML_hasOriginalElementList);");\r
+ fw.delayedWriter.println(" if (list == null) {");\r
+ fw.delayedWriter.println(" list = org.simantics.db.common.utils.ListUtils.create(graph, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" graph.claim(element.getData(),"+ontShort+"XML_hasOriginalElementList,list);");\r
+ fw.delayedWriter.println(" } else {");\r
+ fw.delayedWriter.println(" org.simantics.db.common.utils.ListUtils.insertBack(graph, list, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" }");\r
+ fw.delayedWriter.println(" }");\r
+ }\r
+ \r
+ fw.delayedWriter.println(" return true;");\r
+ fw.delayedWriter.println(" }");\r
+ } else {\r
+ //writer.println(commentTag+ontShort+"."+parent+".has"+ref + " <R " + ontShort+".hasElement");\r
+ fw.writer.println(" addParser(\""+ ref +"\", "+getName(parent) +"_" +ref+".class);");\r
+ \r
+ fw.delayedWriter2.println(" public static class " + getName(parent) +"_" +ref+" extends org.simantics.xml.sax.base.ValueElementParser {");\r
+ fw.delayedWriter2.println(" "+ getName(parent) +"_" +ref +"(){");\r
+ fw.delayedWriter2.println(" super(\""+ref+"\"," +this.ontologyClassName+".URIs."+getName(parent) + "_has"+ref+", Bindings."+binding+");");\r
+ fw.delayedWriter2.println(" }");\r
+ fw.delayedWriter2.println(" }");\r
+ }\r
+ }\r
+ \r
+ @Override\r
+ protected void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String ref, OpenAttrs attrs) {\r
+ FileWriter fw = getWriter(parent);\r
+ SchemaObject obj = getWithObj(parent, attrs);\r
+ \r
+// String className = refType.getLocalPart();\r
+// if (!isElementRef(refType.getLocalPart())) { \r
+// className = "_"+className;\r
+// }\r
+// \r
+// String refClassName = refType.getLocalPart();\r
+// if (isComplexTypeRef(refClassName)) {\r
+// refClassName = "_"+refClassName;\r
+// }\r
+ String className = getName(obj);\r
+ \r
+ \r
+ if (!reference)\r
+ fw.writer.println(" addParser(\""+ ref +"\", "+className+".class);");\r
+ else\r
+ fw.writer.println(" addParser("+className+".class);");\r
+ \r
+ fw.delayedWriter.println(" if (child.getParser() instanceof "+className+"){");\r
+ fw.delayedWriter.println(" graph.claim(element.getData(), "+ontShort+getName(parent)+"_has"+ref + ", child.getData());");\r
+ if (useElementList(parent, indicator,element, reference, ref, new QName(obj.getName()))) {\r
+\r
+ // element type specific list\r
+ fw.delayedWriter.println(" {");\r
+ fw.delayedWriter.println(" Resource list = graph.getPossibleObject(element.getData(),"+ontShort+getName(parent)+"_has"+ref + "List);");\r
+ fw.delayedWriter.println(" if (list == null) {");\r
+ fw.delayedWriter.println(" list = org.simantics.db.common.utils.ListUtils.create(graph, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" graph.claim(element.getData(),"+ontShort+getName(parent)+"_has"+ref + "List,list);");\r
+ fw.delayedWriter.println(" } else {");\r
+ fw.delayedWriter.println(" org.simantics.db.common.utils.ListUtils.insertBack(graph, list, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" }");\r
+ fw.delayedWriter.println(" }");\r
+ }\r
+ if (useOriginalList(parent, indicator,element, reference, ref, new QName(obj.getName()))) {\r
+ // generic list\r
+ fw.delayedWriter.println(" {");\r
+ fw.delayedWriter.println(" Resource list = graph.getPossibleObject(element.getData(),"+ontShort+"XML_hasOriginalElementList);");\r
+ fw.delayedWriter.println(" if (list == null) {");\r
+ fw.delayedWriter.println(" list = org.simantics.db.common.utils.ListUtils.create(graph, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" graph.claim(element.getData(),"+ontShort+"XML_hasOriginalElementList,list);");\r
+ fw.delayedWriter.println(" } else {");\r
+ fw.delayedWriter.println(" org.simantics.db.common.utils.ListUtils.insertBack(graph, list, java.util.Collections.singletonList(child.getData()));");\r
+ fw.delayedWriter.println(" }");\r
+ fw.delayedWriter.println(" }");\r
+ }\r
+ \r
+ fw.delayedWriter.println(" return true;");\r
+ fw.delayedWriter.println(" }");\r
+ \r
+ }\r
+ \r
+ @Override\r
+ protected void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement any) { \r
+ FileWriter fw = getWriter(parent);\r
+ fw.delayedWriter2.println(" @Override");\r
+ fw.delayedWriter2.println(" public Class<? extends org.simantics.xml.sax.base.XMLElementParser> getParser(java.util.Map<java.lang.String,org.simantics.xml.sax.base.XMLElementParser> parsers, Element element, Element child) {");\r
+ fw.delayedWriter2.println(" Class<? extends org.simantics.xml.sax.base.XMLElementParser> parserClass = super.getParser(parsers, element, child);");\r
+ fw.delayedWriter2.println(" if (parserClass != null) return parserClass;");\r
+ fw.delayedWriter2.println(" org.simantics.xml.sax.base.XMLElementParser parser = parsers.get(child.getQName());");\r
+ fw.delayedWriter2.println(" if (parser != null) return parser.getClass();");\r
+ fw.delayedWriter2.println(" return null;");\r
+ fw.delayedWriter2.println(" }");\r
+ }\r
+ \r
+ private FileWriter getWriter(SchemaObject obj) {\r
+ SchemaObject s = obj;\r
+ while (s != null) {\r
+ FileWriter fw = writers.get(s);\r
+ if (fw != null)\r
+ return fw;\r
+ s = s.getParent();\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ \r
+ @Override \r
+ protected void handle(SchemaObject parent, Attribute attribute) {\r
+ String name = attribute.getName();\r
+ QName primitiveType = attribute.getType();\r
+ SimpleType simpleType = attribute.getSimpleType();\r
+ QName ref = attribute.getRef();\r
+ \r
+ String relationName;\r
+ String attrName;\r
+ if (name != null) {\r
+ attrName = name;\r
+ relationName = ontShort+"has"+name;\r
+ if (parent != null)\r
+ relationName = ontShort+getName(parent)+"_has"+name;\r
+ }\r
+ else if (ref != null && parent != null) {\r
+ attrName = ref.getLocalPart();\r
+ relationName = ontShort+getName(parent)+"_has"+ref.getLocalPart();\r
+ \r
+ Attribute referred = getRefAttribute(ref);\r
+ if (referred != null) {\r
+ primitiveType = referred.getType();\r
+ simpleType = referred.getSimpleType();\r
+ }\r
+ \r
+ } else {\r
+ throw new RuntimeException();\r
+ }\r
+ boolean isReference = false;\r
+ if (provider!= null && provider.getAttribute().getName().equals(attrName))\r
+ isReference = true;\r
+ \r
+ FileWriter fw = getWriter(parent);\r
+ if (primitiveType != null) {\r
+ \r
+ String binding = getBindingFromPrimitiveType(primitiveType);\r
+ \r
+ if (binding != null) {\r
+ writeAttribute(fw, attrName, relationName, binding, isReference);\r
+ return;\r
+ } else {\r
+ if (simpleType == null) {\r
+ SchemaObject simpleTypeObj = simpleTypeName.get(primitiveType.getLocalPart());\r
+ if (simpleTypeObj != null)\r
+ simpleType = simpleTypeObj.getSimpleType();\r
+ } \r
+ }\r
+ } \r
+ if (simpleType != null) {\r
+ Restriction restriction = simpleType.getRestriction();\r
+ if (restriction == null)\r
+ throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart()+ ", SimpleType restriction is unset");\r
+ QName base = restriction.getBase();\r
+ \r
+ \r
+ String binding = getBindingFromPrimitiveType(base);\r
+ writeAttribute(fw, attrName, relationName, binding, isReference);\r
+ } else {\r
+ throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart());\r
+ }\r
+ }\r
+ \r
+ private void writeAttribute(FileWriter fw, String attrName, String relationName, String binding, boolean isReference) {\r
+ fw.writer.println(" {");\r
+ fw.writer.println(" Attribute a = element.getAttribute(\"" +attrName+"\");");\r
+ fw.writer.println(" if (a != null) {");\r
+ fw.writer.println(" graph.claimLiteral(element.getData(),"+relationName+","+getValueGetter(binding,"a")+", Bindings."+binding+");");\r
+ if (isReference)\r
+ fw.writer.println(" idProviderValue = a.getValue();"); \r
+ fw.writer.println(" }");\r
+ fw.writer.println(" }");\r
+ }\r
+ \r
+ @Override\r
+ protected void handleAttributes(SchemaObject simpleTypeObj) {\r
+ SchemaObject parent = simpleTypeObj.getParent();\r
+ FileWriter fw = getWriter(parent);\r
+ \r
+ SimpleType simpleType = simpleTypeObj.getSimpleType();\r
+ Restriction restriction = simpleType.getRestriction();\r
+ if (restriction == null)\r
+ throw new RuntimeException("Cannot resolve type for Element " + getName(parent));\r
+ QName base = restriction.getBase();\r
+ \r
+ \r
+ String binding = getBindingFromPrimitiveType(base);\r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public void configure(WriteGraph graph, Element element, java.lang.String value) throws DatabaseException {");\r
+ fw.writer.println(" graph.claimValue(element.getData(),"+getValueGetter(binding)+", Bindings."+binding+");");\r
+ fw.writer.println(" }");\r
+ \r
+ }\r
+ \r
+ @Override\r
+ protected void handle(SchemaObject parent, AttributeGroup attribute) {\r
+ if (parent != null) {\r
+ FileWriter fw = getWriter(parent);\r
+ NamedAttributeGroup group = getAttributeGroup(attribute.getRef().getLocalPart());\r
+ fw.writer.println(commentTag+" AttributeGroup " + group.getName());\r
+ SchemaObject obj = new SchemaObject(parent,attribute);\r
+ for (Annotated annotated : group.getAttributeOrAttributeGroup()) {\r
+ if (annotated instanceof Attribute) {\r
+ //handle("AttributeGroups_"+group.getName(),(Attribute)annotated);\r
+ handle(obj,(Attribute)annotated);\r
+ } else if (annotated instanceof AttributeGroup) {\r
+ //handle("AttributeGroups_"+group.getName(),(AttributeGroup)annotated);\r
+ handle(obj,(AttributeGroup)annotated);\r
+ }\r
+ }\r
+ fw.writer.println(commentTag+" End of AttributeGroup " + group.getName());\r
+ }\r
+ \r
+ }\r
+ \r
+ @Override\r
+ protected void handleAttributeComposition(SchemaObject parent, AttributeComposition composition, BijectionMap<org.simantics.xml.sax.configuration.Attribute, Annotated> attributes) {\r
+ FileWriter fw = getWriter(parent);\r
+ QName type = new QName(CONVERSION_NS, composition.getType());\r
+ String arrayBinding = getBindingFromPrimitiveType(type);\r
+ String javaType = getJavaTypeFromPrimitiveType(type);\r
+ String name = composition.getName();\r
+ \r
+ String relationName;\r
+ if (name != null) {\r
+ relationName = ontShort+"has"+name;\r
+ if (parent != null)\r
+ relationName = ontShort+getName(parent)+"_has"+name;\r
+ } else {\r
+ throw new RuntimeException();\r
+ }\r
+ \r
+ fw.writer.println(" {");\r
+ int i = 0;\r
+ for (org.simantics.xml.sax.configuration.Attribute a : composition.getAttribute())\r
+ fw.writer.println(" Attribute a"+(i++)+" = element.getAttribute(\"" +a.getName()+"\");");\r
+ fw.writer.print (" "+javaType + " value = new "+javaType+"{");\r
+ i = 0;\r
+ // FIXME : handle optional attributes properly.\r
+ for (org.simantics.xml.sax.configuration.Attribute a : composition.getAttribute()) {\r
+ Attribute attribute = ((Attribute)attributes.getRight(a));\r
+ QName atype = getBaseType(attribute);\r
+ String defaultValue = attribute.getDefault();\r
+ if (defaultValue == null)\r
+ defaultValue = getDefaultValue(atype);\r
+ \r
+ String binding = getBindingFromPrimitiveType(atype);\r
+ if (i > 0)\r
+ fw.writer.print(",");\r
+ if (defaultValue != null)\r
+ fw.writer.print("a"+(i)+"!= null ? "+ getValueGetter(binding,"a"+(i++)) + " : " +defaultValue);\r
+ else\r
+ fw.writer.print(getValueGetter(binding,"a"+(i++)));\r
+ }\r
+ fw.writer.println("};");\r
+ fw.writer.println(" graph.claimLiteral(element.getData(),"+relationName+", value, Bindings."+arrayBinding+");");\r
+ fw.writer.println(" }");\r
+ \r
+ }\r
+ \r
+ protected String getDefaultValue(QName atype) {\r
+ Map<String,TypeEntry> types = typeMap.get(atype.getNamespaceURI());\r
+ if (types == null)\r
+ return null;\r
+ TypeEntry entry = types.get(atype.getLocalPart());\r
+ if (entry == null)\r
+ return null;\r
+ return entry.defaultValue;\r
+ }\r
+ \r
+ \r
+ @Override\r
+ protected void handleSimpleType(SchemaObject parent, SchemaObject simpleType) {\r
+\r
+ }\r
+ \r
+ \r
+ \r
+ IDProvider provider;\r
+ @Override\r
+ protected void handleElement(SchemaObject elementObj) {\r
+ Element element = elementObj.getElement();\r
+ \r
+ String name = getName(elementObj);//topLevelElement.getName();\r
+ String className = name;\r
+ \r
+ FileWriter fw = new FileWriter();\r
+ try {\r
+ fw.writer = createFile(new File(importParserDir.getAbsolutePath()+"/"+className+".java"));\r
+ } catch (IOException e) {\r
+ throw new RuntimeException(e);\r
+ }\r
+ writers.put(elementObj, fw);\r
+ boolean isList = false;\r
+ \r
+ Pair<String, Boolean> inhertiance = getElementInheritance(elementObj);\r
+ boolean inherited = inhertiance.second;\r
+ String baseClass = inhertiance.first;//"org.simantics.xml.sax.base.XMLElementParserBase";\r
+ \r
+ \r
+ provider = getIDProvider(element);\r
+ List<IDReference> references = getIDReferences(element);\r
+ UnrecognizedChildElement unknownChildElement = getUnknown(element);\r
+\r
+ List<String> intrerfaces = new ArrayList<String>();\r
+ if (references.size() > 0)\r
+ intrerfaces.add("org.simantics.xml.sax.base.IDReferenceParser");\r
+ if (unknownChildElement != null)\r
+ intrerfaces.add("org.simantics.xml.sax.base.UnrecognizedElementParser");\r
+\r
+ createClassHeader(fw.writer, isList);\r
+ writeClass(fw.writer,false, element.getName(), className, baseClass, intrerfaces);\r
+ writeIDProvider(fw.writer);\r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public Resource create(WriteGraph graph, Element element) throws DatabaseException{");\r
+ fw.writer.println(" Layer0 L0 = Layer0.getInstance(graph);");\r
+ fw.writer.println(" "+getOntologyImport());\r
+ if (!isList) {\r
+ fw.writer.println(" Resource res = graph.newResource();");\r
+ fw.writer.println(" graph.claim(res, L0.InstanceOf, "+ontShort+name+");");\r
+ } else {\r
+ fw.writer.println(" Resource res = ListUtils.create(graph, "+ontShort+name+", Collections.EMPTY_LIST);");\r
+ }\r
+ fw.writer.println(" return res;");\r
+ fw.writer.println(" }");\r
+ fw.writer.println();\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public boolean connectParent(WriteGraph graph, Element parent, Element element) throws DatabaseException{");\r
+ fw.writer.println(" "+getOntologyImport());\r
+ fw.writer.println(" graph.claim(parent.getData(), "+this.ontShort+getName(elementObj,"has")+", element.getData());");\r
+ fw.writer.println(" return true;");\r
+ fw.writer.println(" }");\r
+ fw.writer.println();\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public void configure(WriteGraph graph, Deque<Element> parents, Element element) throws DatabaseException {");\r
+ if (inherited) {\r
+ fw.writer.println(" super.configure(graph,parents,element);");\r
+ }\r
+ fw.writer.println(" "+getOntologyImport());\r
+ \r
+ LocalComplexType complexType = element.getComplexType();\r
+ LocalSimpleType simpleType = element.getSimpleType();\r
+ \r
+ if (complexType != null) {\r
+ SchemaObject obj = complexTypes.get(complexType);\r
+ handleElementComplexTypeAttributes(obj);\r
+ } \r
+ fw.writer.println(" }");\r
+ \r
+ if (simpleType != null) {\r
+ SchemaObject obj = simpleTypes.get(simpleType);\r
+ handleElementSimpleTypeAttributes(obj);\r
+ }\r
+ \r
+ \r
+ StringWriter stringWriter = new StringWriter();\r
+ fw.delayedWriter = new PrintWriter(stringWriter);\r
+ StringWriter stringWriter2 = new StringWriter();\r
+ fw.delayedWriter2 = new PrintWriter(stringWriter2);\r
+ \r
+ fw.writer.println(" public " + className + "() {");\r
+ fw.writer.println(" super();");\r
+ \r
+ if (complexType != null) {\r
+ SchemaObject obj = complexTypes.get(complexType);\r
+ handleComplexTypeExtension(obj);\r
+ } else if (simpleType != null) {\r
+ \r
+ }\r
+ \r
+ fw.writer.println(" }");\r
+ \r
+ fw.writer.println(" @Override");\r
+ fw.writer.println(" public boolean connectChild(WriteGraph graph, Element element, Element child) throws DatabaseException{");\r
+ fw.writer.println(" "+getOntologyImport());\r
+ \r
+ if (stringWriter.getBuffer().length() > 0) {\r
+ fw.writer.write(stringWriter.toString());\r
+ }\r
+ if (inherited) {\r
+ fw.writer.println(" return super.connectChild(graph,element,child);"); \r
+ } else {\r
+ fw.writer.println(" return false;");\r
+ }\r
+ fw.writer.println(" }");\r
+ fw.writer.println();\r
+ \r
+ if (stringWriter2.getBuffer().length() > 0) {\r
+ fw.writer.write(stringWriter2.toString());\r
+ }\r
+ \r
+ stringWriter = null;\r
+ fw.delayedWriter.close();\r
+ fw.delayedWriter = null;\r
+ stringWriter2 = null;\r
+ fw.delayedWriter2.close();\r
+ fw.delayedWriter2 = null;\r
+ \r
+ writeIDReferences(fw.writer,name, references);\r
+ writeUnknownChild(fw.writer,name,unknownChildElement);\r
+\r
+ fw.writer.println("}");\r
+ fw.writer.println();\r
+ fw.writer.flush();\r
+ fw.writer.close();\r
+ fw.writer = null;\r
+ writers.remove(elementObj);\r
+ provider = null;\r
+ \r
+ ruleClassNames.add(converter.getPluginName()+"."+elementPackageName+"."+name);\r
+ }\r
+ \r
+ private Pair<String,Boolean> getElementInheritance(SchemaObject topLevelElementObj) {\r
+ Element topLevelElement = topLevelElementObj.getElement();\r
+ String baseClass = "org.simantics.xml.sax.base.XMLElementNamedChildParserBase";\r
+ boolean inherited = false;\r
+ if (topLevelElement.getType() != null) {\r
+ QName type = topLevelElement.getType();\r
+ if (!type.getNamespaceURI().equals(SCHEMA_NS)) {\r
+ SchemaObject obj = complexTypeName.get(type.getLocalPart());\r
+ baseClass = getName(obj);\r
+ inherited = true;\r
+ } \r
+ }\r
+ if (!inherited) {\r
+ QName type = getElementBase(topLevelElement);\r
+ if (type != null) {\r
+ if (!type.getNamespaceURI().equals(SCHEMA_NS)) {\r
+ SchemaObject obj = getWithName(topLevelElementObj, type.getLocalPart());\r
+ baseClass = getName(obj);\r
+ inherited = true;\r
+ } \r
+ }\r
+ }\r
+ if (!inherited) {\r
+ QName type = topLevelElement.getSubstitutionGroup();\r
+ if (type != null) {\r
+ if (!type.getNamespaceURI().equals(SCHEMA_NS)) {\r
+ SchemaObject obj = getWithName(topLevelElementObj, type.getLocalPart());\r
+ baseClass = getName(obj);\r
+ inherited = true;\r
+ } \r
+ }\r
+ }\r
+ \r
+ return new Pair<String, Boolean>(baseClass, inherited);\r
+ }\r
+ \r
+ private void writeClass(PrintWriter writer,boolean abst, String name, String className, String baseClass, List<String> interfaces) {\r
+ writer.println("@SuppressWarnings(\"unused\")");\r
+ writer.print("public " +(abst ? "abstract " : "") + "class " + className + " extends "+baseClass);\r
+ if (interfaces.size() > 0) {\r
+ writer.print(" implements ");\r
+ for (int i = 0; i < interfaces.size(); i++) {\r
+ writer.print(interfaces.get(i));\r
+ if (i < interfaces.size() -1 )\r
+ writer.print(",");\r
+ }\r
+ }\r
+ writer.println("{");\r
+ writer.println();\r
+ writer.println(" @Override");\r
+ writer.println(" public java.lang.String getElementId() {");\r
+ if (name != null)\r
+ writer.println(" return \""+name+"\";");\r
+ else // complex types cannot be parsed directly with name/id reference.\r
+ writer.println(" return null;");\r
+ writer.println(" }");\r
+ writer.println();\r
+ }\r
+ \r
+ private void writeIDProvider(PrintWriter writer) {\r
+ if (provider != null) {\r
+ writer.println(" java.lang.String idProviderValue = null;");\r
+ writer.println();\r
+ writer.println(" @Override");\r
+ writer.println(" public java.lang.String getID() {");\r
+ writer.println(" java.lang.String s = idProviderValue;");\r
+ writer.println(" idProviderValue = null;");\r
+ writer.println(" return s;");\r
+ writer.println(" }");\r
+ writer.println();\r
+ if (provider.getPriority() != null) {\r
+ writer.println(" @Override");\r
+ writer.println(" public int idPriority() {");\r
+ writer.println(" return " + provider.getPriority().intValue()+";");\r
+ writer.println(" }"); \r
+ }\r
+ }\r
+ }\r
+ \r
+ private void writeIDReferences(PrintWriter writer,String name, List<IDReference> references) {\r
+ if (references.size() > 0) {\r
+ writer.println(" @Override");\r
+ writer.println(" public boolean connectReferences(WriteGraph graph, Element element, java.util.Map<java.lang.String, Element> map) throws DatabaseException {");\r
+ writer.println(" "+getOntologyImport());\r
+ writer.println(" boolean result = true;");\r
+ for (IDReference ref : references) {\r
+ writer.println(" {");\r
+ writer.println(" Attribute a = element.getAttribute(\"" + ref.getIDSource().getName() +"\");");\r
+ writer.println(" if (a != null) {");\r
+ writer.println(" Element refEle = map.get(a.value);");\r
+ writer.println(" if (refEle != null) {");\r
+ writer.println(" Resource ref = refEle.getData();");\r
+ writer.println(" graph.claim(element.getData(), "+ontShort+name+"_"+ref.getReference().getName()+", ref);");\r
+ writer.println(" } else {");\r
+ writer.println(" result = false;");\r
+ writer.println(" }");\r
+ writer.println(" }");\r
+ writer.println(" }");\r
+ }\r
+ writer.println(" return result;");\r
+ writer.println(" }");\r
+ writer.println();\r
+ }\r
+ }\r
+ \r
+ private void writeUnknownChild(PrintWriter writer,String name, UnrecognizedChildElement unknownChildElement) {\r
+ if (unknownChildElement == null)\r
+ return;\r
+ \r
+ writer.println(" @Override");\r
+ writer.println(" public void configureChild(WriteGraph graph, Deque<Element> parents, Element element, Element child) throws DatabaseException {");\r
+ writer.println(" " + unknownChildElement.getJavaMethod());\r
+ writer.println(" }");\r
+ writer.println();\r
+ \r
+ }\r
+ \r
+ protected void createClassHeader(PrintWriter writer, boolean isList) {\r
+ writer.println("package " + converter.getPluginName() +"."+elementPackageName+";");\r
+ writer.println();\r
+ writer.println("import java.util.Deque;");\r
+ writer.println("import org.simantics.databoard.Bindings;");\r
+ writer.println("import org.simantics.db.Resource;");\r
+ writer.println("import org.simantics.db.WriteGraph;");\r
+ writer.println("import org.simantics.db.exception.DatabaseException;");\r
+ writer.println("import org.simantics.xml.sax.base.Attribute;");\r
+ writer.println("import org.simantics.xml.sax.base.Element;");\r
+ if (!isList) {\r
+ writer.println("import org.simantics.layer0.Layer0;");\r
+ } else {\r
+ writer.println("import java.util.Collections;");\r
+ writer.println("import org.simantics.db.common.utils.ListUtils;");\r
+ }\r
+ writer.println();\r
+ }\r
+ \r
+ private String getOntologyImport() {\r
+ return this.ontologyClassName+" " +ontShort.substring(0, 3)+" = "+this.ontologyClassName+".getInstance(graph);";\r
+ }\r
+ \r
+ \r
+ private static class FileWriter {\r
+ public PrintWriter writer;\r
+ \r
+ public PrintWriter delayedWriter;\r
+ public PrintWriter delayedWriter2;\r
+ }\r
+ \r
+ public static String getName(SchemaObject obj) {\r
+ if (obj.getParent() == null) {\r
+ switch (obj.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+obj.getName();\r
+ case ELEMENT:\r
+ return obj.getName();\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+obj.getName();\r
+ case SIMPLE_TYPE:\r
+ return obj.getName();\r
+ }\r
+ } else {\r
+ SchemaObject o = obj;\r
+ SchemaObject prev = null;\r
+ String name = "";\r
+ while (o != null){\r
+ if (o.getName() != null)\r
+ name = o.getName()+"_"+name;\r
+ prev = o;\r
+ o = o.getParent();\r
+ if (prev.getObj() instanceof AttributeGroupRef)\r
+ o = null;\r
+ }\r
+ name = name.substring(0, name.length()-1);\r
+ switch (prev.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+name;\r
+ case ELEMENT:\r
+ return name;\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+name;\r
+ case SIMPLE_TYPE:\r
+ return name;\r
+ }\r
+ }\r
+ throw new RuntimeException();\r
+ \r
+ }\r
+ \r
+ public static String getName(SchemaObject obj, String rel) {\r
+ if (obj.getParent() == null) {\r
+ switch (obj.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+rel+obj.getName();\r
+ case ELEMENT:\r
+ return rel+obj.getName();\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+rel+obj.getName();\r
+ case SIMPLE_TYPE:\r
+ return rel+obj.getName();\r
+ }\r
+ } else {\r
+ SchemaObject o = obj;\r
+ SchemaObject prev = null;\r
+ String name = "";\r
+ while (o != null){\r
+ if (o.getName() != null)\r
+ name = o.getName()+"_"+name;\r
+ prev = o;\r
+ o = o.getParent();\r
+ }\r
+ name = name.substring(0, name.length()-1);\r
+ switch (prev.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+rel+name;\r
+ case ELEMENT:\r
+ return rel+name;\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+rel+name;\r
+ case SIMPLE_TYPE:\r
+ return rel+name;\r
+ }\r
+ }\r
+ throw new RuntimeException();\r
+ \r
+ }\r
+}\r
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import org.w3._2001.xmlschema.Any;\r
+import org.w3._2001.xmlschema.Element;\r
+import org.w3._2001.xmlschema.Group;\r
+\r
+class MultiplicityRestriction {\r
+ long min;\r
+ long max;\r
+ \r
+ public MultiplicityRestriction(Element element) {\r
+ long min = 1;\r
+ if (element.getMinOccurs() != null)\r
+ min = element.getMinOccurs().longValue();\r
+ String element_maxS = element.getMaxOccurs();\r
+ max = 1;\r
+ \r
+ if ("unbounded".equals(element_maxS)) {\r
+ max = -1;\r
+ } else if (element_maxS != null) {\r
+ max = Long.parseLong(element_maxS);\r
+ max = Math.max(min, max);\r
+ }\r
+ }\r
+ \r
+ public MultiplicityRestriction(Group element) {\r
+ long min = 1;\r
+ if (element.getMinOccurs() != null)\r
+ min = element.getMinOccurs().longValue();\r
+ String element_maxS = element.getMaxOccurs();\r
+ max = 1;\r
+ \r
+ if ("unbounded".equals(element_maxS)) {\r
+ max = -1;\r
+ } else if (element_maxS != null) {\r
+ max = Long.parseLong(element_maxS);\r
+ max = Math.max(min, max);\r
+ }\r
+ }\r
+ \r
+ public MultiplicityRestriction(Any element) {\r
+ long min = 1;\r
+ if (element.getMinOccurs() != null)\r
+ min = element.getMinOccurs().longValue();\r
+ String element_maxS = element.getMaxOccurs();\r
+ max = 1;\r
+ \r
+ if ("unbounded".equals(element_maxS)) {\r
+ max = -1;\r
+ } else if (element_maxS != null) {\r
+ max = Long.parseLong(element_maxS);\r
+ max = Math.max(min, max);\r
+ }\r
+ }\r
+ \r
+ public long getMin() {\r
+ return min;\r
+ }\r
+ \r
+ public long getMax() {\r
+ return max;\r
+ }\r
+ \r
+ public boolean many() {\r
+ return max != 1;\r
+ }\r
+ \r
+ public boolean single() {\r
+ return max == 1;\r
+ }\r
+ \r
+ public boolean singleOptional() {\r
+ return max == 1 && min == 0;\r
+ }\r
+ \r
+ public boolean singleRequired() {\r
+ return max == 1 && min == 1;\r
+ }\r
+ \r
+ @Override\r
+ public boolean equals(Object obj) {\r
+ if (obj == null)\r
+ return false;\r
+ if (!getClass().equals(obj.getClass()))\r
+ return false;\r
+ MultiplicityRestriction other = (MultiplicityRestriction)obj;\r
+ return (min == other.min && max == other.max);\r
+ }\r
+ \r
+ @Override\r
+ public int hashCode() {\r
+ return Long.hashCode(min) + Long.hashCode(max);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import java.io.FileNotFoundException;\r
+import java.io.PrintWriter;\r
+import java.io.StringWriter;\r
+import java.util.ArrayList;\r
+import java.util.LinkedHashSet;\r
+import java.util.List;\r
+import java.util.Set;\r
+\r
+import javax.xml.namespace.QName;\r
+\r
+import org.simantics.utils.datastructures.BijectionMap;\r
+import org.simantics.xml.sax.configuration.AttributeComposition;\r
+import org.simantics.xml.sax.configuration.Configuration;\r
+import org.simantics.xml.sax.configuration.IDReference;\r
+import org.w3._2001.xmlschema.Annotated;\r
+import org.w3._2001.xmlschema.Attribute;\r
+import org.w3._2001.xmlschema.AttributeGroup;\r
+import org.w3._2001.xmlschema.Element;\r
+import org.w3._2001.xmlschema.LocalComplexType;\r
+import org.w3._2001.xmlschema.LocalSimpleType;\r
+import org.w3._2001.xmlschema.NamedAttributeGroup;\r
+import org.w3._2001.xmlschema.OpenAttrs;\r
+import org.w3._2001.xmlschema.Restriction;\r
+import org.w3._2001.xmlschema.Schema;\r
+import org.w3._2001.xmlschema.SimpleType;\r
+import org.w3._2001.xmlschema.TopLevelAttribute;\r
+\r
+public class OntologyGenerator extends SchemaConversionBase {\r
+ \r
+ public OntologyGenerator(Configuration configuration) {\r
+ super(configuration);\r
+ }\r
+\r
+ String ontRoot = "ONT.";\r
+ String commentTag = "//";\r
+ \r
+ Schema schema;\r
+ \r
+ String className;\r
+ \r
+ SchemaConverter converter;\r
+ \r
+ PrintWriter writer = null;\r
+ \r
+ public String getClassName() {\r
+ return className;\r
+ }\r
+ \r
+ public void createOntology(Schema schema, SchemaConverter converter) throws FileNotFoundException {\r
+ this.schema = schema;\r
+ this.converter = converter;\r
+ \r
+// for (OpenAttrs attrs : schema.getIncludeOrImportOrRedefine()) {\r
+// if (attrs instanceof Annotation) {\r
+// Annotation ann = (Annotation)attrs;\r
+// for (Object o : ann.getAppinfoOrDocumentation()) {\r
+// if (o instanceof Documentation) {\r
+// Documentation doc = (Documentation)o;\r
+// } else if (o instanceof Appinfo) {\r
+// Appinfo info = (Appinfo)o;\r
+// }\r
+// }\r
+// }\r
+// }\r
+ \r
+ \r
+ StringWriter stringWriter = null;\r
+ if (converter.getOntologyFile() == null) {\r
+ stringWriter = new StringWriter();\r
+ writer = new PrintWriter(stringWriter);\r
+ } else {\r
+ writer = new PrintWriter(converter.getOntologyFile());\r
+ }\r
+ \r
+ handle(schema);\r
+ \r
+ writer.flush();\r
+ writer.close();\r
+ if (stringWriter != null)\r
+ System.out.println(stringWriter.toString());\r
+ }\r
+ \r
+ protected void handle(Schema schema) {\r
+ String ontologyName = schema.getTargetNamespace();\r
+ if (ontologyName == null) {\r
+ ontologyName = converter.getSchemaFile().getName();\r
+ \r
+ int index = ontologyName.lastIndexOf(".");\r
+ if (index > 0)\r
+ ontologyName = ontologyName.substring(0, index);\r
+ } \r
+ if (!ontologyName.startsWith("http"))\r
+ ontologyName = "http://" + ontologyName;\r
+ String parts[] = ontologyName.split("/");\r
+ String name = parts[parts.length-1];\r
+ ontRoot = name.substring(0, Math.min(3, name.length())).toUpperCase();\r
+ String version = schema.getVersion();\r
+ if (version == null)\r
+ version = "1.0";\r
+ \r
+ name = name.replaceAll("\\.", "_");\r
+ className = converter.getPluginName() + "." + name;\r
+ \r
+ for (String s : converter.getHeader()) {\r
+ writer.println(commentTag + " " + s); \r
+ }\r
+ writer.println();\r
+ writer.println("L0 = <http://www.simantics.org/Layer0-1.1>");\r
+ writer.println();\r
+ writer.println(ontRoot + " = <" + ontologyName +"-"+ version+"> : L0.Ontology");\r
+ writer.println(" @L0.new");\r
+ writer.println(" L0.HasResourceClass \"" + className +"\"");\r
+ writer.println();\r
+ writer.println();\r
+ \r
+ ontRoot += ".";\r
+ // TODO : these could be created in separate base ontology.\r
+ writer.println(commentTag + " Built-in types");\r
+ writer.println();\r
+ writer.println(ontRoot+"XML : L0.Library");\r
+ writer.println(ontRoot+"XML.hasAttribute <R L0.HasProperty");\r
+ writer.println(ontRoot+"XML.hasID <R "+ontRoot+"XML.hasAttribute : L0.FunctionalRelation");\r
+ writer.println(" --> L0.String");\r
+ writer.println(ontRoot+"XML.ComplexType <T L0.Entity");\r
+ writer.println(ontRoot+"XML.hasComplexType <R L0.IsComposedOf");\r
+ writer.println(ontRoot+"XML.AttributeGroup <T L0.Entity");\r
+ writer.println(ontRoot+"XML.Element <T L0.Entity");\r
+ writer.println(ontRoot+"XML.hasElement <R L0.IsComposedOf");\r
+ writer.println(ontRoot+"XML.ElementList <T L0.List");\r
+ writer.println(ontRoot+"XML.hasElementList <R L0.IsComposedOf");\r
+ writer.println(ontRoot+"XML.hasOriginalElementList <R " + ontRoot+"XML.hasElementList");\r
+ writer.println(ontRoot+"XML.hasReference <R L0.IsRelatedTo");\r
+ writer.println(ontRoot+"XML.hasExternalReference <R L0.IsRelatedTo");\r
+ writer.println(" L0.InverseOf " + ontRoot+"XML.externalReferenceOf <R L0.IsRelatedTo");\r
+ writer.println();\r
+ writer.println(ontRoot+"ComplexTypes : L0.Library");\r
+ writer.println(ontRoot+"AttributeGroups : L0.Library");\r
+ writer.println();\r
+ writer.println(commentTag + " Interpreted from schema");\r
+ writer.println();\r
+ \r
+ super.handle(schema);\r
+ }\r
+ \r
+ protected String getType(QName qtype) {\r
+ String ontType = getL0TypeFromPrimitiveType(qtype);\r
+ if (ontType != null)\r
+ return ontType;\r
+ else if (isComplexTypeRef(qtype.getLocalPart()))\r
+ return ontRoot+getComplexTypePrefix()+qtype.getLocalPart();\r
+ else if (isElementRef(qtype.getLocalPart()))\r
+ return ontRoot+qtype.getLocalPart();\r
+ else if (qtype.getPrefix() != null && qtype.getPrefix().length() > 0) {\r
+ return ontRoot+qtype.getPrefix()+qtype.getLocalPart();\r
+ }\r
+ throw new RuntimeException("Reference to unknown type " + qtype.getLocalPart());\r
+ }\r
+ \r
+ @Override\r
+ protected void handle(TopLevelAttribute topLevelAttribute) {\r
+ super.handle(topLevelAttribute);\r
+ writer.println();\r
+ }\r
+ \r
+ @Override\r
+ protected void handleSimpleType(SchemaObject topLevelSimpleType) {\r
+ super.handleSimpleType(topLevelSimpleType);\r
+ writer.println();\r
+ }\r
+ \r
+ \r
+ public static String getComplexTypePrefix() {\r
+ return "ComplexTypes.";\r
+ }\r
+ \r
+ public static String getAttributeGroupPrefix() {\r
+ return "AttributeGroups.";\r
+ }\r
+ \r
+ @Override\r
+ protected void handle(SchemaObject parent, SchemaElement indicator, List<SchemaElement> elements) {\r
+ if (indicator.getType() == SchemaElement.ElementType.SEQUENCE || (indicator.getType() == SchemaElement.ElementType.CHOICE && indicator.getRestriction().many())) {\r
+ for (SchemaElement e : elements) {\r
+ handle(parent, indicator, e);\r
+ }\r
+ } else if (indicator.getType() == SchemaElement.ElementType.CHOICE) {\r
+ String name = getChoiceName(elements);\r
+ boolean single = true;\r
+ for (SchemaElement e : elements) {\r
+ if (e.getRestriction().many()) {\r
+ single = false;\r
+ break;\r
+ }\r
+ }\r
+ String relationName = ontRoot+getName(parent)+".has"+name;\r
+ writer.print(relationName);\r
+ \r
+ List<String> types = new ArrayList<String>();\r
+ for (SchemaElement e : elements) {\r
+ Element localElement = e.getElement();\r
+ QName refType = null;\r
+ String type = null;\r
+ \r
+ if (localElement.getName() != null) {\r
+ refType = localElement.getType();\r
+ type = getL0TypeFromPrimitiveType(refType); \r
+ } else if (localElement.getRef() != null) {\r
+ refType = localElement.getRef();\r
+ type = getL0TypeFromPrimitiveType(refType);\r
+ }\r
+ if (type == null) {\r
+ SchemaObject obj = getWithName(parent, refType.getLocalPart());\r
+ types.add(ontRoot+getName(obj,"has"));\r
+ } \r
+ }\r
+ if (types.size() > 0) {\r
+ for (String type : types) {\r
+ writer.print(" <R " + type);\r
+ }\r
+ } else {\r
+ writer.print(" <R " + ontRoot+"XML.hasElement");\r
+ }\r
+ \r
+ writer.println();\r
+ \r
+ for (SchemaElement e : elements) {\r
+ Element localElement = e.getElement();\r
+ QName refType = null;\r
+ String type = null;\r
+ if (localElement.getName() != null) {\r
+ refType = localElement.getType();\r
+ type = getType(refType); \r
+ } else if (localElement.getRef() != null) {\r
+ refType = localElement.getRef();\r
+ type = getType(refType);\r
+ }\r
+ if (type != null) {\r
+ writer.println(" --> " + type);\r
+ }\r
+ }\r
+ if (!single) {\r
+ writer.println(ontRoot+name+ "List <T "+ontRoot+"XML.ElementList");\r
+ if (types.size() == 0) {\r
+ writer.println(relationName+ "List <R "+ontRoot+"XML.hasElementList : L0.FunctionalRelation");\r
+ } else {\r
+ writer.print(relationName+ "List");\r
+ for (String type : types) {\r
+ writer.print(" <R " + type+"List");\r
+ }\r
+ writer.println(" : L0.FunctionalRelation");\r
+ }\r
+ writer.println(" --> " + ontRoot+name+"List");\r
+ }\r
+ }\r
+ \r
+ }\r
+ \r
+ \r
+ \r
+ @Override\r
+ protected void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String refName, QName refType) {\r
+ String type = getL0TypeFromPrimitiveType(refType);\r
+ SchemaObject obj = null;\r
+ if (type == null) {\r
+ obj = getWithName(parent, refType.getLocalPart());\r
+ \r
+ writer.println(ontRoot+getName(parent)+".has"+refName + " <R " + ontRoot+ getName(obj,"has"));\r
+ writer.println(" --> " + ontRoot+getName(obj));\r
+ } else {\r
+ writer.println(ontRoot+getName(parent)+".has"+refName + " <R " + ontRoot+"XML.hasElement");\r
+ writer.println(" --> " + getType(refType));\r
+ }\r
+ \r
+ if (useElementList(parent, indicator,element, reference, refName, refType)) {\r
+ \r
+ if (type == null) {\r
+ writer.println(ontRoot+getName(parent)+"."+refName + "List <T " + ontRoot+"XML.ElementList");\r
+ writer.println(ontRoot+getName(parent)+".has"+refName + "List <R " + ontRoot+getName(obj,"has")+"List : L0.FunctionalRelation");\r
+ } else {\r
+ writer.println(ontRoot+getName(parent)+"."+refName + "List <T " + ontRoot+"XML.ElementList");\r
+ writer.println(ontRoot+getName(parent)+".has"+refName + "List <R " + ontRoot+"XML.hasElementList : L0.FunctionalRelation"); \r
+ }\r
+ }\r
+ }\r
+ protected void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String refName, OpenAttrs attrs) {\r
+ SchemaObject obj = getWithObj(parent, attrs);\r
+ writer.println(ontRoot+getName(parent)+".has"+refName + " <R " + ontRoot+ getName(obj,"has"));\r
+ writer.println(" --> " + ontRoot+getName(obj));\r
+ if (useElementList(parent, indicator,element, reference, refName, new QName(obj.getName()))) {\r
+ writer.println(ontRoot+getName(parent)+"."+refName + "List <T " + ontRoot+"XML.ElementList");\r
+ writer.println(ontRoot+getName(parent)+".has"+refName + "List <R " + ontRoot+getName(obj,"has")+"List : L0.FunctionalRelation");\r
+ }\r
+ }\r
+ \r
+ @Override\r
+ protected void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement any) {\r
+ \r
+ }\r
+ \r
+ @Override\r
+ protected void handle(SchemaObject parent, Attribute attribute) {\r
+ String name = attribute.getName();\r
+ QName primitiveType = attribute.getType();\r
+ LocalSimpleType simpleType = attribute.getSimpleType();\r
+ QName ref = attribute.getRef();\r
+ \r
+ String relationName;\r
+ String relationType;\r
+ if (name != null) {\r
+ relationName = ontRoot+"has"+name;\r
+ if (parent != null)\r
+ relationName = ontRoot+getName(parent)+".has"+name;\r
+ relationType = ontRoot+"XML.hasAttribute";\r
+ }\r
+ else if (ref != null && parent != null) {\r
+ relationName = ontRoot+getName(parent)+".has"+ref.getLocalPart();\r
+ relationType = ontRoot+"has"+ref.getLocalPart();\r
+ } else {\r
+ throw new RuntimeException();\r
+ }\r
+ boolean id = false;\r
+ String ontType = null;\r
+ if (primitiveType != null) {\r
+ ontType = getL0TypeFromPrimitiveType(primitiveType);\r
+ if (ontType != null) {\r
+ id = getTypeEntry(primitiveType).id;\r
+ if (id)\r
+ relationType = ontRoot+"XML.hasID";\r
+ } else {\r
+ \r
+ }\r
+ } else if (simpleType != null){\r
+ Restriction restriction = simpleType.getRestriction();\r
+ if (restriction == null || simpleType.getUnion() != null || simpleType.getName() != null || simpleType.getId() != null)\r
+ throw new RuntimeException();\r
+ QName base = restriction.getBase();\r
+ \r
+ \r
+ ontType = getL0TypeFromPrimitiveType(base);\r
+ \r
+// for (Object facetWrap : restriction.getFacets()) {\r
+// JAXBElement<?> element = (JAXBElement<?>)facetWrap;\r
+// QName elementName = element.getName();\r
+// Facet facet = (Facet)element.getValue(); \r
+// }\r
+ }\r
+ \r
+ \r
+ \r
+ writer.println(relationName+ " <R " + relationType + ": L0.FunctionalRelation");\r
+ if (id) {\r
+ // no need to add range restriction\r
+ } else if (ontType != null) {\r
+ writer.println(" --> " + ontType);\r
+ } else if (primitiveType != null) {\r
+ writer.println(" <R "+ontRoot+"has"+primitiveType.getLocalPart());\r
+ }\r
+ }\r
+ \r
+ @Override\r
+ protected void handleAttributes(SchemaObject simpleTypeObj) {\r
+// SchemaObject parent = simpleTypeObj.getParent();\r
+// SimpleType simpleType = simpleTypeObj.getSimpleType();\r
+// Restriction restriction = simpleType.getRestriction();\r
+// QName base = restriction.getBase();\r
+// String ontType = getL0TypeFromPrimitiveType(base);\r
+ }\r
+ \r
+ @Override\r
+ protected void handle(SchemaObject parent, AttributeGroup attributeGroup) {\r
+ if (parent == null) {\r
+ NamedAttributeGroup group = (NamedAttributeGroup)attributeGroup;\r
+ writer.println(ontRoot+getAttributeGroupPrefix()+group.getName()+ " <T " + ontRoot +"XML.AttributeGroup");\r
+ SchemaObject obj = new SchemaObject(parent,attributeGroup);\r
+ for (Annotated annotated : group.getAttributeOrAttributeGroup()) {\r
+ if (annotated instanceof Attribute) {\r
+ //handle(getAttributeGroupPrefix()+group.getName(),(Attribute)annotated);\r
+ handle(obj,(Attribute)annotated);\r
+ } else if (annotated instanceof AttributeGroup) {\r
+ throw new RuntimeException("Cannot handle nested attribute groups");\r
+ }\r
+ }\r
+ } else {\r
+ writer.println(ontRoot+getName(parent) +" L0.Inherits " + ontRoot + getAttributeGroupPrefix() + attributeGroup.getRef().getLocalPart());\r
+ }\r
+ \r
+ }\r
+ \r
+ @Override\r
+ protected void handleAttributeComposition(SchemaObject parent, AttributeComposition composition, BijectionMap<org.simantics.xml.sax.configuration.Attribute, Annotated> attributes) {\r
+ Attribute compositionAttribute = new Attribute();\r
+ compositionAttribute.setName(composition.getName());\r
+ QName type = new QName(CONVERSION_NS, composition.getType());\r
+ compositionAttribute.setType(type);\r
+ handle(parent, compositionAttribute);\r
+ }\r
+ \r
+ @Override\r
+ protected void handleSimpleType(SchemaObject parent, SchemaObject simpleTypeObj) {\r
+ SimpleType simpleType = simpleTypeObj.getSimpleType();\r
+ String name = simpleType.getName();\r
+ Restriction restriction = simpleType.getRestriction();\r
+ if (restriction == null || simpleType.getUnion() != null || simpleType.getId() != null)\r
+ throw new RuntimeException();\r
+ QName base = restriction.getBase();\r
+ \r
+ String relationName = ontRoot+"has"+name;\r
+ if (parent != null)\r
+ relationName = ontRoot+getName(parent)+".has"+name;\r
+ \r
+ writer.println(relationName+ " <R "+ontRoot+"XML.hasAttribute : L0.FunctionalRelation");\r
+ \r
+ String ontType = getL0Type(base);\r
+ writer.println(" --> " + ontType);\r
+ }\r
+ \r
+ @Override\r
+ protected void handleComplexType(SchemaObject topLevelComplexType) {\r
+ String name = getName(topLevelComplexType);\r
+ if (name.contains("Pcurve"))\r
+ System.out.println();\r
+// if (parent != null)\r
+// name = parent +"_"+name;\r
+ \r
+ String relationName = ontRoot+getName(topLevelComplexType,"has");//ontRoot+"has"+name;\r
+ \r
+ writer.println(relationName+ " <R "+ontRoot+"XML.hasComplexType");\r
+ writer.println(relationName+ "List <R "+ontRoot+"XML.hasElementList");\r
+ //writer.println(" --> " + ontRoot+getComplexTypePrefix()+name);\r
+ writer.println(" --> " + ontRoot+name);\r
+ writer.println();\r
+ String baseType = ontRoot+"XML.ComplexType";\r
+\r
+ QName base = getComplexTypeBase(topLevelComplexType.getComplexType());\r
+ if (base != null) {\r
+ baseType = getType(base);\r
+ }\r
+ base = getSimpleTypeBase(topLevelComplexType.getSimpleType());\r
+ if (base != null) {\r
+ baseType = getType(base);\r
+ }\r
+ //writer.println(ontRoot+getComplexTypePrefix()+name+ " <T "+baseType);\r
+ writer.println(ontRoot+name+ " <T "+baseType);\r
+ super.handleComplexType(topLevelComplexType);\r
+ writer.println();\r
+ }\r
+ \r
+ @Override\r
+ protected void handleElement(SchemaObject elementObj) {\r
+ Element element = elementObj.getElement();\r
+ String name = getName(elementObj);//element.getName();\r
+\r
+// if (parent != null)\r
+// name = parent +"_"+name;\r
+ \r
+ String type = ontRoot+"XML.Element";\r
+ Set<String> types = new LinkedHashSet<String>();\r
+ if (element.getType() != null) {\r
+ types.add(getType(element.getType()));\r
+ }\r
+ QName base = getElementBase(element);\r
+ if (base != null) {\r
+ if (base.getNamespaceURI().equals(SCHEMA_NS)) {\r
+ String l0Type = getL0Type(base);\r
+ if (l0Type == null)\r
+ throw new RuntimeException("Cannot get L0 type for " + base.getLocalPart());\r
+ types.add(l0Type);\r
+ } else if (isElementRef(base.getLocalPart()))\r
+ types.add(ontRoot+base.getLocalPart());\r
+ else\r
+ types.add(ontRoot+getComplexTypePrefix()+base.getLocalPart());\r
+ }\r
+ QName substitution = element.getSubstitutionGroup();\r
+ if (substitution != null) {\r
+ if (isElementRef(substitution.getLocalPart()))\r
+ types.add(ontRoot+substitution.getLocalPart());\r
+ else\r
+ types.add( ontRoot+getComplexTypePrefix()+substitution.getLocalPart());\r
+ }\r
+ for (String t : types) {\r
+ type += " <T " + t;\r
+ }\r
+\r
+ String relationName = ontRoot+getName(elementObj,"has");//ontRoot+"has"+name;\r
+// if (elementObj.getParent() != null) {\r
+// //relationName = ontRoot+getComplexTypePrefix()+"has"+name.substring(getComplexTypePrefix().length());\r
+// relationName = ontRoot+getName(elementObj.getParent()) + "has"+element.getName();\r
+// }\r
+ writer.println(relationName+ " <R "+ontRoot+"XML.hasElement");\r
+ writer.println(relationName+ "List <R "+ontRoot+"XML.hasElementList");\r
+ \r
+ writer.println(ontRoot+name+ " <T "+type);\r
+ \r
+ LocalComplexType complexType = element.getComplexType();\r
+ LocalSimpleType simpleType = element.getSimpleType();\r
+ \r
+ if (complexType != null) {\r
+ SchemaObject complexTypeObj = complexTypes.get(complexType);\r
+ handleElementComplexTypeAttributes(complexTypeObj);\r
+ handleComplexTypeExtension(complexTypeObj);\r
+ } else if (simpleType != null) {\r
+ SchemaObject simpleTypeObj = simpleTypes.get(simpleType);\r
+ handleElementSimpleTypeAttributes(simpleTypeObj);\r
+ }\r
+ \r
+ List<IDReference> references = getIDReferences(element);\r
+ \r
+ for (IDReference ref : references) {\r
+ writer.println(ontRoot+name+"."+ref.getReference().getName()+ " <R " +ontRoot+"XML.hasReference");\r
+ }\r
+ \r
+ writer.println();\r
+ }\r
+ \r
+ public static String getName(SchemaObject obj) {\r
+ if (obj.getParent() == null) {\r
+ switch (obj.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+obj.getName();\r
+ case ELEMENT:\r
+ return obj.getName();\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+obj.getName();\r
+ case SIMPLE_TYPE:\r
+ return obj.getName();\r
+ }\r
+ } else {\r
+ SchemaObject o = obj;\r
+ SchemaObject prev = null;\r
+ String name = "";\r
+ while (o != null){\r
+ if (o.getName() != null)\r
+ name = o.getName()+"."+name;\r
+ prev = o;\r
+ o = o.getParent();\r
+ }\r
+ name = name.substring(0, name.length()-1);\r
+ switch (prev.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+name;\r
+ case ELEMENT:\r
+ return name;\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+name;\r
+ case SIMPLE_TYPE:\r
+ return name;\r
+ }\r
+ }\r
+ throw new RuntimeException();\r
+ \r
+ }\r
+ \r
+ public static String getName(SchemaObject obj, String rel) {\r
+ if (obj.getParent() == null) {\r
+ switch (obj.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+rel+obj.getName();\r
+ case ELEMENT:\r
+ return rel+obj.getName();\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+rel+obj.getName();\r
+ case SIMPLE_TYPE:\r
+ return rel+obj.getName();\r
+ }\r
+ } else {\r
+ SchemaObject o = obj;\r
+ SchemaObject prev = null;\r
+ String name = "";\r
+ while (o != null){\r
+ if (o.getName() != null)\r
+ name = o.getName()+"."+name;\r
+ prev = o;\r
+ o = o.getParent();\r
+ }\r
+ name = name.substring(0, name.length()-1);\r
+ switch (prev.getType()) {\r
+ case COMPLEX_TYPE:\r
+ return getComplexTypePrefix()+rel+name;\r
+ case ELEMENT:\r
+ return rel+name;\r
+ case ATTRIBUTE_GROUP:\r
+ return getAttributeGroupPrefix()+rel+name;\r
+ case SIMPLE_TYPE:\r
+ return rel+name;\r
+ }\r
+ }\r
+ throw new RuntimeException();\r
+ \r
+ }\r
+ \r
+ \r
+}\r
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import java.util.ArrayDeque;\r
+import java.util.ArrayList;\r
+import java.util.Deque;\r
+import java.util.HashMap;\r
+import java.util.HashSet;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Set;\r
+\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.namespace.QName;\r
+\r
+import org.simantics.utils.datastructures.BijectionMap;\r
+import org.simantics.xml.sax.SchemaElement.ElementType;\r
+import org.simantics.xml.sax.SchemaObject.ObjectType;\r
+import org.simantics.xml.sax.configuration.AttributeComposition;\r
+import org.simantics.xml.sax.configuration.Configuration;\r
+import org.simantics.xml.sax.configuration.IDProvider;\r
+import org.simantics.xml.sax.configuration.IDReference;\r
+import org.simantics.xml.sax.configuration.OrderedChild;\r
+import org.simantics.xml.sax.configuration.UnrecognizedChildElement;\r
+import org.w3._2001.xmlschema.All;\r
+import org.w3._2001.xmlschema.Annotated;\r
+import org.w3._2001.xmlschema.Any;\r
+import org.w3._2001.xmlschema.Attribute;\r
+import org.w3._2001.xmlschema.AttributeGroup;\r
+import org.w3._2001.xmlschema.ComplexContent;\r
+import org.w3._2001.xmlschema.ComplexType;\r
+import org.w3._2001.xmlschema.Element;\r
+import org.w3._2001.xmlschema.ExplicitGroup;\r
+import org.w3._2001.xmlschema.ExtensionType;\r
+import org.w3._2001.xmlschema.LocalComplexType;\r
+import org.w3._2001.xmlschema.LocalElement;\r
+import org.w3._2001.xmlschema.NamedAttributeGroup;\r
+import org.w3._2001.xmlschema.OpenAttrs;\r
+import org.w3._2001.xmlschema.Restriction;\r
+import org.w3._2001.xmlschema.Schema;\r
+import org.w3._2001.xmlschema.SimpleType;\r
+import org.w3._2001.xmlschema.TopLevelAttribute;\r
+import org.w3._2001.xmlschema.TopLevelComplexType;\r
+import org.w3._2001.xmlschema.TopLevelElement;\r
+import org.w3._2001.xmlschema.TopLevelSimpleType;\r
+\r
+public abstract class SchemaConversionBase {\r
+ \r
+ protected Schema schema;\r
+ protected Configuration configuration;\r
+ \r
+ protected static final String SCHEMA_NS = "http://www.w3.org/2001/XMLSchema";\r
+ protected static final String CONVERSION_NS = "http://www.simantics.org/Layer0";\r
+ \r
+ protected Map<String,Map<String,TypeEntry>> typeMap;\r
+ \r
+ public SchemaConversionBase(Configuration configuration) {\r
+ this.configuration = configuration;\r
+ typeMap = new HashMap<String, Map<String,TypeEntry>>();\r
+ \r
+ Map<String,TypeEntry> schemaTypes = new HashMap<String, SchemaConversionBase.TypeEntry>();\r
+ typeMap.put(SCHEMA_NS, schemaTypes);\r
+ Map<String,TypeEntry> l0Types = new HashMap<String, SchemaConversionBase.TypeEntry>();\r
+ typeMap.put(CONVERSION_NS, l0Types);\r
+ \r
+ schemaTypes.put("string", new TypeEntry("L0.String", "STRING", "String", ""));\r
+ schemaTypes.put("NMTOKEN", new TypeEntry("L0.String", "STRING", "String", ""));\r
+ schemaTypes.put("token", new TypeEntry("L0.String", "STRING", "String", ""));\r
+ schemaTypes.put("ID", new TypeEntry("L0.String", "STRING", "String", "",true));\r
+ schemaTypes.put("IDREF", new TypeEntry("L0.String", "STRING", "String", ""));\r
+ schemaTypes.put("date", new TypeEntry("L0.String", "STRING", "String", ""));\r
+ schemaTypes.put("time", new TypeEntry("L0.String", "STRING", "String", ""));\r
+ schemaTypes.put("anyURI", new TypeEntry("L0.URI", "STRING", "String", ""));\r
+ schemaTypes.put("double", new TypeEntry("L0.Double", "DOUBLE", "double", "Double.NaN"));\r
+ schemaTypes.put("float", new TypeEntry("L0.Float", "FLOAT", "float", "Float.NaN"));\r
+ schemaTypes.put("decimal", new TypeEntry("L0.Double", "DOUBLE", "double", "Double.NaN"));\r
+ schemaTypes.put("boolean", new TypeEntry("L0.Boolean", "BOOLEAN", "boolean", "false"));\r
+ schemaTypes.put("integer", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("positiveInteger", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("nonPositiveInteger", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("nonNegativeInteger", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("negativeInteger", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("unsignedInt", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("int", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("short", new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("unsignedShort",new TypeEntry("L0.Integer", "INTEGER", "int", "0"));\r
+ schemaTypes.put("byte", new TypeEntry("L0.Byte", "BYTE", "byte", "0"));\r
+ schemaTypes.put("unsignedByte", new TypeEntry("L0.Byte", "BYTE", "byte", "0"));\r
+ schemaTypes.put("long", new TypeEntry("L0.Long", "LONG", "long", "0"));\r
+ schemaTypes.put("unsignedLong", new TypeEntry("L0.Long", "LONG", "long", "0"));\r
+ \r
+ \r
+ \r
+ l0Types.put("doubleArray", new TypeEntry("L0.DoubleArray", "DOUBLE_ARRAY", "double[]", null));\r
+ l0Types.put("stringArray", new TypeEntry("L0.StringArray", "STRING_ARRAY", "string[]", null));\r
+ }\r
+ \r
+ \r
+ protected TypeEntry getTypeEntry(QName type) {\r
+ Map<String,TypeEntry> types = typeMap.get(type.getNamespaceURI());\r
+ if (types == null)\r
+ return null;\r
+ TypeEntry entry = types.get(type.getLocalPart());\r
+ return entry;\r
+ \r
+ }\r
+ \r
+ protected String getL0TypeFromPrimitiveType(QName primitiveType) {\r
+ TypeEntry entry = getTypeEntry(primitiveType);\r
+ if (entry == null)\r
+ return null;\r
+ return entry.l0Type;\r
+ }\r
+ \r
+ protected String getL0Type(QName primitiveType) {\r
+ String type = getL0TypeFromPrimitiveType(primitiveType);\r
+ if (type != null)\r
+ return type;\r
+ SchemaObject simpleTypeObj = simpleTypeName.get(primitiveType.getLocalPart());\r
+ if (simpleTypeObj == null)\r
+ return null;\r
+ SimpleType simpleType = simpleTypeObj.getSimpleType();\r
+ while (simpleType != null) {\r
+ QName base = simpleType.getRestriction().getBase();\r
+ if (base != null)\r
+ return getL0Type(base);\r
+ simpleType = simpleType.getRestriction().getSimpleType();\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ protected String getBindingFromPrimitiveType(QName primitiveType) {\r
+ TypeEntry entry = getTypeEntry(primitiveType);\r
+ if (entry == null)\r
+ return null;\r
+ return entry.binding;\r
+ }\r
+ \r
+ protected String getJavaTypeFromPrimitiveType(QName primitiveType) {\r
+ TypeEntry entry = getTypeEntry(primitiveType);\r
+ if (entry == null)\r
+ return null;\r
+ return entry.javaType;\r
+ }\r
+ \r
+ \r
+ protected void handle(Schema schema) { \r
+ this.schema = schema;\r
+ preload();\r
+ \r
+ for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {\r
+ if (attrs instanceof TopLevelAttribute) {\r
+ handle((TopLevelAttribute)attrs);\r
+ \r
+ } else if (attrs instanceof TopLevelComplexType) {\r
+ handleComplexType(complexTypes.get(attrs));\r
+ } else if (attrs instanceof TopLevelElement) {\r
+ handleElement(elements.get(attrs));\r
+ } else if (attrs instanceof TopLevelSimpleType) {\r
+ handleSimpleType(simpleTypes.get(attrs));\r
+ } else if (attrs instanceof NamedAttributeGroup) {\r
+ handle((NamedAttributeGroup)attrs);\r
+ } else {\r
+ System.out.println(attrs.getClass().getName());\r
+ }\r
+ }\r
+ }\r
+ \r
+ protected Map<String,SchemaObject> elementName = new HashMap<String, SchemaObject>();\r
+ protected Map<String,SchemaObject> complexTypeName = new HashMap<String, SchemaObject>();\r
+ protected Map<String,SchemaObject> simpleTypeName = new HashMap<String, SchemaObject>();\r
+ protected Map<Element,SchemaObject> elements = new HashMap<Element, SchemaObject>();\r
+ protected Map<ComplexType,SchemaObject> complexTypes = new HashMap<ComplexType, SchemaObject>();\r
+ protected Map<SimpleType,SchemaObject> simpleTypes = new HashMap<SimpleType, SchemaObject>();\r
+ \r
+ \r
+ protected SchemaObject getWithName(SchemaObject referrer, String name) {\r
+ SchemaObject obj = elementName.get(name);\r
+ if (obj == null)\r
+ obj = complexTypeName.get(name);\r
+ if (obj == null)\r
+ obj = simpleTypeName.get(name);\r
+ if (obj == null) {\r
+ throw new RuntimeException("Cannot locate referred type " + name + " when handling " + referrer.getName());\r
+ }\r
+ return obj;\r
+ }\r
+ \r
+ protected SchemaObject getWithObj(SchemaObject referrer, OpenAttrs attrs) {\r
+ SchemaObject obj = null;\r
+ if (attrs instanceof Element)\r
+ obj = elements.get(attrs);\r
+ else if (attrs instanceof ComplexType)\r
+ obj = complexTypes.get(attrs);\r
+ else if (attrs instanceof SimpleType) \r
+ obj = simpleTypes.get(attrs);\r
+ if (obj == null){\r
+ throw new RuntimeException("Cannot locate referred object " + attrs + " when handling " + referrer.getName());\r
+ }\r
+ return obj;\r
+ }\r
+ \r
+ private void preload() {\r
+ Deque<SchemaObject> stack = new ArrayDeque<SchemaObject>();\r
+ //stack.addAll(schema.getSimpleTypeOrComplexTypeOrGroup());\r
+ for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {\r
+ if (attrs instanceof Element) {\r
+ Element element = (Element)attrs;\r
+ SchemaObject obj = new SchemaObject(element);\r
+ stack.push(obj);\r
+ } else if (attrs instanceof ComplexType) {\r
+ ComplexType complexType = (ComplexType)attrs;\r
+ SchemaObject obj = new SchemaObject(complexType);\r
+ stack.push(obj);\r
+ } else if (attrs instanceof SimpleType) {\r
+ SimpleType simpleType = (SimpleType)attrs;\r
+ SchemaObject obj = new SchemaObject(simpleType);\r
+ stack.push(obj);\r
+ }\r
+ }\r
+ \r
+ while (!stack.isEmpty()) {\r
+ SchemaObject object = stack.pop();\r
+ if (object.getType() == ObjectType.COMPLEX_TYPE) {\r
+ ComplexType ct = object.getComplexType();\r
+ if (ct.getName() != null && ct.getName().length() > 0 && ct instanceof TopLevelComplexType)\r
+ complexTypeName.put(ct.getName(), object);\r
+ complexTypes.put(ct, object);\r
+ if (ct.getChoice() != null) {\r
+ preload(object,ct.getChoice(), stack);\r
+ }\r
+ if (ct.getSequence() != null) {\r
+ preload(object,ct.getSequence(), stack);\r
+ }\r
+ if (ct.getAll() != null) {\r
+ preload(object,ct.getAll(), stack);\r
+ }\r
+ if (ct.getGroup() != null)\r
+ throw new RuntimeException("Groups not supported");\r
+ if (ct.getComplexContent() != null) {\r
+ ComplexContent cc = ct.getComplexContent();\r
+ ExtensionType extensionType = cc.getExtension();\r
+ if (extensionType != null) {\r
+ if (extensionType.getChoice() != null) {\r
+ preload(object,extensionType.getChoice(), stack);\r
+ }\r
+ if (extensionType.getSequence()!= null) {\r
+ preload(object,extensionType.getSequence(), stack);\r
+ }\r
+ if (extensionType.getAll()!= null) {\r
+ preload(object,extensionType.getAll(), stack);\r
+ }\r
+ if (extensionType.getGroup() != null)\r
+ throw new RuntimeException("Groups not supported");\r
+ }\r
+ }\r
+ } else if (object.getType() == ObjectType.ELEMENT) {\r
+ Element e = object.getElement();\r
+ if (e instanceof TopLevelElement)\r
+ elementName.put(e.getName(), object);\r
+ elements.put(e, object);\r
+ if (e.getComplexType() != null)\r
+ stack.push(new SchemaObject(object,e.getComplexType()));\r
+ if (e.getSimpleType() != null)\r
+ stack.push(new SchemaObject(object,e.getSimpleType()));\r
+ } else if (object.getType() == ObjectType.SIMPLE_TYPE) {\r
+ SimpleType e = object.getSimpleType();\r
+ if (e instanceof TopLevelSimpleType)\r
+ simpleTypeName.put(e.getName(), object);\r
+ simpleTypes.put(e, object);\r
+ }\r
+ }\r
+ }\r
+ \r
+ private void preload(SchemaObject parent,ExplicitGroup eg, Deque<SchemaObject> stack) {\r
+ for (Object o : eg.getParticle()) {\r
+ if (o instanceof JAXBElement<?>) {\r
+ JAXBElement<?> element = (JAXBElement<?>)o;\r
+ Object elemValue = element.getValue();\r
+ if (elemValue instanceof Element) {\r
+ stack.add(new SchemaObject(parent,(Element)elemValue));\r
+ } else if (elemValue instanceof All) {\r
+ preload(parent,(All)elemValue, stack);\r
+ } else if (elemValue instanceof ExplicitGroup) {\r
+ preload(parent,(ExplicitGroup)elemValue, stack);\r
+ } else {\r
+ throw new RuntimeException("Unknown ExplicitGroup element " + elemValue.getClass().getName());\r
+ }\r
+ } else if (o instanceof Any){\r
+ \r
+ } else {\r
+ throw new RuntimeException("Unknown ExplicitGroup reference " + o.getClass().getName());\r
+ }\r
+ }\r
+ }\r
+ \r
+ protected void handle(TopLevelAttribute topLevelAttribute) {\r
+ handle(null, topLevelAttribute);\r
+ }\r
+ \r
+ protected void handleSimpleType(SchemaObject topLevelSimpleType) {\r
+ handleSimpleType(null,topLevelSimpleType);\r
+ }\r
+ \r
+ protected void handle(NamedAttributeGroup namedAttributeGroup){\r
+ handle(null, namedAttributeGroup);\r
+ }\r
+ \r
+ protected QName getComplexTypeBase(ComplexType complexType) {\r
+ if (complexType == null)\r
+ return null;\r
+ ComplexContent complexContent = complexType.getComplexContent();\r
+ if (complexContent != null) {\r
+ ExtensionType extensionType = complexContent.getExtension();\r
+ if (extensionType != null) {\r
+ QName type = extensionType.getBase();\r
+ return type;\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ protected QName getSimpleTypeBase(SimpleType simpleType) {\r
+ if (simpleType == null)\r
+ return null;\r
+ return simpleType.getRestriction().getBase();\r
+ }\r
+ \r
+ protected QName getElementBase(Element element) {\r
+ ComplexType complexType = element.getComplexType();\r
+ SimpleType simpleType = element.getSimpleType();\r
+ if (complexType != null)\r
+ return getComplexTypeBase(complexType);\r
+ if (simpleType != null) {\r
+ return getSimpleTypeBase(simpleType);\r
+ }\r
+ return null;\r
+ }\r
+ \r
+\r
+ \r
+ \r
+ \r
+ \r
+ \r
+ \r
+ private void handleAttributes(SchemaObject complexType, List<Annotated> attributeOrAttributeGroup) {\r
+ //name = getComplexTypePrefix()+complexType.getName()\r
+ \r
+ Set<Annotated> handled = handleAttributeCompositions(complexType,attributeOrAttributeGroup);\r
+ for (Annotated annotated : attributeOrAttributeGroup) {\r
+ if (handled.contains(annotated))\r
+ continue;\r
+ if (annotated instanceof Attribute) {\r
+ handle(complexType,(Attribute)annotated);\r
+ } else if (annotated instanceof AttributeGroup){\r
+ handle(complexType,(AttributeGroup)annotated);\r
+ //comment("AttributeGroup " + ((AttributeGroup)annotated).getRef().getLocalPart());\r
+ } else {\r
+ throw new RuntimeException();\r
+ }\r
+ }\r
+ }\r
+ \r
+ protected abstract void handleAttributes(SchemaObject simpleTypeObj);\r
+ \r
+ protected void handleExtensionAttributes(SchemaObject complexType) {\r
+ ComplexContent complexContent = complexType.getComplexType().getComplexContent();\r
+ if (complexContent != null) {\r
+ ExtensionType extensionType = complexContent.getExtension();\r
+ if (extensionType != null) {\r
+ handleAttributes(complexType, extensionType.getAttributeOrAttributeGroup());\r
+ }\r
+ }\r
+ }\r
+ \r
+ \r
+ \r
+ protected void handleComplexTypeAttributes(SchemaObject complexType) { \r
+ handleAttributes(complexType,complexType.getComplexType().getAttributeOrAttributeGroup());\r
+ }\r
+ \r
+ protected void handleElementComplexTypeAttributes(SchemaObject complexType) {\r
+ if (complexType != null) {\r
+ handleComplexTypeAttributes(complexType);\r
+ handleExtensionAttributes(complexType);\r
+ }\r
+ }\r
+ \r
+ protected void handleElementSimpleTypeAttributes(SchemaObject simpleType) {\r
+ if (simpleType != null) {\r
+ handleAttributes(simpleType);\r
+ }\r
+ }\r
+ \r
+ protected Set<Annotated> handleAttributeCompositions(SchemaObject obj, List<Annotated> attributeOrAttributeGroup) {\r
+ \r
+ Set<Annotated> handled = new HashSet<Annotated>();\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof AttributeComposition) {\r
+ AttributeComposition composition = (AttributeComposition)e.getValue();\r
+ if (composition.getAttribute().size() < 2)\r
+ throw new RuntimeException("Attribute Composition is not valid");\r
+ BijectionMap<org.simantics.xml.sax.configuration.Attribute, Annotated> map = new BijectionMap<org.simantics.xml.sax.configuration.Attribute, Annotated>();\r
+ for (org.simantics.xml.sax.configuration.Attribute a : composition.getAttribute()) {\r
+ for (Annotated annotated : attributeOrAttributeGroup) {\r
+ if (annotated instanceof Attribute) {\r
+ Attribute attribute = (Attribute)annotated;\r
+ QName type = getBaseType(attribute);\r
+ if (a.getName().equals(attribute.getName()) && type != null && a.getType().equals(type.getLocalPart())) {\r
+ map.map(a, attribute);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ if (composition.getAttribute().size() == map.size()) {\r
+ handled.addAll(map.getRightSet());\r
+ handleAttributeComposition(obj, composition, map); \r
+ }\r
+ }\r
+ }\r
+ return handled;\r
+ }\r
+ \r
+ protected QName getBaseType(Attribute attribute) {\r
+ if (attribute.getType() != null)\r
+ return attribute.getType();\r
+ if (attribute.getRef() != null)\r
+ return attribute.getRef();\r
+ SimpleType simpleType = attribute.getSimpleType();\r
+ if (simpleType != null) {\r
+ Restriction restriction = simpleType.getRestriction();\r
+ if (restriction != null)\r
+ if (restriction.getBase() != null)\r
+ return restriction.getBase();\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ protected Attribute getRefAttribute(QName ref) {\r
+ for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {\r
+ if (attrs instanceof TopLevelAttribute) {\r
+ TopLevelAttribute attribute = (TopLevelAttribute)attrs;\r
+ if (attribute.getName().equals(ref.getLocalPart()))\r
+ return attribute;\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ protected abstract void handleAttributeComposition(SchemaObject obj, AttributeComposition composition, BijectionMap<org.simantics.xml.sax.configuration.Attribute, Annotated> attributes);\r
+ \r
+ \r
+ \r
+ \r
+ protected void handleComplexType(SchemaObject complexType) {\r
+ handleComplexTypeAttributes(complexType);\r
+ handleComplexTypeExtension(complexType);\r
+ handleExtensionAttributes(complexType);\r
+ }\r
+ \r
+ protected abstract void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String refName, QName refType);\r
+ protected abstract void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String refName, OpenAttrs ref);\r
+ protected abstract void handleIndicator(SchemaObject parent, SchemaElement indicator, SchemaElement any);\r
+ protected abstract void handle(SchemaObject parent, SchemaElement indicator, List<SchemaElement> elements);\r
+ \r
+ protected void handle(SchemaObject parent, ExplicitGroup eg, SchemaElement.ElementType indicator) {\r
+ handle(parent, new SchemaElement(eg, indicator));\r
+ }\r
+ \r
+ protected void handle(SchemaObject parent, SchemaElement indicator) {\r
+ \r
+ \r
+ List<SchemaElement> elements = new ArrayList<SchemaElement>();\r
+ List<SchemaElement> choices = new ArrayList<SchemaElement>();\r
+ List<SchemaElement> sequences = new ArrayList<SchemaElement>();\r
+ List<SchemaElement> alls = new ArrayList<SchemaElement>();\r
+ List<SchemaElement> anys = new ArrayList<SchemaElement>();\r
+ \r
+ for (Object o : indicator.getGroup().getParticle()) {\r
+ if (o instanceof JAXBElement<?>) {\r
+ JAXBElement<?> element = (JAXBElement<?>)o;\r
+ Object elemValue = element.getValue();\r
+ if (elemValue instanceof LocalElement) {\r
+ LocalElement localElement = (LocalElement)elemValue;\r
+ \r
+ elements.add(new SchemaElement(indicator,localElement, ElementType.ELEMENT));\r
+ } else if (elemValue instanceof All) {\r
+ alls.add(new SchemaElement(indicator,(All)elemValue, ElementType.ALL));\r
+ } else if (elemValue instanceof ExplicitGroup) {\r
+ QName qname = element.getName();\r
+ if ("choice".equals(qname.getLocalPart())) {\r
+ choices.add(new SchemaElement(indicator,(ExplicitGroup)elemValue, ElementType.CHOICE));\r
+ } else if ("sequence".equals(qname.getLocalPart())) {\r
+ sequences.add(new SchemaElement(indicator,(ExplicitGroup)elemValue, ElementType.SEQUENCE));\r
+ }\r
+ } else {\r
+ throw new RuntimeException("Unknown ExplicitGroup element " + elemValue.getClass().getName());\r
+ }\r
+ } else if (o instanceof Any){\r
+ anys.add(new SchemaElement(indicator,(Any)o, ElementType.ANY));\r
+ } else {\r
+ throw new RuntimeException("Unknown ExplicitGroup reference " + o.getClass().getName());\r
+ }\r
+ }\r
+ \r
+ if (elements.size() == 0 && choices.size() == 0 && sequences.size() == 0 && alls.size() == 0 && anys.size() == 0) {\r
+ return;\r
+ }\r
+ \r
+ if (indicator.getType() == SchemaElement.ElementType.SEQUENCE) {\r
+ if (indicator.getRestriction().single()) {\r
+ if (elements.size() > 0) {\r
+ for (SchemaElement e : sequences) {\r
+ handle(parent, e);\r
+ }\r
+ for (SchemaElement c : choices) {\r
+ handle(parent, c);\r
+ }\r
+ \r
+ for (SchemaElement c : alls) {\r
+ handle(parent, c);\r
+ }\r
+ handle(parent, indicator, elements);\r
+ for (SchemaElement a : anys) {\r
+ handleIndicator(parent, indicator, a);\r
+ }\r
+ } else {\r
+ if (sequences.size() > 0) {\r
+ throw new RuntimeException("Cannot handle Sequence with inner Sequences");\r
+ }\r
+ for (SchemaElement c : choices) {\r
+ handle(parent, c);\r
+ }\r
+ for (SchemaElement a : anys) {\r
+ handleIndicator(parent, indicator, a);\r
+ }\r
+ }\r
+ } else {\r
+ if (sequences.size() > 0 || choices.size() > 0 || alls.size() > 0) {\r
+ throw new RuntimeException("Cannot handle Sequence with inner ExplicitGroups");\r
+ }\r
+ handle(parent, indicator, elements);\r
+ for (SchemaElement a : anys) {\r
+ handleIndicator(parent, indicator, a);\r
+ }\r
+ }\r
+ \r
+ } else if (indicator.getType() == SchemaElement.ElementType.CHOICE){\r
+ if (indicator.getRestriction().single()) {\r
+ if (sequences.size()> 0 || choices.size() > 0 || alls.size() > 0 || anys.size() > 0) {\r
+ throw new RuntimeException("Cannot handle Choice that contains something else than Elements");\r
+ }\r
+ handle(parent, indicator, elements);\r
+ \r
+ } else {\r
+ if (sequences.size() > 0 || choices.size() > 0) {\r
+ throw new RuntimeException("Cannot handle Choice with inner ExplicitGroups");\r
+ }\r
+ handle(parent, indicator, elements);\r
+ for (SchemaElement a : anys) {\r
+ handleIndicator(parent, indicator, a);\r
+ }\r
+ }\r
+ } else if (indicator.getType() == ElementType.ALL) {\r
+ if (sequences.size()> 0 || choices.size() > 0 || alls.size() > 0 || anys.size() > 0) {\r
+ throw new RuntimeException("Cannot handle All that contains something else than Elements");\r
+ }\r
+ if (!indicator.getRestriction().single()) {\r
+ throw new RuntimeException("All indicator must have maxOccurs=1");\r
+ }\r
+ handle(parent, indicator, elements);\r
+ }\r
+ }\r
+ \r
+ \r
+ protected void handle(SchemaObject parent, SchemaElement indicator, SchemaElement element) {\r
+ Element localElement = element.getElement();\r
+ if (localElement.getName() != null) {\r
+ String refName = localElement.getName();\r
+ QName refType = localElement.getType();\r
+ if (refType != null)\r
+ handleIndicator(parent, indicator, element, false, refName, refType);\r
+ else {\r
+ handleElement(elements.get(localElement));\r
+ handleIndicator(parent, indicator, element, false, refName, localElement);\r
+ //FIXME:\r
+ }\r
+ } else if (localElement.getRef() != null) {\r
+ QName refType = localElement.getRef();\r
+ handleIndicator(parent, indicator,element, true, refType.getLocalPart(), refType);\r
+ }\r
+ }\r
+ \r
+ protected String getElementName(Element localElement) {\r
+ if (localElement.getName() != null) {\r
+ String refName = localElement.getName();\r
+ QName refType = localElement.getType();\r
+ if (refType != null)\r
+ return refName;\r
+ } else if (localElement.getRef() != null) {\r
+ QName refType = localElement.getRef();\r
+ if (refType != null)\r
+ return refType.getLocalPart();\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ protected String getChoiceName(List<SchemaElement> elements) {\r
+ if (elements.size() == 1) {\r
+ return getElementName(elements.get(0).getElement());\r
+ }\r
+ List<String> names = new ArrayList<String>();\r
+ for (SchemaElement e : elements) {\r
+ String name = getElementName(e.getElement());\r
+ if (name != null)\r
+ names.add(name);\r
+ }\r
+ String name = "";\r
+ for (int i = 0; i < names.size(); i++) {\r
+ if (i == 0)\r
+ name = names.get(i);\r
+ else\r
+ name += "Or"+names.get(i);\r
+ }\r
+ return name;\r
+ }\r
+ \r
+ \r
+ protected abstract void handle(SchemaObject parent, Attribute attribute) ;\r
+ protected abstract void handle(SchemaObject parent, AttributeGroup attribute) ;\r
+ \r
+ protected abstract void handleSimpleType(SchemaObject parent, SchemaObject simpleType);\r
+ \r
+ \r
+ \r
+ protected void handleComplexTypeExtension(SchemaObject complexTypeObj) {\r
+ ComplexType complexType = complexTypeObj.getComplexType();\r
+ if (complexType != null) {\r
+ if (complexType.getChoice() != null)\r
+ handle(complexTypeObj, complexType.getChoice(), SchemaElement.ElementType.CHOICE);\r
+ if (complexType.getSequence() != null)\r
+ handle(complexTypeObj, complexType.getSequence(), SchemaElement.ElementType.SEQUENCE);\r
+ if (complexType.getAll() != null)\r
+ handle(complexTypeObj, complexType.getAll(), SchemaElement.ElementType.ALL);\r
+ if (complexType.getGroup() != null)\r
+ throw new RuntimeException("Groups not supported");\r
+ ComplexContent complexContent = complexType.getComplexContent();\r
+ if (complexContent != null) {\r
+ ExtensionType extensionType = complexContent.getExtension();\r
+ if (extensionType != null) {\r
+ if (extensionType.getChoice() != null) {\r
+ handle(complexTypeObj, extensionType.getChoice(), SchemaElement.ElementType.CHOICE);\r
+ }\r
+ if (extensionType.getSequence()!= null) {\r
+ handle(complexTypeObj, extensionType.getSequence(), SchemaElement.ElementType.SEQUENCE);\r
+ }\r
+ if (extensionType.getAll()!= null) {\r
+ handle(complexTypeObj, extensionType.getAll(), SchemaElement.ElementType.ALL);\r
+ }\r
+ if (extensionType.getGroup() != null) {\r
+ throw new RuntimeException("Groups not supported");\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ protected void handleElement(SchemaObject topLevelElement) {\r
+ LocalComplexType complexType = topLevelElement.getElement().getComplexType();\r
+ \r
+ if (complexType != null) {\r
+ SchemaObject complextTypeObj = complexTypes.get(complexType);\r
+ handleElementComplexTypeAttributes(complextTypeObj);\r
+ handleComplexTypeExtension(complextTypeObj);\r
+ }\r
+ \r
+ \r
+ }\r
+ \r
+ \r
+ protected boolean isElementRef(String ref) {\r
+// for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {\r
+// if (attrs instanceof TopLevelElement) {\r
+// TopLevelElement element = (TopLevelElement)attrs;\r
+// if (ref.equals(element.getName()))\r
+// return true;\r
+// }\r
+// }\r
+// return false;\r
+ return elementName.containsKey(ref);\r
+ }\r
+ \r
+ protected boolean isComplexTypeRef(String ref) {\r
+// for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {\r
+// if (attrs instanceof TopLevelComplexType) {\r
+// TopLevelComplexType element = (TopLevelComplexType)attrs;\r
+// if (ref.equals(element.getName()))\r
+// return true;\r
+// }\r
+// }\r
+// return false;\r
+ return complexTypeName.containsKey(ref);\r
+ \r
+ }\r
+ \r
+ protected NamedAttributeGroup getAttributeGroup(String name) {\r
+ for (OpenAttrs attrs : schema.getSimpleTypeOrComplexTypeOrGroup()) {\r
+ if (attrs instanceof NamedAttributeGroup) {\r
+ NamedAttributeGroup group = (NamedAttributeGroup)attrs;\r
+ if (group.getName().equals(name))\r
+ return group;\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ protected IDProvider getIDProvider(Element element) {\r
+ List<IDProvider> idProviders = new ArrayList<IDProvider>(2);\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof IDProvider) {\r
+ IDProvider ref = (IDProvider)e.getValue();\r
+ org.simantics.xml.sax.configuration.Element element2 = ref.getElement();\r
+ if (element2 != null) {\r
+ if (element.getName().equals(element2.getName()))\r
+ idProviders.add(ref);\r
+ }\r
+ \r
+ }\r
+ }\r
+ if (idProviders.size() == 0)\r
+ return null;\r
+ if (idProviders.size() > 1)\r
+ throw new RuntimeException("Element " + element.getName() + " contains " + idProviders.size() + " id provider rules, only one is allowed.");\r
+ return idProviders.get(0);\r
+ }\r
+ \r
+ protected IDProvider getIDProvider(ComplexType complexType) {\r
+ List<IDProvider> idProviders = new ArrayList<IDProvider>(2);\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof IDProvider) {\r
+ IDProvider ref = (IDProvider)e.getValue();\r
+ org.simantics.xml.sax.configuration.ComplexType complexType2 = ref.getComplexType();\r
+ if (complexType2 != null) {\r
+ if (complexType.getName().equals(complexType2.getName()))\r
+ idProviders.add(ref);\r
+ }\r
+\r
+ }\r
+ }\r
+ if (idProviders.size() == 0)\r
+ return null;\r
+ if (idProviders.size() > 1)\r
+ throw new RuntimeException("Element " + complexType.getName() + " contains " + idProviders.size() + " id provider rules, only one is allowed.");\r
+ return idProviders.get(0);\r
+ }\r
+ \r
+ protected List<IDReference> getIDReferences(Element element) {\r
+ List<IDReference> idReferences = new ArrayList<IDReference>(2);\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof IDReference) {\r
+ IDReference ref = (IDReference)e.getValue();\r
+ org.simantics.xml.sax.configuration.Element element2 = ref.getElement();\r
+ if (element2 != null) {\r
+ if (element.getName().equals(element2.getName()))\r
+ idReferences.add(ref);\r
+ }\r
+ }\r
+ }\r
+ return idReferences;\r
+ }\r
+ \r
+ protected List<IDReference> getIDReferences(ComplexType complexType) {\r
+ List<IDReference> idReferences = new ArrayList<IDReference>(2);\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof IDReference) {\r
+ IDReference ref = (IDReference)e.getValue();\r
+ org.simantics.xml.sax.configuration.ComplexType complexType2 = ref.getComplexType();\r
+ if (complexType2 != null) {\r
+ if (complexType.getName().equals(complexType2.getName()))\r
+ idReferences.add(ref);\r
+ }\r
+ }\r
+ }\r
+ return idReferences;\r
+ }\r
+ \r
+ public UnrecognizedChildElement getUnknown(ComplexType complexType) {\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof UnrecognizedChildElement) {\r
+ UnrecognizedChildElement ref = (UnrecognizedChildElement)e.getValue();\r
+ org.simantics.xml.sax.configuration.ComplexType complexType2 = ref.getComplexType();\r
+ if (complexType2 != null) {\r
+ if (complexType.getName().equals(complexType2.getName()))\r
+ return ref;\r
+ }\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ public UnrecognizedChildElement getUnknown(Element element) {\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof UnrecognizedChildElement) {\r
+ UnrecognizedChildElement ref = (UnrecognizedChildElement)e.getValue();\r
+ org.simantics.xml.sax.configuration.Element element2 = ref.getElement();\r
+ if (element2 != null) {\r
+ if (element.getName().equals(element2.getName()))\r
+ return ref;\r
+ }\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ \r
+ public boolean useOriginalList(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String ref, QName refType) {\r
+ if (parent.getName() == null)\r
+ parent = parent.getParent();\r
+ if (parent.getName().contains("PipingNetworkSegment"))\r
+ System.out.println();\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof OrderedChild) {\r
+ OrderedChild oc = (OrderedChild)e.getValue();\r
+ org.simantics.xml.sax.configuration.Element element2 = oc.getElement();\r
+ org.simantics.xml.sax.configuration.ComplexType complexType = oc.getComplexType();\r
+ org.simantics.xml.sax.configuration.Element child = oc.getChild();\r
+ if (!oc.getType().equals("original"))\r
+ continue;\r
+ boolean match = false;\r
+ if (element2 != null) {\r
+ if (parent.getType() == ObjectType.ELEMENT && parent.getName().equals(element2.getName())) {\r
+ match = true;\r
+ }\r
+ } else if (complexType != null) {\r
+ if (parent.getType() == ObjectType.COMPLEX_TYPE && parent.getName() != null && parent.getName().equals(complexType.getName())) {\r
+ match = true;\r
+ }\r
+ \r
+ }\r
+ if (match) {\r
+ if (child != null) {\r
+ if (matchChild(child, ref, refType)) {\r
+ if (oc.getValue().equals("disable"))\r
+ return false;\r
+ else return true;\r
+ }\r
+ } else { \r
+ if (oc.getValue().equals("disable"))\r
+ return false;\r
+ return true;\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ return indicator.order();\r
+ }\r
+ \r
+ public boolean useElementList(SchemaObject parent, SchemaElement indicator, SchemaElement element, boolean reference, String refName, QName refType) {\r
+ if (parent.getName() == null)\r
+ parent = parent.getParent();\r
+ if (parent.getName() == "PipingNetworkSegment")\r
+ System.out.println();\r
+ for (JAXBElement<?> e : configuration.getConversionRule()) {\r
+ if (e.getValue() instanceof OrderedChild) {\r
+ OrderedChild oc = (OrderedChild)e.getValue();\r
+ org.simantics.xml.sax.configuration.Element element2 = oc.getElement();\r
+ org.simantics.xml.sax.configuration.ComplexType complexType = oc.getComplexType();\r
+ org.simantics.xml.sax.configuration.Element child = oc.getChild();\r
+ if (!oc.getType().equals("child"))\r
+ continue;\r
+ boolean match = false;\r
+ if (element2 != null) {\r
+ if (parent.getType() == ObjectType.ELEMENT && parent.getName().equals(element2.getName())) {\r
+ match = true;\r
+ }\r
+ } else if (complexType != null) {\r
+ if (parent.getType() == ObjectType.COMPLEX_TYPE && parent.getName() != null && parent.getName().equals(complexType.getName())) {\r
+ match = true;\r
+ }\r
+ \r
+ }\r
+ if (match) {\r
+ if (child != null) {\r
+ if (matchChild(child, refName, refType)) {\r
+ if (oc.getValue().equals("disable"))\r
+ return false;\r
+ else return true;\r
+ }\r
+ } else {\r
+ if (oc.getValue().equals("disable"))\r
+ return false;\r
+ return true;\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ return element.many() && element.order();\r
+ }\r
+ \r
+ private boolean matchChild(org.simantics.xml.sax.configuration.Element child, String refName, QName refType) {\r
+ if (refType != null && refType.getLocalPart().equals(child.getName()))\r
+ return true;\r
+ if (refName != null && refName.equals(child.getName()))\r
+ return true;\r
+ return false;\r
+ }\r
+ \r
+ public static class TypeEntry {\r
+ String l0Type;\r
+ String binding;\r
+ String javaType;\r
+ String defaultValue;\r
+ boolean id;\r
+ public TypeEntry(String l0Type, String binding, String javaType, String defaultValue) {\r
+ super();\r
+ this.l0Type = l0Type;\r
+ this.binding = binding;\r
+ this.javaType = javaType;\r
+ this.defaultValue = defaultValue;\r
+ this.id = false;\r
+ }\r
+ \r
+ public TypeEntry(String l0Type, String binding, String javaType, String defaultValue, boolean id) {\r
+ super();\r
+ this.l0Type = l0Type;\r
+ this.binding = binding;\r
+ this.javaType = javaType;\r
+ this.defaultValue = defaultValue;\r
+ this.id = id;\r
+ }\r
+ \r
+ }\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import java.io.File;\r
+import java.io.FileInputStream;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.util.Date;\r
+\r
+import javax.xml.bind.JAXBContext;\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.JAXBException;\r
+import javax.xml.bind.Unmarshaller;\r
+\r
+import org.simantics.xml.sax.configuration.Configuration;\r
+import org.w3._2001.xmlschema.Schema;\r
+\r
+/**\r
+ * This file is developed for XMpLant / Proteus schema conversion is not able to handle all XML Schema definitions.\r
+ * \r
+ * @author mlmarko\r
+ *\r
+ */\r
+public class SchemaConverter {\r
+ \r
+ File schemaFile;\r
+ File conversionFile;\r
+ File ontologyFile;\r
+ File parserDir;\r
+ Schema schema;\r
+ Configuration configuration;\r
+ \r
+ String pluginName;\r
+ \r
+ private String[] header;\r
+ \r
+\r
+ public void convertSchema(File schemaFile, File conversionFile, File outputPlugin) throws JAXBException, IOException {\r
+ pluginName = outputPlugin.getName();\r
+ String packageParts[] = pluginName.split("\\.");\r
+ String outputLoc = outputPlugin.getAbsolutePath();\r
+ outputLoc += "/src";\r
+ for (String s : packageParts)\r
+ outputLoc += "/"+s;\r
+ String outputGraph = outputPlugin.getAbsolutePath();\r
+ outputGraph += "/graph";\r
+ outputGraph += "/" + schemaFile.getName().substring(0, schemaFile.getName().length()-4) +".pgraph";\r
+ \r
+ this.schemaFile = schemaFile;\r
+ this.conversionFile = conversionFile;\r
+ this.ontologyFile = new File(outputGraph);\r
+ this.parserDir = new File(outputLoc);\r
+ \r
+ if (!ontologyFile.exists()) {\r
+ ontologyFile.getParentFile().mkdirs();\r
+ ontologyFile.createNewFile();\r
+ }\r
+ if (!parserDir.exists())\r
+ parserDir.mkdirs();\r
+ \r
+ convert();\r
+ \r
+ }\r
+ \r
+ private void convert() throws JAXBException, IOException {\r
+ JAXBContext jc = JAXBContext.newInstance("org.w3._2001.xmlschema");\r
+ Unmarshaller u = jc.createUnmarshaller();\r
+ //u.setSchema(schema);\r
+ InputStream fileStream = new FileInputStream(schemaFile);\r
+ schema = (Schema)u.unmarshal(fileStream);\r
+ \r
+ if (conversionFile != null) {\r
+ jc = JAXBContext.newInstance("org.simantics.xml.sax.configuration");\r
+ u = jc.createUnmarshaller();\r
+ fileStream = new FileInputStream(conversionFile);\r
+ configuration = (Configuration)((JAXBElement<?>)u.unmarshal(fileStream)).getValue();\r
+ } else {\r
+ configuration = new Configuration();\r
+ }\r
+ \r
+ header = new String[4];\r
+ header[0] = "Generated with org.simantics.xml.sax XML schema converter";\r
+ header[1] = "";\r
+ header[2] = "File " + schemaFile.getAbsolutePath();\r
+ header[3] = "Date " + new Date().toString();\r
+ \r
+ \r
+ OntologyGenerator ontologyGenerator = new OntologyGenerator(configuration);\r
+ ontologyGenerator.createOntology(schema, this);\r
+ ImporterGenerator importerGenerator = new ImporterGenerator(configuration);\r
+ importerGenerator.createParser(schema, ontologyGenerator.getClassName(), this);\r
+ }\r
+ \r
+ public File getOntologyFile() {\r
+ return ontologyFile;\r
+ }\r
+ public File getParserDir() {\r
+ return parserDir;\r
+ }\r
+ \r
+ public Schema getSchema() {\r
+ return schema;\r
+ }\r
+ \r
+ public File getSchemaFile() {\r
+ return schemaFile;\r
+ }\r
+ \r
+ public String getPluginName() {\r
+ return pluginName;\r
+ }\r
+ \r
+ public String[] getHeader() {\r
+ return header;\r
+ }\r
+ \r
+ public Configuration getConfiguration() {\r
+ return configuration;\r
+ }\r
+\r
+\r
+}\r
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import org.w3._2001.xmlschema.Any;\r
+import org.w3._2001.xmlschema.Element;\r
+import org.w3._2001.xmlschema.Group;\r
+\r
+public class SchemaElement {\r
+\r
+ public enum ElementType{CHOICE,SEQUENCE,ALL,ANY,ELEMENT}\r
+\r
+ private Group gelement;\r
+ private Any aelement;\r
+ private Element eelement;\r
+ private MultiplicityRestriction restriction;\r
+ private SchemaElement.ElementType type;\r
+ \r
+ private SchemaElement parent;\r
+ \r
+ public SchemaElement(Group element, ElementType indicator) {\r
+ this.gelement = element;\r
+ this.type = indicator;\r
+ this.restriction = new MultiplicityRestriction(element);\r
+ }\r
+ \r
+ public SchemaElement(Any element, ElementType indicator) {\r
+ this.aelement = element;\r
+ this.type = indicator;\r
+ this.restriction = new MultiplicityRestriction(element);\r
+ }\r
+ \r
+ public SchemaElement(Element element, ElementType indicator) {\r
+ this.eelement = element;\r
+ this.type = indicator;\r
+ this.restriction = new MultiplicityRestriction(element);\r
+ }\r
+ \r
+ public SchemaElement(SchemaElement parent, Group element, ElementType indicator) {\r
+ this.parent = parent;\r
+ this.gelement = element;\r
+ this.type = indicator;\r
+ this.restriction = new MultiplicityRestriction(element);\r
+ }\r
+ \r
+ public SchemaElement(SchemaElement parent, Any element, ElementType indicator) {\r
+ this.parent = parent;\r
+ this.aelement = element;\r
+ this.type = indicator;\r
+ this.restriction = new MultiplicityRestriction(element);\r
+ }\r
+ \r
+ public SchemaElement(SchemaElement parent, Element element, ElementType indicator) {\r
+ this.parent = parent;\r
+ this.eelement = element;\r
+ this.type = indicator;\r
+ this.restriction = new MultiplicityRestriction(element);\r
+ }\r
+ \r
+ public Group getGroup() {\r
+ return gelement;\r
+ }\r
+ \r
+ public Any getAny() {\r
+ return aelement;\r
+ }\r
+ \r
+ public Element getElement() {\r
+ return eelement;\r
+ }\r
+ \r
+ public MultiplicityRestriction getRestriction() {\r
+ return restriction;\r
+ }\r
+ \r
+ public ElementType getType() {\r
+ return type;\r
+ }\r
+ \r
+ public SchemaElement getParent() {\r
+ return parent;\r
+ }\r
+ \r
+ \r
+ public boolean order() {\r
+ if (type == ElementType.ELEMENT) {\r
+ if (restriction.many())\r
+ return true;\r
+ return false;\r
+ }\r
+ if (type == ElementType.SEQUENCE)\r
+ return true;\r
+ return false;\r
+ }\r
+ \r
+ public boolean many() {\r
+ if (restriction.many())\r
+ return true;\r
+ if (parent != null)\r
+ return parent.many();\r
+ return false;\r
+ }\r
+ \r
+}\r
--- /dev/null
+package org.simantics.xml.sax;\r
+\r
+import org.w3._2001.xmlschema.AttributeGroup;\r
+import org.w3._2001.xmlschema.AttributeGroupRef;\r
+import org.w3._2001.xmlschema.ComplexType;\r
+import org.w3._2001.xmlschema.Element;\r
+import org.w3._2001.xmlschema.NamedAttributeGroup;\r
+import org.w3._2001.xmlschema.OpenAttrs;\r
+import org.w3._2001.xmlschema.SimpleType;\r
+\r
+public class SchemaObject {\r
+ enum ObjectType{ELEMENT,COMPLEX_TYPE,SIMPLE_TYPE,ATTRIBUTE_GROUP};\r
+ \r
+ private SchemaObject parent;\r
+ private ObjectType type;\r
+ private OpenAttrs obj;\r
+ \r
+ public SchemaObject(Element element) {\r
+ this(null,element);\r
+ }\r
+ \r
+ public SchemaObject(ComplexType complexType) {\r
+ this(null, complexType);\r
+ }\r
+ \r
+ public SchemaObject(SimpleType simpleType) {\r
+ this(null, simpleType);\r
+ }\r
+ \r
+ public SchemaObject(SchemaObject parent, Element element) {\r
+ this.parent = parent;\r
+ this.obj = element;\r
+ this.type = ObjectType.ELEMENT;\r
+ }\r
+ \r
+ public SchemaObject(SchemaObject parent, ComplexType complexType) {\r
+ this.parent = parent;\r
+ this.obj = complexType;\r
+ this.type = ObjectType.COMPLEX_TYPE;\r
+ }\r
+ \r
+ public SchemaObject(SchemaObject parent, AttributeGroup attributeGroup) {\r
+ this.parent = parent;\r
+ this.obj = attributeGroup;\r
+ this.type = ObjectType.ATTRIBUTE_GROUP;\r
+ }\r
+ \r
+\r
+ public SchemaObject(SchemaObject parent, SimpleType simpleType) {\r
+ this.parent = parent;\r
+ this.obj = simpleType;\r
+ this.type = ObjectType.SIMPLE_TYPE;\r
+ }\r
+ \r
+ public Element getElement() {\r
+ if (type != ObjectType.ELEMENT)\r
+ return null;\r
+ return (Element)obj;\r
+ }\r
+ \r
+ public ComplexType getComplexType() {\r
+ if (type != ObjectType.COMPLEX_TYPE)\r
+ return null;\r
+ return (ComplexType)obj;\r
+ }\r
+ \r
+ public SimpleType getSimpleType() {\r
+ if (type != ObjectType.SIMPLE_TYPE)\r
+ return null;\r
+ return (SimpleType)obj;\r
+ }\r
+ \r
+ public AttributeGroup getAttributeGroup() {\r
+ if (type != ObjectType.ATTRIBUTE_GROUP)\r
+ return null;\r
+ return (AttributeGroup)obj;\r
+ }\r
+ \r
+ public SchemaObject getParent() {\r
+ return parent;\r
+ }\r
+ \r
+ public OpenAttrs getObj() {\r
+ return obj;\r
+ }\r
+ \r
+ \r
+ public String getName() {\r
+ switch (type) {\r
+ case ATTRIBUTE_GROUP:\r
+ if (obj instanceof NamedAttributeGroup)\r
+ return ((NamedAttributeGroup)obj).getName();\r
+ else\r
+ return ((AttributeGroupRef)obj).getRef().getLocalPart();\r
+ case COMPLEX_TYPE:\r
+ return ((ComplexType)obj).getName();\r
+ case ELEMENT:\r
+ return ((Element)obj).getName();\r
+ case SIMPLE_TYPE:\r
+ return ((SimpleType)obj).getName();\r
+ }\r
+ throw new RuntimeException("Unknown object type " + type); \r
+ }\r
+ \r
+ public ObjectType getType() {\r
+ return type;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for Attribute complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="Attribute">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "Attribute")\r
+public class Attribute {\r
+\r
+ @XmlAttribute(name = "Type")\r
+ protected String type;\r
+ @XmlAttribute(name = "Name")\r
+ protected String name;\r
+\r
+ /**\r
+ * Gets the value of the type property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getType() {\r
+ return type;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the type property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setType(String value) {\r
+ this.type = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.simantics.org/xml/sax/configuration/}ConversionRule">\r
+ * <sequence maxOccurs="unbounded">\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}Attribute"/>\r
+ * </sequence>\r
+ * <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "attribute"\r
+})\r
+public class AttributeComposition\r
+ extends ConversionRule\r
+{\r
+\r
+ @XmlElement(name = "Attribute", required = true)\r
+ protected List<Attribute> attribute;\r
+ @XmlAttribute(name = "Type")\r
+ protected String type;\r
+ @XmlAttribute(name = "Name")\r
+ protected String name;\r
+\r
+ /**\r
+ * Gets the value of the attribute property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the attribute property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAttribute().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Attribute }\r
+ * \r
+ * \r
+ */\r
+ public List<Attribute> getAttribute() {\r
+ if (attribute == null) {\r
+ attribute = new ArrayList<Attribute>();\r
+ }\r
+ return this.attribute;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the type property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getType() {\r
+ return type;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the type property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setType(String value) {\r
+ this.type = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for ComplexType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="ComplexType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "ComplexType")\r
+public class ComplexType {\r
+\r
+ @XmlAttribute(name = "Name")\r
+ protected String name;\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlElementRef;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for Configuration complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="Configuration">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <sequence maxOccurs="unbounded" minOccurs="0">\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}ConversionRule"/>\r
+ * </sequence>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "Configuration", propOrder = {\r
+ "conversionRule"\r
+})\r
+public class Configuration {\r
+\r
+ @XmlElementRef(name = "ConversionRule", namespace = "http://www.simantics.org/xml/sax/configuration/", type = JAXBElement.class, required = false)\r
+ protected List<JAXBElement<? extends ConversionRule>> conversionRule;\r
+\r
+ /**\r
+ * Gets the value of the conversionRule property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the conversionRule property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getConversionRule().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link JAXBElement }{@code <}{@link OrderedChild }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link IDReference }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link AttributeComposition }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link UnrecognizedChildElement }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link ConversionRule }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link IDProvider }{@code >}\r
+ * \r
+ * \r
+ */\r
+ public List<JAXBElement<? extends ConversionRule>> getConversionRule() {\r
+ if (conversionRule == null) {\r
+ conversionRule = new ArrayList<JAXBElement<? extends ConversionRule>>();\r
+ }\r
+ return this.conversionRule;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for ConversionRule complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="ConversionRule">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "ConversionRule")\r
+@XmlSeeAlso({\r
+ IDProvider.class,\r
+ UnrecognizedChildElement.class,\r
+ OrderedChild.class,\r
+ AttributeComposition.class,\r
+ IDReference.class\r
+})\r
+public class ConversionRule {\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for Element complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="Element">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "Element")\r
+public class Element {\r
+\r
+ @XmlAttribute(name = "Name")\r
+ protected String name;\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import java.math.BigInteger;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.simantics.org/xml/sax/configuration/}ConversionRule">\r
+ * <sequence>\r
+ * <choice>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}Element"/>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}ComplexType"/>\r
+ * </choice>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}Attribute"/>\r
+ * </sequence>\r
+ * <attribute name="Priority" type="{http://www.w3.org/2001/XMLSchema}integer" />\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "element",\r
+ "complexType",\r
+ "attribute"\r
+})\r
+public class IDProvider\r
+ extends ConversionRule\r
+{\r
+\r
+ @XmlElement(name = "Element")\r
+ protected Element element;\r
+ @XmlElement(name = "ComplexType")\r
+ protected ComplexType complexType;\r
+ @XmlElement(name = "Attribute", required = true)\r
+ protected Attribute attribute;\r
+ @XmlAttribute(name = "Priority")\r
+ protected BigInteger priority;\r
+\r
+ /**\r
+ * Gets the value of the element property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public Element getElement() {\r
+ return element;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the element property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public void setElement(Element value) {\r
+ this.element = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the complexType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public ComplexType getComplexType() {\r
+ return complexType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the complexType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public void setComplexType(ComplexType value) {\r
+ this.complexType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the attribute property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Attribute }\r
+ * \r
+ */\r
+ public Attribute getAttribute() {\r
+ return attribute;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the attribute property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Attribute }\r
+ * \r
+ */\r
+ public void setAttribute(Attribute value) {\r
+ this.attribute = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the priority property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public BigInteger getPriority() {\r
+ return priority;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the priority property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public void setPriority(BigInteger value) {\r
+ this.priority = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.simantics.org/xml/sax/configuration/}ConversionRule">\r
+ * <sequence>\r
+ * <choice>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}Element"/>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}ComplexType"/>\r
+ * </choice>\r
+ * <element name="IDSource" type="{http://www.simantics.org/xml/sax/configuration/}Attribute"/>\r
+ * <element name="Reference" type="{http://www.simantics.org/xml/sax/configuration/}Attribute"/>\r
+ * </sequence>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "element",\r
+ "complexType",\r
+ "idSource",\r
+ "reference"\r
+})\r
+public class IDReference\r
+ extends ConversionRule\r
+{\r
+\r
+ @XmlElement(name = "Element")\r
+ protected Element element;\r
+ @XmlElement(name = "ComplexType")\r
+ protected ComplexType complexType;\r
+ @XmlElement(name = "IDSource", required = true)\r
+ protected Attribute idSource;\r
+ @XmlElement(name = "Reference", required = true)\r
+ protected Attribute reference;\r
+\r
+ /**\r
+ * Gets the value of the element property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public Element getElement() {\r
+ return element;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the element property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public void setElement(Element value) {\r
+ this.element = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the complexType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public ComplexType getComplexType() {\r
+ return complexType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the complexType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public void setComplexType(ComplexType value) {\r
+ this.complexType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the idSource property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Attribute }\r
+ * \r
+ */\r
+ public Attribute getIDSource() {\r
+ return idSource;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the idSource property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Attribute }\r
+ * \r
+ */\r
+ public void setIDSource(Attribute value) {\r
+ this.idSource = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the reference property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Attribute }\r
+ * \r
+ */\r
+ public Attribute getReference() {\r
+ return reference;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the reference property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Attribute }\r
+ * \r
+ */\r
+ public void setReference(Attribute value) {\r
+ this.reference = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlElementDecl;\r
+import javax.xml.bind.annotation.XmlRegistry;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * This object contains factory methods for each \r
+ * Java content interface and Java element interface \r
+ * generated in the org.simantics.xml.sax.configuration package. \r
+ * <p>An ObjectFactory allows you to programatically \r
+ * construct new instances of the Java representation \r
+ * for XML content. The Java representation of XML \r
+ * content can consist of schema derived interfaces \r
+ * and classes representing the binding of schema \r
+ * type definitions, element declarations and model \r
+ * groups. Factory methods for each of these are \r
+ * provided in this class.\r
+ * \r
+ */\r
+@XmlRegistry\r
+public class ObjectFactory {\r
+\r
+ private final static QName _ComplexType_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "ComplexType");\r
+ private final static QName _IDProvider_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "IDProvider");\r
+ private final static QName _ConversionRule_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "ConversionRule");\r
+ private final static QName _Attribute_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "Attribute");\r
+ private final static QName _UnrecognizedChildElement_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "UnrecognizedChildElement");\r
+ private final static QName _OrderedChild_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "OrderedChild");\r
+ private final static QName _Configuration_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "Configuration");\r
+ private final static QName _Element_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "Element");\r
+ private final static QName _AttributeComposition_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "AttributeComposition");\r
+ private final static QName _IDReference_QNAME = new QName("http://www.simantics.org/xml/sax/configuration/", "IDReference");\r
+\r
+ /**\r
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.simantics.xml.sax.configuration\r
+ * \r
+ */\r
+ public ObjectFactory() {\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link ConversionRule }\r
+ * \r
+ */\r
+ public ConversionRule createConversionRule() {\r
+ return new ConversionRule();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link IDProvider }\r
+ * \r
+ */\r
+ public IDProvider createIDProvider() {\r
+ return new IDProvider();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Configuration }\r
+ * \r
+ */\r
+ public Configuration createConfiguration() {\r
+ return new Configuration();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Attribute }\r
+ * \r
+ */\r
+ public Attribute createAttribute() {\r
+ return new Attribute();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link UnrecognizedChildElement }\r
+ * \r
+ */\r
+ public UnrecognizedChildElement createUnrecognizedChildElement() {\r
+ return new UnrecognizedChildElement();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link OrderedChild }\r
+ * \r
+ */\r
+ public OrderedChild createOrderedChild() {\r
+ return new OrderedChild();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link AttributeComposition }\r
+ * \r
+ */\r
+ public AttributeComposition createAttributeComposition() {\r
+ return new AttributeComposition();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link IDReference }\r
+ * \r
+ */\r
+ public IDReference createIDReference() {\r
+ return new IDReference();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Element }\r
+ * \r
+ */\r
+ public Element createElement() {\r
+ return new Element();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link ComplexType }\r
+ * \r
+ */\r
+ public ComplexType createComplexType() {\r
+ return new ComplexType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link ComplexType }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "ComplexType")\r
+ public JAXBElement<ComplexType> createComplexType(ComplexType value) {\r
+ return new JAXBElement<ComplexType>(_ComplexType_QNAME, ComplexType.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link IDProvider }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "IDProvider", substitutionHeadNamespace = "http://www.simantics.org/xml/sax/configuration/", substitutionHeadName = "ConversionRule")\r
+ public JAXBElement<IDProvider> createIDProvider(IDProvider value) {\r
+ return new JAXBElement<IDProvider>(_IDProvider_QNAME, IDProvider.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link ConversionRule }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "ConversionRule")\r
+ public JAXBElement<ConversionRule> createConversionRule(ConversionRule value) {\r
+ return new JAXBElement<ConversionRule>(_ConversionRule_QNAME, ConversionRule.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Attribute }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "Attribute")\r
+ public JAXBElement<Attribute> createAttribute(Attribute value) {\r
+ return new JAXBElement<Attribute>(_Attribute_QNAME, Attribute.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link UnrecognizedChildElement }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "UnrecognizedChildElement", substitutionHeadNamespace = "http://www.simantics.org/xml/sax/configuration/", substitutionHeadName = "ConversionRule")\r
+ public JAXBElement<UnrecognizedChildElement> createUnrecognizedChildElement(UnrecognizedChildElement value) {\r
+ return new JAXBElement<UnrecognizedChildElement>(_UnrecognizedChildElement_QNAME, UnrecognizedChildElement.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link OrderedChild }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "OrderedChild", substitutionHeadNamespace = "http://www.simantics.org/xml/sax/configuration/", substitutionHeadName = "ConversionRule")\r
+ public JAXBElement<OrderedChild> createOrderedChild(OrderedChild value) {\r
+ return new JAXBElement<OrderedChild>(_OrderedChild_QNAME, OrderedChild.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Configuration }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "Configuration")\r
+ public JAXBElement<Configuration> createConfiguration(Configuration value) {\r
+ return new JAXBElement<Configuration>(_Configuration_QNAME, Configuration.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Element }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "Element")\r
+ public JAXBElement<Element> createElement(Element value) {\r
+ return new JAXBElement<Element>(_Element_QNAME, Element.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributeComposition }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "AttributeComposition", substitutionHeadNamespace = "http://www.simantics.org/xml/sax/configuration/", substitutionHeadName = "ConversionRule")\r
+ public JAXBElement<AttributeComposition> createAttributeComposition(AttributeComposition value) {\r
+ return new JAXBElement<AttributeComposition>(_AttributeComposition_QNAME, AttributeComposition.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link IDReference }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.simantics.org/xml/sax/configuration/", name = "IDReference", substitutionHeadNamespace = "http://www.simantics.org/xml/sax/configuration/", substitutionHeadName = "ConversionRule")\r
+ public JAXBElement<IDReference> createIDReference(IDReference value) {\r
+ return new JAXBElement<IDReference>(_IDReference_QNAME, IDReference.class, null, value);\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.simantics.org/xml/sax/configuration/}ConversionRule">\r
+ * <sequence>\r
+ * <choice>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}Element"/>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}ComplexType"/>\r
+ * </choice>\r
+ * <element name="Child" type="{http://www.simantics.org/xml/sax/configuration/}Element" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="Value" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "element",\r
+ "complexType",\r
+ "child"\r
+})\r
+public class OrderedChild\r
+ extends ConversionRule\r
+{\r
+\r
+ @XmlElement(name = "Element")\r
+ protected Element element;\r
+ @XmlElement(name = "ComplexType")\r
+ protected ComplexType complexType;\r
+ @XmlElement(name = "Child")\r
+ protected Element child;\r
+ @XmlAttribute(name = "Type")\r
+ protected String type;\r
+ @XmlAttribute(name = "Value")\r
+ protected String value;\r
+\r
+ /**\r
+ * Gets the value of the element property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public Element getElement() {\r
+ return element;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the element property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public void setElement(Element value) {\r
+ this.element = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the complexType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public ComplexType getComplexType() {\r
+ return complexType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the complexType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public void setComplexType(ComplexType value) {\r
+ this.complexType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the child property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public Element getChild() {\r
+ return child;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the child property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public void setChild(Element value) {\r
+ this.child = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the type property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getType() {\r
+ return type;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the type property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setType(String value) {\r
+ this.type = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the value property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getValue() {\r
+ return value;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the value property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setValue(String value) {\r
+ this.value = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+\r
+package org.simantics.xml.sax.configuration;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.simantics.org/xml/sax/configuration/}ConversionRule">\r
+ * <sequence>\r
+ * <choice>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}Element"/>\r
+ * <element ref="{http://www.simantics.org/xml/sax/configuration/}ComplexType"/>\r
+ * </choice>\r
+ * <element name="JavaMethod" type="{http://www.w3.org/2001/XMLSchema}string"/>\r
+ * </sequence>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "element",\r
+ "complexType",\r
+ "javaMethod"\r
+})\r
+public class UnrecognizedChildElement\r
+ extends ConversionRule\r
+{\r
+\r
+ @XmlElement(name = "Element")\r
+ protected Element element;\r
+ @XmlElement(name = "ComplexType")\r
+ protected ComplexType complexType;\r
+ @XmlElement(name = "JavaMethod", required = true)\r
+ protected String javaMethod;\r
+\r
+ /**\r
+ * Gets the value of the element property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public Element getElement() {\r
+ return element;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the element property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Element }\r
+ * \r
+ */\r
+ public void setElement(Element value) {\r
+ this.element = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the complexType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public ComplexType getComplexType() {\r
+ return complexType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the complexType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ComplexType }\r
+ * \r
+ */\r
+ public void setComplexType(ComplexType value) {\r
+ this.complexType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the javaMethod property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getJavaMethod() {\r
+ return javaMethod;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the javaMethod property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setJavaMethod(String value) {\r
+ this.javaMethod = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.11.25 at 04:57:27 PM EET \r
+//\r
+\r
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.simantics.org/xml/sax/configuration/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)\r
+package org.simantics.xml.sax.configuration;\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * \r
+ * Only elements allowed inside\r
+ * \r
+ * <p>Java class for all complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="all">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}explicitGroup">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}allModel"/>\r
+ * <attribute name="minOccurs" default="1">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger">\r
+ * <enumeration value="0"/>\r
+ * <enumeration value="1"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <attribute name="maxOccurs" default="1">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}allNNI">\r
+ * <enumeration value="1"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "all")\r
+public class All\r
+ extends ExplicitGroup\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlID;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * \r
+ * This type is extended by all types which allow annotation\r
+ * other than <schema> itself\r
+ * \r
+ * \r
+ * <p>Java class for annotated complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="annotated">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}openAttrs">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "annotated", propOrder = {\r
+ "annotation"\r
+})\r
+@XmlSeeAlso({\r
+ ExtensionType.class,\r
+ Element.class,\r
+ AttributeGroup.class,\r
+ ComplexType.class,\r
+ Attribute.class,\r
+ RestrictionType.class,\r
+ SimpleType.class,\r
+ Group.class,\r
+ SimpleContent.class,\r
+ List.class,\r
+ Restriction.class,\r
+ Facet.class,\r
+ Wildcard.class,\r
+ Union.class,\r
+ Notation.class,\r
+ Import.class,\r
+ Include.class,\r
+ Field.class,\r
+ Keybase.class,\r
+ ComplexContent.class,\r
+ Selector.class\r
+})\r
+public class Annotated\r
+ extends OpenAttrs\r
+{\r
+\r
+ protected Annotation annotation;\r
+ @XmlAttribute(name = "id")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlID\r
+ @XmlSchemaType(name = "ID")\r
+ protected String id;\r
+\r
+ /**\r
+ * Gets the value of the annotation property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Annotation }\r
+ * \r
+ */\r
+ public Annotation getAnnotation() {\r
+ return annotation;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the annotation property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Annotation }\r
+ * \r
+ */\r
+ public void setAnnotation(Annotation value) {\r
+ this.annotation = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the id property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getId() {\r
+ return id;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the id property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setId(String value) {\r
+ this.id = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlID;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}openAttrs">\r
+ * <choice maxOccurs="unbounded" minOccurs="0">\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}appinfo"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}documentation"/>\r
+ * </choice>\r
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "appinfoOrDocumentation"\r
+})\r
+@XmlRootElement(name = "annotation")\r
+public class Annotation\r
+ extends OpenAttrs\r
+{\r
+\r
+ @XmlElements({\r
+ @XmlElement(name = "appinfo", type = Appinfo.class),\r
+ @XmlElement(name = "documentation", type = Documentation.class)\r
+ })\r
+ protected List<Object> appinfoOrDocumentation;\r
+ @XmlAttribute(name = "id")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlID\r
+ @XmlSchemaType(name = "ID")\r
+ protected String id;\r
+\r
+ /**\r
+ * Gets the value of the appinfoOrDocumentation property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the appinfoOrDocumentation property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAppinfoOrDocumentation().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Appinfo }\r
+ * {@link Documentation }\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getAppinfoOrDocumentation() {\r
+ if (appinfoOrDocumentation == null) {\r
+ appinfoOrDocumentation = new ArrayList<Object>();\r
+ }\r
+ return this.appinfoOrDocumentation;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the id property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getId() {\r
+ return id;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the id property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setId(String value) {\r
+ this.id = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.math.BigInteger;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}wildcard">\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}occurs"/>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "any")\r
+public class Any\r
+ extends Wildcard\r
+{\r
+\r
+ @XmlAttribute(name = "minOccurs")\r
+ @XmlSchemaType(name = "nonNegativeInteger")\r
+ protected BigInteger minOccurs;\r
+ @XmlAttribute(name = "maxOccurs")\r
+ @XmlSchemaType(name = "allNNI")\r
+ protected String maxOccurs;\r
+\r
+ /**\r
+ * Gets the value of the minOccurs property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public BigInteger getMinOccurs() {\r
+ if (minOccurs == null) {\r
+ return new BigInteger("1");\r
+ } else {\r
+ return minOccurs;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the minOccurs property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public void setMinOccurs(BigInteger value) {\r
+ this.minOccurs = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the maxOccurs property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getMaxOccurs() {\r
+ if (maxOccurs == null) {\r
+ return "1";\r
+ } else {\r
+ return maxOccurs;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the maxOccurs property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setMaxOccurs(String value) {\r
+ this.maxOccurs = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAnyAttribute;\r
+import javax.xml.bind.annotation.XmlAnyElement;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlMixed;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+import org.w3c.dom.Element;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <sequence maxOccurs="unbounded" minOccurs="0">\r
+ * <any processContents='lax'/>\r
+ * </sequence>\r
+ * <attribute name="source" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "content"\r
+})\r
+@XmlRootElement(name = "appinfo")\r
+public class Appinfo {\r
+\r
+ @XmlMixed\r
+ @XmlAnyElement(lax = true)\r
+ protected List<Object> content;\r
+ @XmlAttribute(name = "source")\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String source;\r
+ @XmlAnyAttribute\r
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();\r
+\r
+ /**\r
+ * Gets the value of the content property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the content property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getContent().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Object }\r
+ * {@link String }\r
+ * {@link Element }\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getContent() {\r
+ if (content == null) {\r
+ content = new ArrayList<Object>();\r
+ }\r
+ return this.content;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the source property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getSource() {\r
+ return source;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the source property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setSource(String value) {\r
+ this.source = value;\r
+ }\r
+\r
+ /**\r
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.\r
+ * \r
+ * <p>\r
+ * the map is keyed by the name of the attribute and \r
+ * the value is the string value of the attribute.\r
+ * \r
+ * the map returned by this method is live, and you can add new attribute\r
+ * by updating the map directly. Because of this design, there's no setter.\r
+ * \r
+ * \r
+ * @return\r
+ * always non-null\r
+ */\r
+ public Map<QName, String> getOtherAttributes() {\r
+ return otherAttributes;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * <p>Java class for attribute complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="attribute">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}defRef"/>\r
+ * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <attribute name="use" default="optional">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">\r
+ * <enumeration value="prohibited"/>\r
+ * <enumeration value="optional"/>\r
+ * <enumeration value="required"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <attribute name="default" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="fixed" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="form" type="{http://www.w3.org/2001/XMLSchema}formChoice" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "attribute", propOrder = {\r
+ "simpleType"\r
+})\r
+@XmlSeeAlso({\r
+ TopLevelAttribute.class\r
+})\r
+public class Attribute\r
+ extends Annotated\r
+{\r
+\r
+ protected LocalSimpleType simpleType;\r
+ @XmlAttribute(name = "type")\r
+ protected QName type;\r
+ @XmlAttribute(name = "use")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ protected String use;\r
+ @XmlAttribute(name = "default")\r
+ protected String _default;\r
+ @XmlAttribute(name = "fixed")\r
+ protected String fixed;\r
+ @XmlAttribute(name = "form")\r
+ protected FormChoice form;\r
+ @XmlAttribute(name = "name")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+ @XmlAttribute(name = "ref")\r
+ protected QName ref;\r
+\r
+ /**\r
+ * Gets the value of the simpleType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public LocalSimpleType getSimpleType() {\r
+ return simpleType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the simpleType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public void setSimpleType(LocalSimpleType value) {\r
+ this.simpleType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the type property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getType() {\r
+ return type;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the type property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setType(QName value) {\r
+ this.type = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the use property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getUse() {\r
+ if (use == null) {\r
+ return "optional";\r
+ } else {\r
+ return use;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the use property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setUse(String value) {\r
+ this.use = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the default property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getDefault() {\r
+ return _default;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the default property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setDefault(String value) {\r
+ this._default = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the fixed property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getFixed() {\r
+ return fixed;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the fixed property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setFixed(String value) {\r
+ this.fixed = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the form property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public FormChoice getForm() {\r
+ return form;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the form property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public void setForm(FormChoice value) {\r
+ this.form = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the ref property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getRef() {\r
+ return ref;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the ref property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setRef(QName value) {\r
+ this.ref = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * <p>Java class for attributeGroup complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="attributeGroup">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}defRef"/>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "attributeGroup", propOrder = {\r
+ "attributeOrAttributeGroup",\r
+ "anyAttribute"\r
+})\r
+@XmlSeeAlso({\r
+ NamedAttributeGroup.class,\r
+ AttributeGroupRef.class\r
+})\r
+public abstract class AttributeGroup\r
+ extends Annotated\r
+{\r
+\r
+ @XmlElements({\r
+ @XmlElement(name = "attribute", type = Attribute.class),\r
+ @XmlElement(name = "attributeGroup", type = AttributeGroupRef.class)\r
+ })\r
+ protected List<Annotated> attributeOrAttributeGroup;\r
+ protected Wildcard anyAttribute;\r
+ @XmlAttribute(name = "name")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+ @XmlAttribute(name = "ref")\r
+ protected QName ref;\r
+\r
+ /**\r
+ * Gets the value of the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAttributeOrAttributeGroup().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Attribute }\r
+ * {@link AttributeGroupRef }\r
+ * \r
+ * \r
+ */\r
+ public List<Annotated> getAttributeOrAttributeGroup() {\r
+ if (attributeOrAttributeGroup == null) {\r
+ attributeOrAttributeGroup = new ArrayList<Annotated>();\r
+ }\r
+ return this.attributeOrAttributeGroup;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the anyAttribute property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public Wildcard getAnyAttribute() {\r
+ return anyAttribute;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the anyAttribute property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public void setAnyAttribute(Wildcard value) {\r
+ this.anyAttribute = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the ref property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getRef() {\r
+ return ref;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the ref property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setRef(QName value) {\r
+ this.ref = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for attributeGroupRef complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="attributeGroupRef">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}attributeGroup">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="ref" use="required" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "attributeGroupRef")\r
+public class AttributeGroupRef\r
+ extends AttributeGroup\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <choice>\r
+ * <element name="restriction" type="{http://www.w3.org/2001/XMLSchema}complexRestrictionType"/>\r
+ * <element name="extension" type="{http://www.w3.org/2001/XMLSchema}extensionType"/>\r
+ * </choice>\r
+ * <attribute name="mixed" type="{http://www.w3.org/2001/XMLSchema}boolean" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "restriction",\r
+ "extension"\r
+})\r
+@XmlRootElement(name = "complexContent")\r
+public class ComplexContent\r
+ extends Annotated\r
+{\r
+\r
+ protected ComplexRestrictionType restriction;\r
+ protected ExtensionType extension;\r
+ @XmlAttribute(name = "mixed")\r
+ protected Boolean mixed;\r
+\r
+ /**\r
+ * Gets the value of the restriction property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ComplexRestrictionType }\r
+ * \r
+ */\r
+ public ComplexRestrictionType getRestriction() {\r
+ return restriction;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the restriction property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ComplexRestrictionType }\r
+ * \r
+ */\r
+ public void setRestriction(ComplexRestrictionType value) {\r
+ this.restriction = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the extension property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExtensionType }\r
+ * \r
+ */\r
+ public ExtensionType getExtension() {\r
+ return extension;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the extension property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExtensionType }\r
+ * \r
+ */\r
+ public void setExtension(ExtensionType value) {\r
+ this.extension = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the mixed property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public Boolean isMixed() {\r
+ return mixed;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the mixed property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public void setMixed(Boolean value) {\r
+ this.mixed = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for complexRestrictionType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="complexRestrictionType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}restrictionType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice minOccurs="0">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}typeDefParticle"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "complexRestrictionType")\r
+public class ComplexRestrictionType\r
+ extends RestrictionType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for complexType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="complexType">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}complexTypeModel"/>\r
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <attribute name="mixed" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />\r
+ * <attribute name="abstract" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />\r
+ * <attribute name="final" type="{http://www.w3.org/2001/XMLSchema}derivationSet" />\r
+ * <attribute name="block" type="{http://www.w3.org/2001/XMLSchema}derivationSet" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "complexType", propOrder = {\r
+ "simpleContent",\r
+ "complexContent",\r
+ "group",\r
+ "all",\r
+ "choice",\r
+ "sequence",\r
+ "attributeOrAttributeGroup",\r
+ "anyAttribute"\r
+})\r
+@XmlSeeAlso({\r
+ TopLevelComplexType.class,\r
+ LocalComplexType.class\r
+})\r
+public abstract class ComplexType\r
+ extends Annotated\r
+{\r
+\r
+ protected SimpleContent simpleContent;\r
+ protected ComplexContent complexContent;\r
+ protected GroupRef group;\r
+ protected All all;\r
+ protected ExplicitGroup choice;\r
+ protected ExplicitGroup sequence;\r
+ @XmlElements({\r
+ @XmlElement(name = "attribute", type = Attribute.class),\r
+ @XmlElement(name = "attributeGroup", type = AttributeGroupRef.class)\r
+ })\r
+ protected List<Annotated> attributeOrAttributeGroup;\r
+ protected Wildcard anyAttribute;\r
+ @XmlAttribute(name = "name")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+ @XmlAttribute(name = "mixed")\r
+ protected Boolean mixed;\r
+ @XmlAttribute(name = "abstract")\r
+ protected Boolean _abstract;\r
+ @XmlAttribute(name = "final")\r
+ @XmlSchemaType(name = "derivationSet")\r
+ protected List<String> _final;\r
+ @XmlAttribute(name = "block")\r
+ @XmlSchemaType(name = "derivationSet")\r
+ protected List<String> block;\r
+\r
+ /**\r
+ * Gets the value of the simpleContent property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link SimpleContent }\r
+ * \r
+ */\r
+ public SimpleContent getSimpleContent() {\r
+ return simpleContent;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the simpleContent property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link SimpleContent }\r
+ * \r
+ */\r
+ public void setSimpleContent(SimpleContent value) {\r
+ this.simpleContent = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the complexContent property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ComplexContent }\r
+ * \r
+ */\r
+ public ComplexContent getComplexContent() {\r
+ return complexContent;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the complexContent property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ComplexContent }\r
+ * \r
+ */\r
+ public void setComplexContent(ComplexContent value) {\r
+ this.complexContent = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the group property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link GroupRef }\r
+ * \r
+ */\r
+ public GroupRef getGroup() {\r
+ return group;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the group property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link GroupRef }\r
+ * \r
+ */\r
+ public void setGroup(GroupRef value) {\r
+ this.group = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the all property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link All }\r
+ * \r
+ */\r
+ public All getAll() {\r
+ return all;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the all property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link All }\r
+ * \r
+ */\r
+ public void setAll(All value) {\r
+ this.all = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the choice property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup getChoice() {\r
+ return choice;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the choice property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public void setChoice(ExplicitGroup value) {\r
+ this.choice = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the sequence property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup getSequence() {\r
+ return sequence;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the sequence property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public void setSequence(ExplicitGroup value) {\r
+ this.sequence = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAttributeOrAttributeGroup().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Attribute }\r
+ * {@link AttributeGroupRef }\r
+ * \r
+ * \r
+ */\r
+ public List<Annotated> getAttributeOrAttributeGroup() {\r
+ if (attributeOrAttributeGroup == null) {\r
+ attributeOrAttributeGroup = new ArrayList<Annotated>();\r
+ }\r
+ return this.attributeOrAttributeGroup;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the anyAttribute property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public Wildcard getAnyAttribute() {\r
+ return anyAttribute;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the anyAttribute property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public void setAnyAttribute(Wildcard value) {\r
+ this.anyAttribute = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the mixed property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public boolean isMixed() {\r
+ if (mixed == null) {\r
+ return false;\r
+ } else {\r
+ return mixed;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the mixed property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public void setMixed(Boolean value) {\r
+ this.mixed = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the abstract property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public boolean isAbstract() {\r
+ if (_abstract == null) {\r
+ return false;\r
+ } else {\r
+ return _abstract;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the abstract property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public void setAbstract(Boolean value) {\r
+ this._abstract = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the final property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the final property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getFinal().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getFinal() {\r
+ if (_final == null) {\r
+ _final = new ArrayList<String>();\r
+ }\r
+ return this._final;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the block property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the block property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getBlock().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getBlock() {\r
+ if (block == null) {\r
+ block = new ArrayList<String>();\r
+ }\r
+ return this.block;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlEnum;\r
+import javax.xml.bind.annotation.XmlEnumValue;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for derivationControl.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * <p>\r
+ * <pre>\r
+ * <simpleType name="derivationControl">\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">\r
+ * <enumeration value="substitution"/>\r
+ * <enumeration value="extension"/>\r
+ * <enumeration value="restriction"/>\r
+ * <enumeration value="list"/>\r
+ * <enumeration value="union"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </pre>\r
+ * \r
+ */\r
+@XmlType(name = "derivationControl")\r
+@XmlEnum\r
+public enum DerivationControl {\r
+\r
+ @XmlEnumValue("substitution")\r
+ SUBSTITUTION("substitution"),\r
+ @XmlEnumValue("extension")\r
+ EXTENSION("extension"),\r
+ @XmlEnumValue("restriction")\r
+ RESTRICTION("restriction"),\r
+ @XmlEnumValue("list")\r
+ LIST("list"),\r
+ @XmlEnumValue("union")\r
+ UNION("union");\r
+ private final String value;\r
+\r
+ DerivationControl(String v) {\r
+ value = v;\r
+ }\r
+\r
+ public String value() {\r
+ return value;\r
+ }\r
+\r
+ public static DerivationControl fromValue(String v) {\r
+ for (DerivationControl c: DerivationControl.values()) {\r
+ if (c.value.equals(v)) {\r
+ return c;\r
+ }\r
+ }\r
+ throw new IllegalArgumentException(v);\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAnyAttribute;\r
+import javax.xml.bind.annotation.XmlAnyElement;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlMixed;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+import org.w3c.dom.Element;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <sequence maxOccurs="unbounded" minOccurs="0">\r
+ * <any processContents='lax'/>\r
+ * </sequence>\r
+ * <attribute name="source" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "content"\r
+})\r
+@XmlRootElement(name = "documentation")\r
+public class Documentation {\r
+\r
+ @XmlMixed\r
+ @XmlAnyElement(lax = true)\r
+ protected List<Object> content;\r
+ @XmlAttribute(name = "source")\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String source;\r
+ @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace")\r
+ protected String lang;\r
+ @XmlAnyAttribute\r
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();\r
+\r
+ /**\r
+ * Gets the value of the content property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the content property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getContent().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Object }\r
+ * {@link String }\r
+ * {@link Element }\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getContent() {\r
+ if (content == null) {\r
+ content = new ArrayList<Object>();\r
+ }\r
+ return this.content;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the source property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getSource() {\r
+ return source;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the source property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setSource(String value) {\r
+ this.source = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the lang property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getLang() {\r
+ return lang;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the lang property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setLang(String value) {\r
+ this.lang = value;\r
+ }\r
+\r
+ /**\r
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.\r
+ * \r
+ * <p>\r
+ * the map is keyed by the name of the attribute and \r
+ * the value is the string value of the attribute.\r
+ * \r
+ * the map returned by this method is live, and you can add new attribute\r
+ * by updating the map directly. Because of this design, there's no setter.\r
+ * \r
+ * \r
+ * @return\r
+ * always non-null\r
+ */\r
+ public Map<QName, String> getOtherAttributes() {\r
+ return otherAttributes;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.math.BigInteger;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElementRef;\r
+import javax.xml.bind.annotation.XmlElementRefs;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * \r
+ * The element element can be used either\r
+ * at the top level to define an element-type binding globally,\r
+ * or within a content model to either reference a globally-defined\r
+ * element or type or declare an element-type binding locally.\r
+ * The ref form is not allowed at the top level.\r
+ * \r
+ * <p>Java class for element complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="element">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <choice minOccurs="0">\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType"/>\r
+ * <element name="complexType" type="{http://www.w3.org/2001/XMLSchema}localComplexType"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}identityConstraint" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}defRef"/>\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}occurs"/>\r
+ * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <attribute name="substitutionGroup" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <attribute name="default" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="fixed" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <attribute name="nillable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />\r
+ * <attribute name="abstract" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />\r
+ * <attribute name="final" type="{http://www.w3.org/2001/XMLSchema}derivationSet" />\r
+ * <attribute name="block" type="{http://www.w3.org/2001/XMLSchema}blockSet" />\r
+ * <attribute name="form" type="{http://www.w3.org/2001/XMLSchema}formChoice" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "element", propOrder = {\r
+ "simpleType",\r
+ "complexType",\r
+ "identityConstraint"\r
+})\r
+@XmlSeeAlso({\r
+ TopLevelElement.class,\r
+ LocalElement.class\r
+})\r
+public abstract class Element\r
+ extends Annotated\r
+{\r
+\r
+ protected LocalSimpleType simpleType;\r
+ protected LocalComplexType complexType;\r
+ @XmlElementRefs({\r
+ @XmlElementRef(name = "keyref", namespace = "http://www.w3.org/2001/XMLSchema", type = Keyref.class, required = false),\r
+ @XmlElementRef(name = "key", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "unique", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false)\r
+ })\r
+ protected List<Object> identityConstraint;\r
+ @XmlAttribute(name = "type")\r
+ protected QName type;\r
+ @XmlAttribute(name = "substitutionGroup")\r
+ protected QName substitutionGroup;\r
+ @XmlAttribute(name = "default")\r
+ protected String _default;\r
+ @XmlAttribute(name = "fixed")\r
+ protected String fixed;\r
+ @XmlAttribute(name = "nillable")\r
+ protected Boolean nillable;\r
+ @XmlAttribute(name = "abstract")\r
+ protected Boolean _abstract;\r
+ @XmlAttribute(name = "final")\r
+ @XmlSchemaType(name = "derivationSet")\r
+ protected List<String> _final;\r
+ @XmlAttribute(name = "block")\r
+ @XmlSchemaType(name = "blockSet")\r
+ protected List<String> block;\r
+ @XmlAttribute(name = "form")\r
+ protected FormChoice form;\r
+ @XmlAttribute(name = "name")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+ @XmlAttribute(name = "ref")\r
+ protected QName ref;\r
+ @XmlAttribute(name = "minOccurs")\r
+ @XmlSchemaType(name = "nonNegativeInteger")\r
+ protected BigInteger minOccurs;\r
+ @XmlAttribute(name = "maxOccurs")\r
+ @XmlSchemaType(name = "allNNI")\r
+ protected String maxOccurs;\r
+\r
+ /**\r
+ * Gets the value of the simpleType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public LocalSimpleType getSimpleType() {\r
+ return simpleType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the simpleType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public void setSimpleType(LocalSimpleType value) {\r
+ this.simpleType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the complexType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link LocalComplexType }\r
+ * \r
+ */\r
+ public LocalComplexType getComplexType() {\r
+ return complexType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the complexType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link LocalComplexType }\r
+ * \r
+ */\r
+ public void setComplexType(LocalComplexType value) {\r
+ this.complexType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the identityConstraint property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the identityConstraint property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getIdentityConstraint().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link JAXBElement }{@code <}{@link Keybase }{@code >}\r
+ * {@link Keyref }\r
+ * {@link JAXBElement }{@code <}{@link Keybase }{@code >}\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getIdentityConstraint() {\r
+ if (identityConstraint == null) {\r
+ identityConstraint = new ArrayList<Object>();\r
+ }\r
+ return this.identityConstraint;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the type property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getType() {\r
+ return type;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the type property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setType(QName value) {\r
+ this.type = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the substitutionGroup property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getSubstitutionGroup() {\r
+ return substitutionGroup;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the substitutionGroup property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setSubstitutionGroup(QName value) {\r
+ this.substitutionGroup = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the default property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getDefault() {\r
+ return _default;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the default property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setDefault(String value) {\r
+ this._default = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the fixed property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getFixed() {\r
+ return fixed;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the fixed property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setFixed(String value) {\r
+ this.fixed = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the nillable property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public boolean isNillable() {\r
+ if (nillable == null) {\r
+ return false;\r
+ } else {\r
+ return nillable;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the nillable property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public void setNillable(Boolean value) {\r
+ this.nillable = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the abstract property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public boolean isAbstract() {\r
+ if (_abstract == null) {\r
+ return false;\r
+ } else {\r
+ return _abstract;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the abstract property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public void setAbstract(Boolean value) {\r
+ this._abstract = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the final property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the final property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getFinal().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getFinal() {\r
+ if (_final == null) {\r
+ _final = new ArrayList<String>();\r
+ }\r
+ return this._final;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the block property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the block property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getBlock().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getBlock() {\r
+ if (block == null) {\r
+ block = new ArrayList<String>();\r
+ }\r
+ return this.block;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the form property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public FormChoice getForm() {\r
+ return form;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the form property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public void setForm(FormChoice value) {\r
+ this.form = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the ref property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getRef() {\r
+ return ref;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the ref property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setRef(QName value) {\r
+ this.ref = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the minOccurs property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public BigInteger getMinOccurs() {\r
+ if (minOccurs == null) {\r
+ return new BigInteger("1");\r
+ } else {\r
+ return minOccurs;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the minOccurs property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public void setMinOccurs(BigInteger value) {\r
+ this.minOccurs = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the maxOccurs property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getMaxOccurs() {\r
+ if (maxOccurs == null) {\r
+ return "1";\r
+ } else {\r
+ return maxOccurs;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the maxOccurs property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setMaxOccurs(String value) {\r
+ this.maxOccurs = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * \r
+ * group type for the three kinds of group\r
+ * \r
+ * <p>Java class for explicitGroup complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="explicitGroup">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}group">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}nestedParticle" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "explicitGroup")\r
+@XmlSeeAlso({\r
+ All.class,\r
+ SimpleExplicitGroup.class\r
+})\r
+public class ExplicitGroup\r
+ extends Group\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * <p>Java class for extensionType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="extensionType">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}typeDefParticle" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * </sequence>\r
+ * <attribute name="base" use="required" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "extensionType", propOrder = {\r
+ "group",\r
+ "all",\r
+ "choice",\r
+ "sequence",\r
+ "attributeOrAttributeGroup",\r
+ "anyAttribute"\r
+})\r
+@XmlSeeAlso({\r
+ SimpleExtensionType.class\r
+})\r
+public class ExtensionType\r
+ extends Annotated\r
+{\r
+\r
+ protected GroupRef group;\r
+ protected All all;\r
+ protected ExplicitGroup choice;\r
+ protected ExplicitGroup sequence;\r
+ @XmlElements({\r
+ @XmlElement(name = "attribute", type = Attribute.class),\r
+ @XmlElement(name = "attributeGroup", type = AttributeGroupRef.class)\r
+ })\r
+ protected List<Annotated> attributeOrAttributeGroup;\r
+ protected Wildcard anyAttribute;\r
+ @XmlAttribute(name = "base", required = true)\r
+ protected QName base;\r
+\r
+ /**\r
+ * Gets the value of the group property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link GroupRef }\r
+ * \r
+ */\r
+ public GroupRef getGroup() {\r
+ return group;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the group property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link GroupRef }\r
+ * \r
+ */\r
+ public void setGroup(GroupRef value) {\r
+ this.group = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the all property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link All }\r
+ * \r
+ */\r
+ public All getAll() {\r
+ return all;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the all property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link All }\r
+ * \r
+ */\r
+ public void setAll(All value) {\r
+ this.all = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the choice property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup getChoice() {\r
+ return choice;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the choice property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public void setChoice(ExplicitGroup value) {\r
+ this.choice = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the sequence property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup getSequence() {\r
+ return sequence;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the sequence property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public void setSequence(ExplicitGroup value) {\r
+ this.sequence = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAttributeOrAttributeGroup().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Attribute }\r
+ * {@link AttributeGroupRef }\r
+ * \r
+ * \r
+ */\r
+ public List<Annotated> getAttributeOrAttributeGroup() {\r
+ if (attributeOrAttributeGroup == null) {\r
+ attributeOrAttributeGroup = new ArrayList<Annotated>();\r
+ }\r
+ return this.attributeOrAttributeGroup;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the anyAttribute property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public Wildcard getAnyAttribute() {\r
+ return anyAttribute;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the anyAttribute property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public void setAnyAttribute(Wildcard value) {\r
+ this.anyAttribute = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the base property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getBase() {\r
+ return base;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the base property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setBase(QName value) {\r
+ this.base = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for facet complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="facet">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />\r
+ * <attribute name="fixed" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "facet")\r
+@XmlSeeAlso({\r
+ NoFixedFacet.class,\r
+ NumFacet.class,\r
+ WhiteSpace.class\r
+})\r
+public class Facet\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "value", required = true)\r
+ @XmlSchemaType(name = "anySimpleType")\r
+ protected String value;\r
+ @XmlAttribute(name = "fixed")\r
+ protected Boolean fixed;\r
+\r
+ /**\r
+ * Gets the value of the value property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getValue() {\r
+ return value;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the value property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setValue(String value) {\r
+ this.value = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the fixed property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public boolean isFixed() {\r
+ if (fixed == null) {\r
+ return false;\r
+ } else {\r
+ return fixed;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the fixed property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Boolean }\r
+ * \r
+ */\r
+ public void setFixed(Boolean value) {\r
+ this.fixed = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="xpath" use="required">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}token">\r
+ * <pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "field")\r
+public class Field\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "xpath", required = true)\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ protected String xpath;\r
+\r
+ /**\r
+ * Gets the value of the xpath property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getXpath() {\r
+ return xpath;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the xpath property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setXpath(String value) {\r
+ this.xpath = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlEnum;\r
+import javax.xml.bind.annotation.XmlEnumValue;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for formChoice.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * <p>\r
+ * <pre>\r
+ * <simpleType name="formChoice">\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">\r
+ * <enumeration value="qualified"/>\r
+ * <enumeration value="unqualified"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </pre>\r
+ * \r
+ */\r
+@XmlType(name = "formChoice")\r
+@XmlEnum\r
+public enum FormChoice {\r
+\r
+ @XmlEnumValue("qualified")\r
+ QUALIFIED("qualified"),\r
+ @XmlEnumValue("unqualified")\r
+ UNQUALIFIED("unqualified");\r
+ private final String value;\r
+\r
+ FormChoice(String v) {\r
+ value = v;\r
+ }\r
+\r
+ public String value() {\r
+ return value;\r
+ }\r
+\r
+ public static FormChoice fromValue(String v) {\r
+ for (FormChoice c: FormChoice.values()) {\r
+ if (c.value.equals(v)) {\r
+ return c;\r
+ }\r
+ }\r
+ throw new IllegalArgumentException(v);\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.math.BigInteger;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElementRef;\r
+import javax.xml.bind.annotation.XmlElementRefs;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * \r
+ * group type for explicit groups, named top-level groups and\r
+ * group references\r
+ * \r
+ * <p>Java class for group complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="group">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}particle" maxOccurs="unbounded" minOccurs="0"/>\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}occurs"/>\r
+ * <attGroup ref="{http://www.w3.org/2001/XMLSchema}defRef"/>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "group", propOrder = {\r
+ "particle"\r
+})\r
+@XmlSeeAlso({\r
+ ExplicitGroup.class,\r
+ RealGroup.class\r
+})\r
+public abstract class Group\r
+ extends Annotated\r
+{\r
+\r
+ @XmlElementRefs({\r
+ @XmlElementRef(name = "all", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "any", namespace = "http://www.w3.org/2001/XMLSchema", type = Any.class, required = false),\r
+ @XmlElementRef(name = "element", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "group", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "choice", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "sequence", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false)\r
+ })\r
+ protected List<Object> particle;\r
+ @XmlAttribute(name = "minOccurs")\r
+ @XmlSchemaType(name = "nonNegativeInteger")\r
+ protected BigInteger minOccurs;\r
+ @XmlAttribute(name = "maxOccurs")\r
+ @XmlSchemaType(name = "allNNI")\r
+ protected String maxOccurs;\r
+ @XmlAttribute(name = "name")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+ @XmlAttribute(name = "ref")\r
+ protected QName ref;\r
+\r
+ /**\r
+ * Gets the value of the particle property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the particle property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getParticle().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link JAXBElement }{@code <}{@link All }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link GroupRef }{@code >}\r
+ * {@link Any }\r
+ * {@link JAXBElement }{@code <}{@link ExplicitGroup }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link LocalElement }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link ExplicitGroup }{@code >}\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getParticle() {\r
+ if (particle == null) {\r
+ particle = new ArrayList<Object>();\r
+ }\r
+ return this.particle;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the minOccurs property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public BigInteger getMinOccurs() {\r
+ if (minOccurs == null) {\r
+ return new BigInteger("1");\r
+ } else {\r
+ return minOccurs;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the minOccurs property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link BigInteger }\r
+ * \r
+ */\r
+ public void setMinOccurs(BigInteger value) {\r
+ this.minOccurs = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the maxOccurs property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getMaxOccurs() {\r
+ if (maxOccurs == null) {\r
+ return "1";\r
+ } else {\r
+ return maxOccurs;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the maxOccurs property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setMaxOccurs(String value) {\r
+ this.maxOccurs = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the ref property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getRef() {\r
+ return ref;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the ref property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setRef(QName value) {\r
+ this.ref = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for groupRef complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="groupRef">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}realGroup">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="ref" use="required" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "groupRef")\r
+public class GroupRef\r
+ extends RealGroup\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="namespace" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <attribute name="schemaLocation" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "import")\r
+public class Import\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "namespace")\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String namespace;\r
+ @XmlAttribute(name = "schemaLocation")\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String schemaLocation;\r
+\r
+ /**\r
+ * Gets the value of the namespace property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getNamespace() {\r
+ return namespace;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the namespace property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setNamespace(String value) {\r
+ this.namespace = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the schemaLocation property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getSchemaLocation() {\r
+ return schemaLocation;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the schemaLocation property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setSchemaLocation(String value) {\r
+ this.schemaLocation = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="schemaLocation" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "include")\r
+public class Include\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "schemaLocation", required = true)\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String schemaLocation;\r
+\r
+ /**\r
+ * Gets the value of the schemaLocation property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getSchemaLocation() {\r
+ return schemaLocation;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the schemaLocation property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setSchemaLocation(String value) {\r
+ this.schemaLocation = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for keybase complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="keybase">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}selector"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}field" maxOccurs="unbounded"/>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "keybase", propOrder = {\r
+ "selector",\r
+ "field"\r
+})\r
+@XmlSeeAlso({\r
+ Keyref.class\r
+})\r
+public class Keybase\r
+ extends Annotated\r
+{\r
+\r
+ @XmlElement(required = true)\r
+ protected Selector selector;\r
+ @XmlElement(required = true)\r
+ protected List<Field> field;\r
+ @XmlAttribute(name = "name", required = true)\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+\r
+ /**\r
+ * Gets the value of the selector property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Selector }\r
+ * \r
+ */\r
+ public Selector getSelector() {\r
+ return selector;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the selector property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Selector }\r
+ * \r
+ */\r
+ public void setSelector(Selector value) {\r
+ this.selector = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the field property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the field property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getField().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Field }\r
+ * \r
+ * \r
+ */\r
+ public List<Field> getField() {\r
+ if (field == null) {\r
+ field = new ArrayList<Field>();\r
+ }\r
+ return this.field;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}keybase">\r
+ * <attribute name="refer" use="required" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "keyref")\r
+public class Keyref\r
+ extends Keybase\r
+{\r
+\r
+ @XmlAttribute(name = "refer", required = true)\r
+ protected QName refer;\r
+\r
+ /**\r
+ * Gets the value of the refer property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getRefer() {\r
+ return refer;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the refer property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setRefer(QName value) {\r
+ this.refer = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * \r
+ * itemType attribute and simpleType child are mutually\r
+ * exclusive, but one or other is required\r
+ * \r
+ * \r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="itemType" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "simpleType"\r
+})\r
+@XmlRootElement(name = "list")\r
+public class List\r
+ extends Annotated\r
+{\r
+\r
+ protected LocalSimpleType simpleType;\r
+ @XmlAttribute(name = "itemType")\r
+ protected QName itemType;\r
+\r
+ /**\r
+ * Gets the value of the simpleType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public LocalSimpleType getSimpleType() {\r
+ return simpleType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the simpleType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public void setSimpleType(LocalSimpleType value) {\r
+ this.simpleType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the itemType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getItemType() {\r
+ return itemType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the itemType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setItemType(QName value) {\r
+ this.itemType = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for localComplexType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="localComplexType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}complexType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}complexTypeModel"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "localComplexType")\r
+public class LocalComplexType\r
+ extends ComplexType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for localElement complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="localElement">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}element">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice minOccurs="0">\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType"/>\r
+ * <element name="complexType" type="{http://www.w3.org/2001/XMLSchema}localComplexType"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}identityConstraint" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "localElement")\r
+@XmlSeeAlso({\r
+ NarrowMaxMin.class\r
+})\r
+public class LocalElement\r
+ extends Element\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for localSimpleType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="localSimpleType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}simpleType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}simpleDerivation"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "localSimpleType")\r
+public class LocalSimpleType\r
+ extends SimpleType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for namedAttributeGroup complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="namedAttributeGroup">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}attributeGroup">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "namedAttributeGroup")\r
+public class NamedAttributeGroup\r
+ extends AttributeGroup\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for namedGroup complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="namedGroup">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}realGroup">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice>\r
+ * <element name="all">\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}all">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}allModel"/>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </element>\r
+ * <element name="choice" type="{http://www.w3.org/2001/XMLSchema}simpleExplicitGroup"/>\r
+ * <element name="sequence" type="{http://www.w3.org/2001/XMLSchema}simpleExplicitGroup"/>\r
+ * </choice>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "namedGroup")\r
+public class NamedGroup\r
+ extends RealGroup\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * restricted max/min\r
+ * \r
+ * <p>Java class for narrowMaxMin complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="narrowMaxMin">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}localElement">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice minOccurs="0">\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType"/>\r
+ * <element name="complexType" type="{http://www.w3.org/2001/XMLSchema}localComplexType"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}identityConstraint" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="minOccurs" default="1">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger">\r
+ * <enumeration value="0"/>\r
+ * <enumeration value="1"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <attribute name="maxOccurs" default="1">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}allNNI">\r
+ * <enumeration value="0"/>\r
+ * <enumeration value="1"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "narrowMaxMin")\r
+public class NarrowMaxMin\r
+ extends LocalElement\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for noFixedFacet complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="noFixedFacet">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}facet">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "noFixedFacet")\r
+@XmlSeeAlso({\r
+ Pattern.class\r
+})\r
+public class NoFixedFacet\r
+ extends Facet\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <attribute name="public" type="{http://www.w3.org/2001/XMLSchema}public" />\r
+ * <attribute name="system" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "notation")\r
+public class Notation\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "name", required = true)\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+ @XmlAttribute(name = "public")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "public")\r
+ protected String _public;\r
+ @XmlAttribute(name = "system")\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String system;\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the public property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getPublic() {\r
+ return _public;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the public property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setPublic(String value) {\r
+ this._public = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the system property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getSystem() {\r
+ return system;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the system property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setSystem(String value) {\r
+ this.system = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for numFacet complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="numFacet">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}facet">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "numFacet")\r
+@XmlSeeAlso({\r
+ TotalDigits.class\r
+})\r
+public class NumFacet\r
+ extends Facet\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlElementDecl;\r
+import javax.xml.bind.annotation.XmlRegistry;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * This object contains factory methods for each \r
+ * Java content interface and Java element interface \r
+ * generated in the org.w3._2001.xmlschema package. \r
+ * <p>An ObjectFactory allows you to programatically \r
+ * construct new instances of the Java representation \r
+ * for XML content. The Java representation of XML \r
+ * content can consist of schema derived interfaces \r
+ * and classes representing the binding of schema \r
+ * type definitions, element declarations and model \r
+ * groups. Factory methods for each of these are \r
+ * provided in this class.\r
+ * \r
+ */\r
+@XmlRegistry\r
+public class ObjectFactory {\r
+\r
+ private final static QName _MinInclusive_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "minInclusive");\r
+ private final static QName _MaxLength_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "maxLength");\r
+ private final static QName _Sequence_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "sequence");\r
+ private final static QName _MinLength_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "minLength");\r
+ private final static QName _Group_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "group");\r
+ private final static QName _AttributeGroup_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "attributeGroup");\r
+ private final static QName _Key_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "key");\r
+ private final static QName _All_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "all");\r
+ private final static QName _Length_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "length");\r
+ private final static QName _SimpleType_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "simpleType");\r
+ private final static QName _Enumeration_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "enumeration");\r
+ private final static QName _Choice_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "choice");\r
+ private final static QName _FractionDigits_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "fractionDigits");\r
+ private final static QName _MinExclusive_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "minExclusive");\r
+ private final static QName _MaxExclusive_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "maxExclusive");\r
+ private final static QName _Element_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "element");\r
+ private final static QName _Unique_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "unique");\r
+ private final static QName _ComplexType_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "complexType");\r
+ private final static QName _MaxInclusive_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "maxInclusive");\r
+ private final static QName _Attribute_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "attribute");\r
+ private final static QName _AnyAttribute_QNAME = new QName("http://www.w3.org/2001/XMLSchema", "anyAttribute");\r
+\r
+ /**\r
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.w3._2001.xmlschema\r
+ * \r
+ */\r
+ public ObjectFactory() {\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Selector }\r
+ * \r
+ */\r
+ public Selector createSelector() {\r
+ return new Selector();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Annotated }\r
+ * \r
+ */\r
+ public Annotated createAnnotated() {\r
+ return new Annotated();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link OpenAttrs }\r
+ * \r
+ */\r
+ public OpenAttrs createOpenAttrs() {\r
+ return new OpenAttrs();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Annotation }\r
+ * \r
+ */\r
+ public Annotation createAnnotation() {\r
+ return new Annotation();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Appinfo }\r
+ * \r
+ */\r
+ public Appinfo createAppinfo() {\r
+ return new Appinfo();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Documentation }\r
+ * \r
+ */\r
+ public Documentation createDocumentation() {\r
+ return new Documentation();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Facet }\r
+ * \r
+ */\r
+ public Facet createFacet() {\r
+ return new Facet();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link TopLevelComplexType }\r
+ * \r
+ */\r
+ public TopLevelComplexType createTopLevelComplexType() {\r
+ return new TopLevelComplexType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Keybase }\r
+ * \r
+ */\r
+ public Keybase createKeybase() {\r
+ return new Keybase();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link NumFacet }\r
+ * \r
+ */\r
+ public NumFacet createNumFacet() {\r
+ return new NumFacet();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup createExplicitGroup() {\r
+ return new ExplicitGroup();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link ComplexContent }\r
+ * \r
+ */\r
+ public ComplexContent createComplexContent() {\r
+ return new ComplexContent();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link ComplexRestrictionType }\r
+ * \r
+ */\r
+ public ComplexRestrictionType createComplexRestrictionType() {\r
+ return new ComplexRestrictionType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link ExtensionType }\r
+ * \r
+ */\r
+ public ExtensionType createExtensionType() {\r
+ return new ExtensionType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link TopLevelAttribute }\r
+ * \r
+ */\r
+ public TopLevelAttribute createTopLevelAttribute() {\r
+ return new TopLevelAttribute();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Keyref }\r
+ * \r
+ */\r
+ public Keyref createKeyref() {\r
+ return new Keyref();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Field }\r
+ * \r
+ */\r
+ public Field createField() {\r
+ return new Field();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Wildcard }\r
+ * \r
+ */\r
+ public Wildcard createWildcard() {\r
+ return new Wildcard();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Schema }\r
+ * \r
+ */\r
+ public Schema createSchema() {\r
+ return new Schema();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Include }\r
+ * \r
+ */\r
+ public Include createInclude() {\r
+ return new Include();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Import }\r
+ * \r
+ */\r
+ public Import createImport() {\r
+ return new Import();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Redefine }\r
+ * \r
+ */\r
+ public Redefine createRedefine() {\r
+ return new Redefine();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link TopLevelSimpleType }\r
+ * \r
+ */\r
+ public TopLevelSimpleType createTopLevelSimpleType() {\r
+ return new TopLevelSimpleType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link NamedGroup }\r
+ * \r
+ */\r
+ public NamedGroup createNamedGroup() {\r
+ return new NamedGroup();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link NamedAttributeGroup }\r
+ * \r
+ */\r
+ public NamedAttributeGroup createNamedAttributeGroup() {\r
+ return new NamedAttributeGroup();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link TopLevelElement }\r
+ * \r
+ */\r
+ public TopLevelElement createTopLevelElement() {\r
+ return new TopLevelElement();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Notation }\r
+ * \r
+ */\r
+ public Notation createNotation() {\r
+ return new Notation();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Union }\r
+ * \r
+ */\r
+ public Union createUnion() {\r
+ return new Union();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public LocalSimpleType createLocalSimpleType() {\r
+ return new LocalSimpleType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Any }\r
+ * \r
+ */\r
+ public Any createAny() {\r
+ return new Any();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link All }\r
+ * \r
+ */\r
+ public All createAll() {\r
+ return new All();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link WhiteSpace }\r
+ * \r
+ */\r
+ public WhiteSpace createWhiteSpace() {\r
+ return new WhiteSpace();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link TotalDigits }\r
+ * \r
+ */\r
+ public TotalDigits createTotalDigits() {\r
+ return new TotalDigits();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Restriction }\r
+ * \r
+ */\r
+ public Restriction createRestriction() {\r
+ return new Restriction();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link NoFixedFacet }\r
+ * \r
+ */\r
+ public NoFixedFacet createNoFixedFacet() {\r
+ return new NoFixedFacet();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Pattern }\r
+ * \r
+ */\r
+ public Pattern createPattern() {\r
+ return new Pattern();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link List }\r
+ * \r
+ */\r
+ public List createList() {\r
+ return new List();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link SimpleContent }\r
+ * \r
+ */\r
+ public SimpleContent createSimpleContent() {\r
+ return new SimpleContent();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link SimpleRestrictionType }\r
+ * \r
+ */\r
+ public SimpleRestrictionType createSimpleRestrictionType() {\r
+ return new SimpleRestrictionType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link SimpleExtensionType }\r
+ * \r
+ */\r
+ public SimpleExtensionType createSimpleExtensionType() {\r
+ return new SimpleExtensionType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link NarrowMaxMin }\r
+ * \r
+ */\r
+ public NarrowMaxMin createNarrowMaxMin() {\r
+ return new NarrowMaxMin();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link LocalElement }\r
+ * \r
+ */\r
+ public LocalElement createLocalElement() {\r
+ return new LocalElement();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link LocalComplexType }\r
+ * \r
+ */\r
+ public LocalComplexType createLocalComplexType() {\r
+ return new LocalComplexType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link SimpleExplicitGroup }\r
+ * \r
+ */\r
+ public SimpleExplicitGroup createSimpleExplicitGroup() {\r
+ return new SimpleExplicitGroup();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link AttributeGroupRef }\r
+ * \r
+ */\r
+ public AttributeGroupRef createAttributeGroupRef() {\r
+ return new AttributeGroupRef();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link GroupRef }\r
+ * \r
+ */\r
+ public GroupRef createGroupRef() {\r
+ return new GroupRef();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link Attribute }\r
+ * \r
+ */\r
+ public Attribute createAttribute() {\r
+ return new Attribute();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link RealGroup }\r
+ * \r
+ */\r
+ public RealGroup createRealGroup() {\r
+ return new RealGroup();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link RestrictionType }\r
+ * \r
+ */\r
+ public RestrictionType createRestrictionType() {\r
+ return new RestrictionType();\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Facet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "minInclusive")\r
+ public JAXBElement<Facet> createMinInclusive(Facet value) {\r
+ return new JAXBElement<Facet>(_MinInclusive_QNAME, Facet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NumFacet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "maxLength")\r
+ public JAXBElement<NumFacet> createMaxLength(NumFacet value) {\r
+ return new JAXBElement<NumFacet>(_MaxLength_QNAME, NumFacet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link ExplicitGroup }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "sequence")\r
+ public JAXBElement<ExplicitGroup> createSequence(ExplicitGroup value) {\r
+ return new JAXBElement<ExplicitGroup>(_Sequence_QNAME, ExplicitGroup.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NumFacet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "minLength")\r
+ public JAXBElement<NumFacet> createMinLength(NumFacet value) {\r
+ return new JAXBElement<NumFacet>(_MinLength_QNAME, NumFacet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NamedGroup }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "group")\r
+ public JAXBElement<NamedGroup> createGroup(NamedGroup value) {\r
+ return new JAXBElement<NamedGroup>(_Group_QNAME, NamedGroup.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NamedAttributeGroup }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "attributeGroup")\r
+ public JAXBElement<NamedAttributeGroup> createAttributeGroup(NamedAttributeGroup value) {\r
+ return new JAXBElement<NamedAttributeGroup>(_AttributeGroup_QNAME, NamedAttributeGroup.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Keybase }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "key")\r
+ public JAXBElement<Keybase> createKey(Keybase value) {\r
+ return new JAXBElement<Keybase>(_Key_QNAME, Keybase.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link All }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "all")\r
+ public JAXBElement<All> createAll(All value) {\r
+ return new JAXBElement<All>(_All_QNAME, All.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NumFacet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "length")\r
+ public JAXBElement<NumFacet> createLength(NumFacet value) {\r
+ return new JAXBElement<NumFacet>(_Length_QNAME, NumFacet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link TopLevelSimpleType }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "simpleType")\r
+ public JAXBElement<TopLevelSimpleType> createSimpleType(TopLevelSimpleType value) {\r
+ return new JAXBElement<TopLevelSimpleType>(_SimpleType_QNAME, TopLevelSimpleType.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NoFixedFacet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "enumeration")\r
+ public JAXBElement<NoFixedFacet> createEnumeration(NoFixedFacet value) {\r
+ return new JAXBElement<NoFixedFacet>(_Enumeration_QNAME, NoFixedFacet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link ExplicitGroup }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "choice")\r
+ public JAXBElement<ExplicitGroup> createChoice(ExplicitGroup value) {\r
+ return new JAXBElement<ExplicitGroup>(_Choice_QNAME, ExplicitGroup.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link NumFacet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "fractionDigits")\r
+ public JAXBElement<NumFacet> createFractionDigits(NumFacet value) {\r
+ return new JAXBElement<NumFacet>(_FractionDigits_QNAME, NumFacet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Facet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "minExclusive")\r
+ public JAXBElement<Facet> createMinExclusive(Facet value) {\r
+ return new JAXBElement<Facet>(_MinExclusive_QNAME, Facet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Facet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "maxExclusive")\r
+ public JAXBElement<Facet> createMaxExclusive(Facet value) {\r
+ return new JAXBElement<Facet>(_MaxExclusive_QNAME, Facet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link TopLevelElement }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "element")\r
+ public JAXBElement<TopLevelElement> createElement(TopLevelElement value) {\r
+ return new JAXBElement<TopLevelElement>(_Element_QNAME, TopLevelElement.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Keybase }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "unique")\r
+ public JAXBElement<Keybase> createUnique(Keybase value) {\r
+ return new JAXBElement<Keybase>(_Unique_QNAME, Keybase.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link TopLevelComplexType }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "complexType")\r
+ public JAXBElement<TopLevelComplexType> createComplexType(TopLevelComplexType value) {\r
+ return new JAXBElement<TopLevelComplexType>(_ComplexType_QNAME, TopLevelComplexType.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Facet }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "maxInclusive")\r
+ public JAXBElement<Facet> createMaxInclusive(Facet value) {\r
+ return new JAXBElement<Facet>(_MaxInclusive_QNAME, Facet.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link TopLevelAttribute }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "attribute")\r
+ public JAXBElement<TopLevelAttribute> createAttribute(TopLevelAttribute value) {\r
+ return new JAXBElement<TopLevelAttribute>(_Attribute_QNAME, TopLevelAttribute.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link Wildcard }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "anyAttribute")\r
+ public JAXBElement<Wildcard> createAnyAttribute(Wildcard value) {\r
+ return new JAXBElement<Wildcard>(_AnyAttribute_QNAME, Wildcard.class, null, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link LocalElement }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "element", scope = Group.class)\r
+ public JAXBElement<LocalElement> createGroupElement(LocalElement value) {\r
+ return new JAXBElement<LocalElement>(_Element_QNAME, LocalElement.class, Group.class, value);\r
+ }\r
+\r
+ /**\r
+ * Create an instance of {@link JAXBElement }{@code <}{@link GroupRef }{@code >}}\r
+ * \r
+ */\r
+ @XmlElementDecl(namespace = "http://www.w3.org/2001/XMLSchema", name = "group", scope = Group.class)\r
+ public JAXBElement<GroupRef> createGroupGroup(GroupRef value) {\r
+ return new JAXBElement<GroupRef>(_Group_QNAME, GroupRef.class, Group.class, value);\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAnyAttribute;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * \r
+ * This type is extended by almost all schema types\r
+ * to allow attributes from other namespaces to be\r
+ * added to user schemas.\r
+ * \r
+ * \r
+ * <p>Java class for openAttrs complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="openAttrs">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "openAttrs")\r
+@XmlSeeAlso({\r
+ Redefine.class,\r
+ Schema.class,\r
+ Annotation.class,\r
+ Annotated.class\r
+})\r
+public class OpenAttrs {\r
+\r
+ @XmlAnyAttribute\r
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();\r
+\r
+ /**\r
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.\r
+ * \r
+ * <p>\r
+ * the map is keyed by the name of the attribute and \r
+ * the value is the string value of the attribute.\r
+ * \r
+ * the map returned by this method is live, and you can add new attribute\r
+ * by updating the map directly. Because of this design, there's no setter.\r
+ * \r
+ * \r
+ * @return\r
+ * always non-null\r
+ */\r
+ public Map<QName, String> getOtherAttributes() {\r
+ return otherAttributes;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}noFixedFacet">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "pattern")\r
+public class Pattern\r
+ extends NoFixedFacet\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for realGroup complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="realGroup">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}group">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice minOccurs="0">\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}all"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}choice"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}sequence"/>\r
+ * </choice>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "realGroup")\r
+@XmlSeeAlso({\r
+ NamedGroup.class,\r
+ GroupRef.class\r
+})\r
+public class RealGroup\r
+ extends Group\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlID;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}openAttrs">\r
+ * <choice maxOccurs="unbounded" minOccurs="0">\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}redefinable"/>\r
+ * </choice>\r
+ * <attribute name="schemaLocation" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "annotationOrSimpleTypeOrComplexType"\r
+})\r
+@XmlRootElement(name = "redefine")\r
+public class Redefine\r
+ extends OpenAttrs\r
+{\r
+\r
+ @XmlElements({\r
+ @XmlElement(name = "annotation", type = Annotation.class),\r
+ @XmlElement(name = "simpleType", type = TopLevelSimpleType.class),\r
+ @XmlElement(name = "complexType", type = TopLevelComplexType.class),\r
+ @XmlElement(name = "group", type = NamedGroup.class),\r
+ @XmlElement(name = "attributeGroup", type = NamedAttributeGroup.class)\r
+ })\r
+ protected List<OpenAttrs> annotationOrSimpleTypeOrComplexType;\r
+ @XmlAttribute(name = "schemaLocation", required = true)\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String schemaLocation;\r
+ @XmlAttribute(name = "id")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlID\r
+ @XmlSchemaType(name = "ID")\r
+ protected String id;\r
+\r
+ /**\r
+ * Gets the value of the annotationOrSimpleTypeOrComplexType property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the annotationOrSimpleTypeOrComplexType property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAnnotationOrSimpleTypeOrComplexType().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Annotation }\r
+ * {@link TopLevelSimpleType }\r
+ * {@link TopLevelComplexType }\r
+ * {@link NamedGroup }\r
+ * {@link NamedAttributeGroup }\r
+ * \r
+ * \r
+ */\r
+ public List<OpenAttrs> getAnnotationOrSimpleTypeOrComplexType() {\r
+ if (annotationOrSimpleTypeOrComplexType == null) {\r
+ annotationOrSimpleTypeOrComplexType = new ArrayList<OpenAttrs>();\r
+ }\r
+ return this.annotationOrSimpleTypeOrComplexType;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the schemaLocation property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getSchemaLocation() {\r
+ return schemaLocation;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the schemaLocation property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setSchemaLocation(String value) {\r
+ this.schemaLocation = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the id property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getId() {\r
+ return id;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the id property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setId(String value) {\r
+ this.id = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlEnum;\r
+import javax.xml.bind.annotation.XmlEnumValue;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for reducedDerivationControl.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * <p>\r
+ * <pre>\r
+ * <simpleType name="reducedDerivationControl">\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}derivationControl">\r
+ * <enumeration value="extension"/>\r
+ * <enumeration value="restriction"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </pre>\r
+ * \r
+ */\r
+@XmlType(name = "reducedDerivationControl")\r
+@XmlEnum(DerivationControl.class)\r
+public enum ReducedDerivationControl {\r
+\r
+ @XmlEnumValue("extension")\r
+ EXTENSION(DerivationControl.EXTENSION),\r
+ @XmlEnumValue("restriction")\r
+ RESTRICTION(DerivationControl.RESTRICTION);\r
+ private final DerivationControl value;\r
+\r
+ ReducedDerivationControl(DerivationControl v) {\r
+ value = v;\r
+ }\r
+\r
+ public DerivationControl value() {\r
+ return value;\r
+ }\r
+\r
+ public static ReducedDerivationControl fromValue(DerivationControl v) {\r
+ for (ReducedDerivationControl c: ReducedDerivationControl.values()) {\r
+ if (c.value.equals(v)) {\r
+ return c;\r
+ }\r
+ }\r
+ throw new IllegalArgumentException(v.toString());\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElementRef;\r
+import javax.xml.bind.annotation.XmlElementRefs;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * \r
+ * base attribute and simpleType child are mutually\r
+ * exclusive, but one or other is required\r
+ * \r
+ * \r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}simpleRestrictionModel"/>\r
+ * <attribute name="base" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "simpleType",\r
+ "facets"\r
+})\r
+@XmlRootElement(name = "restriction")\r
+public class Restriction\r
+ extends Annotated\r
+{\r
+\r
+ protected LocalSimpleType simpleType;\r
+ @XmlElementRefs({\r
+ @XmlElementRef(name = "enumeration", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "fractionDigits", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "totalDigits", namespace = "http://www.w3.org/2001/XMLSchema", type = TotalDigits.class, required = false),\r
+ @XmlElementRef(name = "minInclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "pattern", namespace = "http://www.w3.org/2001/XMLSchema", type = Pattern.class, required = false),\r
+ @XmlElementRef(name = "whiteSpace", namespace = "http://www.w3.org/2001/XMLSchema", type = WhiteSpace.class, required = false),\r
+ @XmlElementRef(name = "minLength", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "maxLength", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "maxInclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "length", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "maxExclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "minExclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false)\r
+ })\r
+ protected List<Object> facets;\r
+ @XmlAttribute(name = "base")\r
+ protected QName base;\r
+\r
+ /**\r
+ * Gets the value of the simpleType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public LocalSimpleType getSimpleType() {\r
+ return simpleType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the simpleType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public void setSimpleType(LocalSimpleType value) {\r
+ this.simpleType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the facets property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the facets property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getFacets().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link NoFixedFacet }{@code >}\r
+ * {@link TotalDigits }\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link WhiteSpace }\r
+ * {@link Pattern }\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getFacets() {\r
+ if (facets == null) {\r
+ facets = new ArrayList<Object>();\r
+ }\r
+ return this.facets;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the base property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getBase() {\r
+ return base;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the base property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setBase(QName value) {\r
+ this.base = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.JAXBElement;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElementRef;\r
+import javax.xml.bind.annotation.XmlElementRefs;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * <p>Java class for restrictionType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="restrictionType">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <choice minOccurs="0">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}typeDefParticle"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}simpleRestrictionModel"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * </sequence>\r
+ * <attribute name="base" use="required" type="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "restrictionType", propOrder = {\r
+ "group",\r
+ "all",\r
+ "choice",\r
+ "sequence",\r
+ "simpleType",\r
+ "facets",\r
+ "attributeOrAttributeGroup",\r
+ "anyAttribute"\r
+})\r
+@XmlSeeAlso({\r
+ ComplexRestrictionType.class,\r
+ SimpleRestrictionType.class\r
+})\r
+public class RestrictionType\r
+ extends Annotated\r
+{\r
+\r
+ protected GroupRef group;\r
+ protected All all;\r
+ protected ExplicitGroup choice;\r
+ protected ExplicitGroup sequence;\r
+ protected LocalSimpleType simpleType;\r
+ @XmlElementRefs({\r
+ @XmlElementRef(name = "enumeration", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "fractionDigits", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "totalDigits", namespace = "http://www.w3.org/2001/XMLSchema", type = TotalDigits.class, required = false),\r
+ @XmlElementRef(name = "minInclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "pattern", namespace = "http://www.w3.org/2001/XMLSchema", type = Pattern.class, required = false),\r
+ @XmlElementRef(name = "whiteSpace", namespace = "http://www.w3.org/2001/XMLSchema", type = WhiteSpace.class, required = false),\r
+ @XmlElementRef(name = "minLength", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "maxLength", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "maxInclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "length", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "maxExclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false),\r
+ @XmlElementRef(name = "minExclusive", namespace = "http://www.w3.org/2001/XMLSchema", type = JAXBElement.class, required = false)\r
+ })\r
+ protected List<Object> facets;\r
+ @XmlElements({\r
+ @XmlElement(name = "attribute", type = Attribute.class),\r
+ @XmlElement(name = "attributeGroup", type = AttributeGroupRef.class)\r
+ })\r
+ protected List<Annotated> attributeOrAttributeGroup;\r
+ protected Wildcard anyAttribute;\r
+ @XmlAttribute(name = "base", required = true)\r
+ protected QName base;\r
+\r
+ /**\r
+ * Gets the value of the group property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link GroupRef }\r
+ * \r
+ */\r
+ public GroupRef getGroup() {\r
+ return group;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the group property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link GroupRef }\r
+ * \r
+ */\r
+ public void setGroup(GroupRef value) {\r
+ this.group = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the all property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link All }\r
+ * \r
+ */\r
+ public All getAll() {\r
+ return all;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the all property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link All }\r
+ * \r
+ */\r
+ public void setAll(All value) {\r
+ this.all = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the choice property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup getChoice() {\r
+ return choice;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the choice property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public void setChoice(ExplicitGroup value) {\r
+ this.choice = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the sequence property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public ExplicitGroup getSequence() {\r
+ return sequence;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the sequence property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link ExplicitGroup }\r
+ * \r
+ */\r
+ public void setSequence(ExplicitGroup value) {\r
+ this.sequence = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the simpleType property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public LocalSimpleType getSimpleType() {\r
+ return simpleType;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the simpleType property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link LocalSimpleType }\r
+ * \r
+ */\r
+ public void setSimpleType(LocalSimpleType value) {\r
+ this.simpleType = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the facets property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the facets property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getFacets().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link NoFixedFacet }{@code >}\r
+ * {@link TotalDigits }\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link WhiteSpace }\r
+ * {@link Pattern }\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link NumFacet }{@code >}\r
+ * {@link JAXBElement }{@code <}{@link Facet }{@code >}\r
+ * \r
+ * \r
+ */\r
+ public List<Object> getFacets() {\r
+ if (facets == null) {\r
+ facets = new ArrayList<Object>();\r
+ }\r
+ return this.facets;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the attributeOrAttributeGroup property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getAttributeOrAttributeGroup().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Attribute }\r
+ * {@link AttributeGroupRef }\r
+ * \r
+ * \r
+ */\r
+ public List<Annotated> getAttributeOrAttributeGroup() {\r
+ if (attributeOrAttributeGroup == null) {\r
+ attributeOrAttributeGroup = new ArrayList<Annotated>();\r
+ }\r
+ return this.attributeOrAttributeGroup;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the anyAttribute property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public Wildcard getAnyAttribute() {\r
+ return anyAttribute;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the anyAttribute property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Wildcard }\r
+ * \r
+ */\r
+ public void setAnyAttribute(Wildcard value) {\r
+ this.anyAttribute = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the base property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public QName getBase() {\r
+ return base;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the base property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link QName }\r
+ * \r
+ */\r
+ public void setBase(QName value) {\r
+ this.base = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlElements;\r
+import javax.xml.bind.annotation.XmlID;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}openAttrs">\r
+ * <sequence>\r
+ * <choice maxOccurs="unbounded" minOccurs="0">\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}include"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}import"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}redefine"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation"/>\r
+ * </choice>\r
+ * <sequence maxOccurs="unbounded" minOccurs="0">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}schemaTop"/>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * </sequence>\r
+ * <attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}anyURI" />\r
+ * <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}token" />\r
+ * <attribute name="finalDefault" type="{http://www.w3.org/2001/XMLSchema}fullDerivationSet" default="" />\r
+ * <attribute name="blockDefault" type="{http://www.w3.org/2001/XMLSchema}blockSet" default="" />\r
+ * <attribute name="attributeFormDefault" type="{http://www.w3.org/2001/XMLSchema}formChoice" default="unqualified" />\r
+ * <attribute name="elementFormDefault" type="{http://www.w3.org/2001/XMLSchema}formChoice" default="unqualified" />\r
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />\r
+ * <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "includeOrImportOrRedefine",\r
+ "simpleTypeOrComplexTypeOrGroup"\r
+})\r
+@XmlRootElement(name = "schema")\r
+public class Schema\r
+ extends OpenAttrs\r
+{\r
+\r
+ @XmlElements({\r
+ @XmlElement(name = "include", type = Include.class),\r
+ @XmlElement(name = "import", type = Import.class),\r
+ @XmlElement(name = "redefine", type = Redefine.class),\r
+ @XmlElement(name = "annotation", type = Annotation.class)\r
+ })\r
+ protected List<OpenAttrs> includeOrImportOrRedefine;\r
+ @XmlElements({\r
+ @XmlElement(name = "simpleType", type = TopLevelSimpleType.class),\r
+ @XmlElement(name = "complexType", type = TopLevelComplexType.class),\r
+ @XmlElement(name = "group", type = NamedGroup.class),\r
+ @XmlElement(name = "attributeGroup", type = NamedAttributeGroup.class),\r
+ @XmlElement(name = "element", type = TopLevelElement.class),\r
+ @XmlElement(name = "attribute", type = TopLevelAttribute.class),\r
+ @XmlElement(name = "notation", type = Notation.class),\r
+ @XmlElement(name = "annotation", type = Annotation.class)\r
+ })\r
+ protected List<OpenAttrs> simpleTypeOrComplexTypeOrGroup;\r
+ @XmlAttribute(name = "targetNamespace")\r
+ @XmlSchemaType(name = "anyURI")\r
+ protected String targetNamespace;\r
+ @XmlAttribute(name = "version")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "token")\r
+ protected String version;\r
+ @XmlAttribute(name = "finalDefault")\r
+ @XmlSchemaType(name = "fullDerivationSet")\r
+ protected List<String> finalDefault;\r
+ @XmlAttribute(name = "blockDefault")\r
+ @XmlSchemaType(name = "blockSet")\r
+ protected List<String> blockDefault;\r
+ @XmlAttribute(name = "attributeFormDefault")\r
+ protected FormChoice attributeFormDefault;\r
+ @XmlAttribute(name = "elementFormDefault")\r
+ protected FormChoice elementFormDefault;\r
+ @XmlAttribute(name = "id")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlID\r
+ @XmlSchemaType(name = "ID")\r
+ protected String id;\r
+ @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace")\r
+ protected String lang;\r
+\r
+ /**\r
+ * Gets the value of the includeOrImportOrRedefine property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the includeOrImportOrRedefine property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getIncludeOrImportOrRedefine().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link Include }\r
+ * {@link Import }\r
+ * {@link Redefine }\r
+ * {@link Annotation }\r
+ * \r
+ * \r
+ */\r
+ public List<OpenAttrs> getIncludeOrImportOrRedefine() {\r
+ if (includeOrImportOrRedefine == null) {\r
+ includeOrImportOrRedefine = new ArrayList<OpenAttrs>();\r
+ }\r
+ return this.includeOrImportOrRedefine;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the simpleTypeOrComplexTypeOrGroup property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the simpleTypeOrComplexTypeOrGroup property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getSimpleTypeOrComplexTypeOrGroup().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link TopLevelSimpleType }\r
+ * {@link TopLevelComplexType }\r
+ * {@link NamedGroup }\r
+ * {@link NamedAttributeGroup }\r
+ * {@link TopLevelElement }\r
+ * {@link TopLevelAttribute }\r
+ * {@link Notation }\r
+ * {@link Annotation }\r
+ * \r
+ * \r
+ */\r
+ public List<OpenAttrs> getSimpleTypeOrComplexTypeOrGroup() {\r
+ if (simpleTypeOrComplexTypeOrGroup == null) {\r
+ simpleTypeOrComplexTypeOrGroup = new ArrayList<OpenAttrs>();\r
+ }\r
+ return this.simpleTypeOrComplexTypeOrGroup;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the targetNamespace property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getTargetNamespace() {\r
+ return targetNamespace;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the targetNamespace property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setTargetNamespace(String value) {\r
+ this.targetNamespace = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the version property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getVersion() {\r
+ return version;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the version property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setVersion(String value) {\r
+ this.version = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the finalDefault property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the finalDefault property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getFinalDefault().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getFinalDefault() {\r
+ if (finalDefault == null) {\r
+ finalDefault = new ArrayList<String>();\r
+ }\r
+ return this.finalDefault;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the blockDefault property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the blockDefault property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getBlockDefault().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getBlockDefault() {\r
+ if (blockDefault == null) {\r
+ blockDefault = new ArrayList<String>();\r
+ }\r
+ return this.blockDefault;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the attributeFormDefault property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public FormChoice getAttributeFormDefault() {\r
+ if (attributeFormDefault == null) {\r
+ return FormChoice.UNQUALIFIED;\r
+ } else {\r
+ return attributeFormDefault;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the attributeFormDefault property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public void setAttributeFormDefault(FormChoice value) {\r
+ this.attributeFormDefault = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the elementFormDefault property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public FormChoice getElementFormDefault() {\r
+ if (elementFormDefault == null) {\r
+ return FormChoice.UNQUALIFIED;\r
+ } else {\r
+ return elementFormDefault;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the elementFormDefault property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link FormChoice }\r
+ * \r
+ */\r
+ public void setElementFormDefault(FormChoice value) {\r
+ this.elementFormDefault = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the id property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getId() {\r
+ return id;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the id property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setId(String value) {\r
+ this.id = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the lang property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getLang() {\r
+ return lang;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the lang property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setLang(String value) {\r
+ this.lang = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="xpath" use="required">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}token">\r
+ * <pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "selector")\r
+public class Selector\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "xpath", required = true)\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ protected String xpath;\r
+\r
+ /**\r
+ * Gets the value of the xpath property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getXpath() {\r
+ return xpath;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the xpath property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setXpath(String value) {\r
+ this.xpath = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <choice>\r
+ * <element name="restriction" type="{http://www.w3.org/2001/XMLSchema}simpleRestrictionType"/>\r
+ * <element name="extension" type="{http://www.w3.org/2001/XMLSchema}simpleExtensionType"/>\r
+ * </choice>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "restriction",\r
+ "extension"\r
+})\r
+@XmlRootElement(name = "simpleContent")\r
+public class SimpleContent\r
+ extends Annotated\r
+{\r
+\r
+ protected SimpleRestrictionType restriction;\r
+ protected SimpleExtensionType extension;\r
+\r
+ /**\r
+ * Gets the value of the restriction property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link SimpleRestrictionType }\r
+ * \r
+ */\r
+ public SimpleRestrictionType getRestriction() {\r
+ return restriction;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the restriction property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link SimpleRestrictionType }\r
+ * \r
+ */\r
+ public void setRestriction(SimpleRestrictionType value) {\r
+ this.restriction = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the extension property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link SimpleExtensionType }\r
+ * \r
+ */\r
+ public SimpleExtensionType getExtension() {\r
+ return extension;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the extension property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link SimpleExtensionType }\r
+ * \r
+ */\r
+ public void setExtension(SimpleExtensionType value) {\r
+ this.extension = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for simpleExplicitGroup complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="simpleExplicitGroup">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}explicitGroup">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}nestedParticle" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "simpleExplicitGroup")\r
+public class SimpleExplicitGroup\r
+ extends ExplicitGroup\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for simpleExtensionType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="simpleExtensionType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}extensionType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "simpleExtensionType")\r
+public class SimpleExtensionType\r
+ extends ExtensionType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for simpleRestrictionType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="simpleRestrictionType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}restrictionType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice minOccurs="0">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}simpleRestrictionModel"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}attrDecls"/>\r
+ * </sequence>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "simpleRestrictionType")\r
+public class SimpleRestrictionType\r
+ extends RestrictionType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for simpleType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="simpleType">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}simpleDerivation"/>\r
+ * <attribute name="final" type="{http://www.w3.org/2001/XMLSchema}simpleDerivationSet" />\r
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "simpleType", propOrder = {\r
+ "restriction",\r
+ "list",\r
+ "union"\r
+})\r
+@XmlSeeAlso({\r
+ TopLevelSimpleType.class,\r
+ LocalSimpleType.class\r
+})\r
+public abstract class SimpleType\r
+ extends Annotated\r
+{\r
+\r
+ protected Restriction restriction;\r
+ protected org.w3._2001.xmlschema.List list;\r
+ protected Union union;\r
+ @XmlAttribute(name = "final")\r
+ @XmlSchemaType(name = "simpleDerivationSet")\r
+ protected java.util.List<String> _final;\r
+ @XmlAttribute(name = "name")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ @XmlSchemaType(name = "NCName")\r
+ protected String name;\r
+\r
+ /**\r
+ * Gets the value of the restriction property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Restriction }\r
+ * \r
+ */\r
+ public Restriction getRestriction() {\r
+ return restriction;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the restriction property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Restriction }\r
+ * \r
+ */\r
+ public void setRestriction(Restriction value) {\r
+ this.restriction = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the list property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link org.w3._2001.xmlschema.List }\r
+ * \r
+ */\r
+ public org.w3._2001.xmlschema.List getList() {\r
+ return list;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the list property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link org.w3._2001.xmlschema.List }\r
+ * \r
+ */\r
+ public void setList(org.w3._2001.xmlschema.List value) {\r
+ this.list = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the union property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link Union }\r
+ * \r
+ */\r
+ public Union getUnion() {\r
+ return union;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the union property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link Union }\r
+ * \r
+ */\r
+ public void setUnion(Union value) {\r
+ this.union = value;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the final property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the final property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getFinal().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public java.util.List<String> getFinal() {\r
+ if (_final == null) {\r
+ _final = new ArrayList<String>();\r
+ }\r
+ return this._final;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the name property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the name property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setName(String value) {\r
+ this.name = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for topLevelAttribute complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="topLevelAttribute">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}attribute">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "topLevelAttribute")\r
+public class TopLevelAttribute\r
+ extends Attribute\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for topLevelComplexType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="topLevelComplexType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}complexType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}complexTypeModel"/>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "topLevelComplexType")\r
+public class TopLevelComplexType\r
+ extends ComplexType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for topLevelElement complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="topLevelElement">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}element">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <choice minOccurs="0">\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType"/>\r
+ * <element name="complexType" type="{http://www.w3.org/2001/XMLSchema}localComplexType"/>\r
+ * </choice>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}identityConstraint" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "topLevelElement")\r
+public class TopLevelElement\r
+ extends Element\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for topLevelSimpleType complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="topLevelSimpleType">\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}simpleType">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * <group ref="{http://www.w3.org/2001/XMLSchema}simpleDerivation"/>\r
+ * </sequence>\r
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "topLevelSimpleType")\r
+public class TopLevelSimpleType\r
+ extends SimpleType\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}numFacet">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "totalDigits")\r
+public class TotalDigits\r
+ extends NumFacet\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlEnum;\r
+import javax.xml.bind.annotation.XmlEnumValue;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for typeDerivationControl.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * <p>\r
+ * <pre>\r
+ * <simpleType name="typeDerivationControl">\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}derivationControl">\r
+ * <enumeration value="extension"/>\r
+ * <enumeration value="restriction"/>\r
+ * <enumeration value="list"/>\r
+ * <enumeration value="union"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </pre>\r
+ * \r
+ */\r
+@XmlType(name = "typeDerivationControl")\r
+@XmlEnum(DerivationControl.class)\r
+public enum TypeDerivationControl {\r
+\r
+ @XmlEnumValue("extension")\r
+ EXTENSION(DerivationControl.EXTENSION),\r
+ @XmlEnumValue("restriction")\r
+ RESTRICTION(DerivationControl.RESTRICTION),\r
+ @XmlEnumValue("list")\r
+ LIST(DerivationControl.LIST),\r
+ @XmlEnumValue("union")\r
+ UNION(DerivationControl.UNION);\r
+ private final DerivationControl value;\r
+\r
+ TypeDerivationControl(DerivationControl v) {\r
+ value = v;\r
+ }\r
+\r
+ public DerivationControl value() {\r
+ return value;\r
+ }\r
+\r
+ public static TypeDerivationControl fromValue(DerivationControl v) {\r
+ for (TypeDerivationControl c: TypeDerivationControl.values()) {\r
+ if (c.value.equals(v)) {\r
+ return c;\r
+ }\r
+ }\r
+ throw new IllegalArgumentException(v.toString());\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.namespace.QName;\r
+\r
+\r
+/**\r
+ * \r
+ * memberTypes attribute must be non-empty or there must be\r
+ * at least one simpleType child\r
+ * \r
+ * \r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <sequence>\r
+ * <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType" maxOccurs="unbounded" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="memberTypes">\r
+ * <simpleType>\r
+ * <list itemType="{http://www.w3.org/2001/XMLSchema}QName" />\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "", propOrder = {\r
+ "simpleType"\r
+})\r
+@XmlRootElement(name = "union")\r
+public class Union\r
+ extends Annotated\r
+{\r
+\r
+ protected List<LocalSimpleType> simpleType;\r
+ @XmlAttribute(name = "memberTypes")\r
+ protected List<QName> memberTypes;\r
+\r
+ /**\r
+ * Gets the value of the simpleType property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the simpleType property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getSimpleType().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link LocalSimpleType }\r
+ * \r
+ * \r
+ */\r
+ public List<LocalSimpleType> getSimpleType() {\r
+ if (simpleType == null) {\r
+ simpleType = new ArrayList<LocalSimpleType>();\r
+ }\r
+ return this.simpleType;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the memberTypes property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the memberTypes property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getMemberTypes().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link QName }\r
+ * \r
+ * \r
+ */\r
+ public List<QName> getMemberTypes() {\r
+ if (memberTypes == null) {\r
+ memberTypes = new ArrayList<QName>();\r
+ }\r
+ return this.memberTypes;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+import javax.xml.bind.annotation.XmlType;\r
+\r
+\r
+/**\r
+ * <p>Java class for anonymous complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType>\r
+ * <complexContent>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}facet">\r
+ * <sequence>\r
+ * <element ref="{http://www.w3.org/2001/XMLSchema}annotation" minOccurs="0"/>\r
+ * </sequence>\r
+ * <attribute name="value" use="required">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">\r
+ * <enumeration value="preserve"/>\r
+ * <enumeration value="replace"/>\r
+ * <enumeration value="collapse"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </restriction>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "")\r
+@XmlRootElement(name = "whiteSpace")\r
+public class WhiteSpace\r
+ extends Facet\r
+{\r
+\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+\r
+package org.w3._2001.xmlschema;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlAttribute;\r
+import javax.xml.bind.annotation.XmlSchemaType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
+import javax.xml.bind.annotation.XmlType;\r
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;\r
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
+\r
+\r
+/**\r
+ * <p>Java class for wildcard complex type.\r
+ * \r
+ * <p>The following schema fragment specifies the expected content contained within this class.\r
+ * \r
+ * <pre>\r
+ * <complexType name="wildcard">\r
+ * <complexContent>\r
+ * <extension base="{http://www.w3.org/2001/XMLSchema}annotated">\r
+ * <attribute name="namespace" type="{http://www.w3.org/2001/XMLSchema}namespaceList" default="##any" />\r
+ * <attribute name="processContents" default="strict">\r
+ * <simpleType>\r
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">\r
+ * <enumeration value="skip"/>\r
+ * <enumeration value="lax"/>\r
+ * <enumeration value="strict"/>\r
+ * </restriction>\r
+ * </simpleType>\r
+ * </attribute>\r
+ * <anyAttribute processContents='lax' namespace='##other'/>\r
+ * </extension>\r
+ * </complexContent>\r
+ * </complexType>\r
+ * </pre>\r
+ * \r
+ * \r
+ */\r
+@XmlAccessorType(XmlAccessType.FIELD)\r
+@XmlType(name = "wildcard")\r
+@XmlSeeAlso({\r
+ Any.class\r
+})\r
+public class Wildcard\r
+ extends Annotated\r
+{\r
+\r
+ @XmlAttribute(name = "namespace")\r
+ @XmlSchemaType(name = "namespaceList")\r
+ protected List<String> namespace;\r
+ @XmlAttribute(name = "processContents")\r
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
+ protected String processContents;\r
+\r
+ /**\r
+ * Gets the value of the namespace property.\r
+ * \r
+ * <p>\r
+ * This accessor method returns a reference to the live list,\r
+ * not a snapshot. Therefore any modification you make to the\r
+ * returned list will be present inside the JAXB object.\r
+ * This is why there is not a <CODE>set</CODE> method for the namespace property.\r
+ * \r
+ * <p>\r
+ * For example, to add a new item, do as follows:\r
+ * <pre>\r
+ * getNamespace().add(newItem);\r
+ * </pre>\r
+ * \r
+ * \r
+ * <p>\r
+ * Objects of the following type(s) are allowed in the list\r
+ * {@link String }\r
+ * \r
+ * \r
+ */\r
+ public List<String> getNamespace() {\r
+ if (namespace == null) {\r
+ namespace = new ArrayList<String>();\r
+ }\r
+ return this.namespace;\r
+ }\r
+\r
+ /**\r
+ * Gets the value of the processContents property.\r
+ * \r
+ * @return\r
+ * possible object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public String getProcessContents() {\r
+ if (processContents == null) {\r
+ return "strict";\r
+ } else {\r
+ return processContents;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of the processContents property.\r
+ * \r
+ * @param value\r
+ * allowed object is\r
+ * {@link String }\r
+ * \r
+ */\r
+ public void setProcessContents(String value) {\r
+ this.processContents = value;\r
+ }\r
+\r
+}\r
--- /dev/null
+//\r
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 \r
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
+// Any modifications to this file will be lost upon recompilation of the source schema. \r
+// Generated on: 2015.06.17 at 02:58:58 PM EEST \r
+//\r
+\r
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2001/XMLSchema", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)\r
+package org.w3._2001.xmlschema;\r