com.infoengine.schema
Class XMLUtils
java.lang.Object
com.infoengine.schema.XMLUtils
- public class XMLUtils
- extends Object
Method Summary |
private static boolean |
constraintElementName(String n)
|
static SchemaObject |
document2schema(Document doc)
|
static SchemaObject |
document2schema(InputStream is)
|
static SchemaObject |
document2schema(String schemaXml)
|
private static boolean |
exclusiveConstraintElementName(String n)
|
private static void |
generateAttribute(Attribute a,
Element elem)
|
private static void |
generateComplexType(String name,
ComplexType ct,
Element elem)
|
private static void |
generateSimpleType(String name,
SimpleType st,
Element elem)
|
private static boolean |
inclusiveConstraintElementName(String n)
|
private static boolean |
isEmpty(String s)
|
static void |
localize(SchemaObject schema)
|
private static void |
localize(SchemaObject schema,
String resourceBundle,
Hashtable bundles)
|
private static void |
localizeComplexType(ComplexType complex,
String resourceBundle,
Hashtable bundles)
|
private static void |
localizeDisplayContainer(DisplayContainer container,
String resourceBundle,
Hashtable bundles)
|
private static void |
localizeSimpleType(SimpleType simple,
String resourceBundle,
Hashtable bundles)
|
private static Attribute |
processAttribute(Element element,
String resourceBundle)
|
private static ComplexType |
processComplexType(Element type,
String resourceBundle)
|
private static Range[] |
processConstraints(Vector restrictions)
|
private static void |
processDisplays(DisplayContainer container,
Element element,
String resourceBundle)
|
private static EnumeratedValue[] |
processEnumeration(Element restriction,
String resourceBundle)
|
private static SimpleType |
processSimpleType(Element type,
String resourceBundle)
|
static Document |
schema2document(SchemaObject schema)
|
static void |
schema2stream(SchemaObject schema,
OutputStream os)
|
static String |
schema2string(SchemaObject schema)
|
static SchemaObject |
schemaElement2schema(Element schema)
|
private static String |
stripNS(String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCHEMA_NS
private static final String SCHEMA_NS
- See Also:
- Constant Field Values
SCHEMA_NSID
private static final String SCHEMA_NSID
- See Also:
- Constant Field Values
IENGINE_NS
private static final String IENGINE_NS
- See Also:
- Constant Field Values
IENGINE_NSID
private static final String IENGINE_NSID
- See Also:
- Constant Field Values
COMPLEX
private static final String COMPLEX
- See Also:
- Constant Field Values
SIMPLE
private static final String SIMPLE
- See Also:
- Constant Field Values
ATTR_RESOURCE
private static final String ATTR_RESOURCE
- See Also:
- Constant Field Values
ATTR_DISPLAY
private static final String ATTR_DISPLAY
- See Also:
- Constant Field Values
ATTR_DEFAULT
private static final String ATTR_DEFAULT
- See Also:
- Constant Field Values
ATTR_ENUMTASK
private static final String ATTR_ENUMTASK
- See Also:
- Constant Field Values
XMLUtils
public XMLUtils()
isEmpty
private static boolean isEmpty(String s)
schema2string
public static String schema2string(SchemaObject schema)
schema2stream
public static void schema2stream(SchemaObject schema,
OutputStream os)
schema2document
public static Document schema2document(SchemaObject schema)
generateComplexType
private static void generateComplexType(String name,
ComplexType ct,
Element elem)
throws DOMException
- Throws:
DOMException
generateAttribute
private static void generateAttribute(Attribute a,
Element elem)
throws DOMException
- Throws:
DOMException
generateSimpleType
private static void generateSimpleType(String name,
SimpleType st,
Element elem)
throws DOMException
- Throws:
DOMException
stripNS
private static String stripNS(String s)
document2schema
public static SchemaObject document2schema(String schemaXml)
document2schema
public static SchemaObject document2schema(InputStream is)
document2schema
public static SchemaObject document2schema(Document doc)
schemaElement2schema
public static SchemaObject schemaElement2schema(Element schema)
processComplexType
private static ComplexType processComplexType(Element type,
String resourceBundle)
processDisplays
private static void processDisplays(DisplayContainer container,
Element element,
String resourceBundle)
processAttribute
private static Attribute processAttribute(Element element,
String resourceBundle)
processSimpleType
private static SimpleType processSimpleType(Element type,
String resourceBundle)
processEnumeration
private static EnumeratedValue[] processEnumeration(Element restriction,
String resourceBundle)
exclusiveConstraintElementName
private static boolean exclusiveConstraintElementName(String n)
inclusiveConstraintElementName
private static boolean inclusiveConstraintElementName(String n)
constraintElementName
private static boolean constraintElementName(String n)
processConstraints
private static Range[] processConstraints(Vector restrictions)
localize
public static void localize(SchemaObject schema)
localize
private static void localize(SchemaObject schema,
String resourceBundle,
Hashtable bundles)
localizeSimpleType
private static void localizeSimpleType(SimpleType simple,
String resourceBundle,
Hashtable bundles)
localizeComplexType
private static void localizeComplexType(ComplexType complex,
String resourceBundle,
Hashtable bundles)
localizeDisplayContainer
private static void localizeDisplayContainer(DisplayContainer container,
String resourceBundle,
Hashtable bundles)