Method Summary |
|
public void | addAppInfo(String name, String value) Create AppInfo and add it to the current thing in the stack. |
public void | addAppInfoToTopAnnotation(String name, String value) |
public void | addElement(String name, String type) Create an Element an add it to the current one in the stack. |
protected void | addRestriction(ContainsSubElements cse, String restrictionBase, RestrictionType rt) |
public void | addSubElement(String elementName, ElementExpr subElement) |
public void | addSubElement(String elementName, List subElements) |
public void | addSubElement(String elementName, String subElementName) |
public void | addSubElementCurrent(String subElementName) This addSubElement creates an Element and then adds it underneath
the current one. |
public void | addToNamespace(String ns, String URI) |
public void | addToTopAnnotation(ElementExpr subElement) |
public static String | canonicalQName(String namespaceURI, String localPart) |
public Element | createElement(String name) Return an Element that represents an ELEMENT. |
public Element | createElement(String name, String type) Return an Element that represents an ELEMENT. |
public InputStream | dtdInputStream() nice method which returns writeDTD in an InputStream. |
public List | findAllSubElements(String name) |
public Set | getAllNamespaces() |
public Attribute | getAttribute(String name) |
protected String | getCurrentParsedURI() |
public Element | getDefinedElement(String typeName) |
public Set | getDefinedElementNames() |
public Element | getDefinedElementResolvedNamespace(String typeName) |
public ElementExpr | getLastPopped() |
public String | getNamespace(String URI) Return a namespace name for a given namespace URI. |
public String | getNamespaceURI(String ns) Return the namespace URI for a given namespace prefix. |
public ContainsSubElements | getRootElement() |
protected ElementExpr | getSampleNode(String name) |
public ElementExpr | getSchemaTypeDef(String origTypeName) Get an ElementExpr node for a named type. |
public ElementExpr | getSchemaTypeDefResolvedNamespace(String typeName) Same thing as getSchemaTypeDef, but for already resolved type names. |
public Set | getSchemaTypeNames() |
public String | getTargetNamespace() |
public String | getXMLNamespace() |
public static String | getXPathExpr(Node node) |
public static String | getXPathExpr(Node node, boolean addDescription) |
public String | getXSDNamespace() |
public static String | guessPrefix(String namespaceURI) Guess what a prefix of this namespaceURI might be. |
public String | guessPrefixFromURI(String uri) Try to figure out what prefix to use for the namespaceURI
using the namespace context mapping, and if that fails then it
calls guessPrefix. |
public boolean | isDefinedType(String type) |
public boolean | isPredefinedType(String type) |
public String | javaType2XMLSchemaTypeComplex(String type) |
public void | mapSimpleJavaTypesOptional(Map optionalElementMap) Map simple types to our schema. |
public void | mapSimpleJavaTypesPredefined(Map definedElementMap) Map simple types to our schema. |
protected String | normalizeDocumentNamespace(String type) |
protected String | normalizeNamespace(String namespaceURI, String localPart) |
protected String | normalizeTargetNamespace(String type) Will add a namespace prefix to a type if the targetNamespace != null. |
public ElementExpr | optimize() This is called before writing out a schema. |
public ElementExpr | peekCurrent() |
public ContainsSubElements | peekCurrentNeedSub() Same thing as peekCurrent, but the caller needs it to be a
ContainsSubElements. |
public ElementExpr | popCurrent() |
public static String | prefixOf(String typeName) |
public static void | printExtraJavaTypes(Writer out, int level) Define some helpful java to XML Schema data types that allow us
to go back and forth between the two (allows me to setup a 1-to-1
mapping with the client proxy generator). |
public void | pushComplexType() |
public void | pushCurrent(ElementExpr el) |
public void | pushElement(String elementName, String elementType) Create the element, then push it onto the stack, making it the
current one. |
public void | pushSchemaNode() |
public void | pushSequence() |
protected void | putSampleNode(ElementExpr ee) |
public void | putSchemaTypeDef(String typeName, ElementExpr ee) |
protected void | read(Node node) |
public void | readDocument(Document doc) |
public void | readSchemaElement(org.w3c.dom.Element el) |
public void | readSchemaFromLocation(String schemaLocation) |
public static String | removePrefix(String typeName) |
public String | resolveNamespace(String typeName) Will convert a typeName into {namespace}typeName format. |
public String | resolveNamespace(String ns, String type) |
protected String | resolveNamespaceDefault(String typeName, String defaultNS) |
protected String | resolveNamespaceDefault(String prefix, String defaultNS, String type) |
public String | schemaTypeToJavaType(String xmlSchemaType) |
public void | setCurrentParsedURI(String uri) |
public void | setMaxOccurs(String t) Only works if the current thing in the stack is an Element or ModelGroup. |
public void | setMinOccurs(String t) Only works if the current thing in the stack is an Element or ModelGroup. |
public void | setRootElement(ContainsSubElements el) |
public void | setSchemaTypeMapping(String schemaTypeNamespace, String schemaTypeName, String javaType) |
public void | setSchemaTypesForME(boolean isFloatingPoint) Setup the schema to java type mapping to make more sense for J2ME. |
public void | setTargetNamespace(String ns) |
public void | setType(String t) Only works if the current thing in the stack is an Element. |
public void | setXMLSchemaType(String t) Only works if the current thing in the stack is an Element. |
public void | writeDTD(Writer out) If you want a DTD written to a Writer, this is the method
to call. |
public void | writeXMLSchema(XMLWriter out) |
public void | writeXMLSchemaStandalone(Writer out) If you want an XML Schema written to a Writer, this is the method
to call. |
public InputStream | xmlSchemaInputStream() Convience method which returns writeXMLSchemaStandalone in an
InputStream. |