hypercast.util
Class createPrivatePropertyDocFromSchemaFile

java.lang.Object
  |
  +--hypercast.util.createPrivatePropertyDocFromSchemaFile

public class createPrivatePropertyDocFromSchemaFile
extends java.lang.Object

This class defines functions to create a XML Document from a schema file. The created XML Document is built based on the default values defined in the scema file.


Constructor Summary
createPrivatePropertyDocFromSchemaFile()
          Constructor.
createPrivatePropertyDocFromSchemaFile(java.lang.String schemafile)
          Constructor.
 
Method Summary
static org.w3c.dom.Element findPropertyElement(org.w3c.dom.Document doc, java.lang.String rootElementName)
          Find the property Element in the given Document.
static java.util.Vector getChildrenOfComplexElement(org.w3c.dom.Element e)
          Get children of this Element.
 org.w3c.dom.Document getPrivateProperties()
          Build the Document object for all attribute Elements (based on their default values).
static org.w3c.dom.Document getPrivateProperties(org.w3c.dom.Document schemaDoc)
          Build the Document object for all attribute Elements (based on their default values) in the given schema file (in Document form).
static org.w3c.dom.Document getPrivateProperties(java.lang.String schemafile)
          Build the Document object for all attribute Elements (based on their default values) in the given schema file.
static org.w3c.dom.Element getRestrictionElement(org.w3c.dom.Element e)
          Get the Element which defines restrition for given simpleType Element.
static boolean hasChoiceOnChildren(org.w3c.dom.Element e)
          Check if this Element has a sequence of children.
static boolean isComplexElement(org.w3c.dom.Element e)
          Check if this Element has a "complex" child.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

createPrivatePropertyDocFromSchemaFile

public createPrivatePropertyDocFromSchemaFile(java.lang.String schemafile)
                                       throws java.io.IOException,
                                              java.text.ParseException
Constructor.


createPrivatePropertyDocFromSchemaFile

public createPrivatePropertyDocFromSchemaFile()
                                       throws java.io.IOException
Constructor.

Method Detail

getPrivateProperties

public org.w3c.dom.Document getPrivateProperties()
                                          throws java.io.IOException
Build the Document object for all attribute Elements (based on their default values).

java.io.IOException

getPrivateProperties

public static org.w3c.dom.Document getPrivateProperties(java.lang.String schemafile)
                                                 throws java.io.FileNotFoundException,
                                                        java.text.ParseException,
                                                        java.io.IOException
Build the Document object for all attribute Elements (based on their default values) in the given schema file.

java.io.FileNotFoundException
java.text.ParseException
java.io.IOException

getPrivateProperties

public static org.w3c.dom.Document getPrivateProperties(org.w3c.dom.Document schemaDoc)
Build the Document object for all attribute Elements (based on their default values) in the given schema file (in Document form).


findPropertyElement

public static org.w3c.dom.Element findPropertyElement(org.w3c.dom.Document doc,
                                                      java.lang.String rootElementName)
Find the property Element in the given Document. This Element is the starting point for building displaying tree. This method assume the schema file has fixed format to reach the property Element.

Parameters:
doc - A Document instance.
rootElementName - The Element name of the root for all attributes.
Returns:
the Element which has attribute "name = rootElemenName".

isComplexElement

public static boolean isComplexElement(org.w3c.dom.Element e)
Check if this Element has a "complex" child.


getChildrenOfComplexElement

public static java.util.Vector getChildrenOfComplexElement(org.w3c.dom.Element e)
Get children of this Element.


hasChoiceOnChildren

public static boolean hasChoiceOnChildren(org.w3c.dom.Element e)
Check if this Element has a sequence of children.


getRestrictionElement

public static org.w3c.dom.Element getRestrictionElement(org.w3c.dom.Element e)
Get the Element which defines restrition for given simpleType Element.

Parameters:
e - Element in the configuration document.
Returns:
the restrition definition Element.