public class XsdDocument extends Object implements MessageSource
Modifier and Type | Field and Description |
---|---|
protected Document |
document |
protected String |
documentationNoValue |
protected String |
documentationTemplate |
protected Vector<String> |
imports |
protected Vector<String> |
includes |
protected Model |
model |
protected String |
name |
protected String |
okstra |
protected String |
okstraKeyValueBaseType |
protected String |
okstraKeyValuePropertyType |
protected String |
okstraObjectRefType |
protected String |
okstraPrefix |
protected Options |
options |
protected String |
outputDirectory |
protected boolean |
printed |
ShapeChangeResult |
result |
protected Element |
root |
protected Element |
rootAnnotation |
protected String |
targetNamespace |
Constructor and Description |
---|
XsdDocument(PackageInfo pi,
Model m,
Options o,
ShapeChangeResult r,
String n) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttribute(Element e,
String name,
String value)
Add attribute to an element
|
protected Comment |
addCreationComment(Element e)
Add a comment
|
void |
addImport(String nsabr,
String ns) |
void |
addInclude(XsdDocument xsd) |
protected Element |
addProperty(ClassInfo cibase,
PropertyInfo pi,
Multiplicity m,
SchematronSchema schDoc)
Process a single property.
|
protected Element |
addStandardAnnotation(Element e,
Info info)
Add documentation and tagged values to an element
|
protected String |
mapBaseType(ClassInfo ci)
Map a base type of a class to a predefined representation in GML, ISO/TS
19139, etc.
|
protected String |
mapElement(ClassInfo ci)
Map an element to a predefined representation in GML, ISO/TS 19139, etc.
|
protected boolean |
mapPropertyType(ClassInfo cibase,
PropertyInfo propi,
Element e,
boolean inAssocClass,
SchematronSchema schDoc)
Set the type for a property element.
|
String |
message(int mnr)
This method returns messages belonging to the XML Schema target by their
message number.
|
protected String |
messageText(int mnr)
This is the message text provision proper.
|
Element |
pComplexType(ClassInfo ci,
ClassInfo cibase,
SchematronSchema schDoc)
|
void |
pGlobalBasicType(ClassInfo ci) |
void |
pGlobalCodeList(ClassInfo ci)
Create code list encoding according to standard GML 3.2 encoding rule
(union between enumeration and other-pattern)
|
void |
pGlobalEnumeration(ClassInfo ci) |
Element |
pGroup(ClassInfo ci,
ClassInfo cibase)
|
void |
pObjectElement(ClassInfo ci,
ClassInfo cibase)
Create global element for an object / data type instance
|
void |
pOKSTRAKEYPropertyType(ClassInfo ci) |
void |
pPropertyTypes(ClassInfo ci) |
void |
pPropertyTypeWithGroup(ClassInfo ci) |
void |
pPropertyTypeWithSubtypes(ClassInfo ci) |
boolean |
printed() |
void |
printFile(Properties outputFormat)
Dump XML Schema file
|
boolean |
processLocalProperties(ClassInfo ci,
Element sequenceOrChoice,
SchematronSchema schDoc)
Process all properties that are added in this class.
|
boolean |
processLocalProperty(ClassInfo ci,
PropertyInfo pi,
Element sequenceOrChoice,
Multiplicity m,
SchematronSchema schDoc)
Process a class property.
|
void |
pValueTypeGroup(ClassInfo ci) |
protected Document document
protected Element root
protected Element rootAnnotation
protected Options options
public ShapeChangeResult result
protected Model model
protected String name
protected boolean printed
protected String targetNamespace
protected String outputDirectory
protected String documentationTemplate
protected String documentationNoValue
protected String okstraKeyValuePropertyType
protected String okstraKeyValueBaseType
protected String okstraObjectRefType
protected String okstraPrefix
protected String okstra
public XsdDocument(PackageInfo pi, Model m, Options o, ShapeChangeResult r, String n) throws ShapeChangeAbortException, ParserConfigurationException
protected void addAttribute(Element e, String name, String value)
protected Element addStandardAnnotation(Element e, Info info)
null
protected String mapBaseType(ClassInfo ci)
protected String mapElement(ClassInfo ci)
public void pObjectElement(ClassInfo ci, ClassInfo cibase)
public Element pComplexType(ClassInfo ci, ClassInfo cibase, SchematronSchema schDoc)
public void pValueTypeGroup(ClassInfo ci)
public void pPropertyTypeWithSubtypes(ClassInfo ci)
public void pPropertyTypes(ClassInfo ci)
public void pPropertyTypeWithGroup(ClassInfo ci)
public void pOKSTRAKEYPropertyType(ClassInfo ci)
public void pGlobalBasicType(ClassInfo ci)
ci
- public void pGlobalEnumeration(ClassInfo ci)
public void pGlobalCodeList(ClassInfo ci)
ci
- the code list classpublic boolean processLocalProperty(ClassInfo ci, PropertyInfo pi, Element sequenceOrChoice, Multiplicity m, SchematronSchema schDoc)
public boolean processLocalProperties(ClassInfo ci, Element sequenceOrChoice, SchematronSchema schDoc)
protected Element addProperty(ClassInfo cibase, PropertyInfo pi, Multiplicity m, SchematronSchema schDoc)
cibase
- a classpi
- property of cibasem
- multiplicity of the property, can be null
schDoc
- protected boolean mapPropertyType(ClassInfo cibase, PropertyInfo propi, Element e, boolean inAssocClass, SchematronSchema schDoc)
cibase
- class that owns the propertypropi
- the propertye
- property elementinAssocClass
- flag is set, if the class is an association classschDoc
- Schematron schema, optionalpublic void addInclude(XsdDocument xsd)
public void printFile(Properties outputFormat) throws Exception
Exception
public boolean printed()
public String message(int mnr)
This method returns messages belonging to the XML Schema target by their message number. The organization corresponds to the logic in module ShapeChangeResult. All functions in that class, which require an message number can be redirected to the function at hand.
message
in interface MessageSource
mnr
- Message numberprotected String messageText(int mnr)
mnr
- Message numberCopyright © 2017. All rights reserved.