Public Member Functions | Protected Attributes | Static Protected Attributes

cl.utfsm.acs.xml.CommonSchema Class Reference

Inheritance diagram for cl.utfsm.acs.xml.CommonSchema:
cl.utfsm.acs.ebe.ErrorSchema

List of all members.

Public Member Functions

 CommonSchema ()
void searchSimpleTypes (Document doc, String namespace)
AcsAttribute readAttribute (Node one)
String readDocumentation (Node anno)
void searchComplexTypes (Document doc, String namespace)
AcsType getType (String name)

Protected Attributes

DOMParser parser
Document commonTypes
ArrayList< AcsTypetypeList

Static Protected Attributes

static String COMMON_TYPES = "commontypes.xsd"

Detailed Description

The common schema reads the COMMON_TYPES schema file, and setup general types definitions. The main purpose of this class is to have the information of the schema files centralized in a schema class. This object automatically parse the schema file and save all the simple and complex types into an internal Arraylist.

Author:
Mauricio Araya (maray[at]inf.utfsm.cl)

Constructor & Destructor Documentation

cl.utfsm.acs.xml.CommonSchema.CommonSchema (  ) 

Parse the schema file and initialize the class. Also adds basic types from the classic schema definition.

TODO: add all the classic schema definitions

References cl.utfsm.acs.xml.CommonSchema.COMMON_TYPES, cl.utfsm.acs.xml.CommonSchema.commonTypes, cl.utfsm.acs.xml.CommonSchema.parser, cl.utfsm.acs.xml.CommonSchema.searchComplexTypes(), cl.utfsm.acs.xml.CommonSchema.searchSimpleTypes(), and cl.utfsm.acs.xml.CommonSchema.typeList.


Member Function Documentation

AcsType cl.utfsm.acs.xml.CommonSchema.getType ( String  name  ) 

Get a type (simple or complex) by name.

Parameters:
name the name of the type
Returns:
the type, or null if not found.

References cl.utfsm.acs.xml.CommonSchema.typeList.

Referenced by cl.utfsm.acs.ebe.EbeDocumentManager.EbeDocumentManager(), cl.utfsm.acs.ebe.ErrorSchema.fillSchema(), and cl.utfsm.acs.xml.CommonSchema.readAttribute().

AcsAttribute cl.utfsm.acs.xml.CommonSchema.readAttribute ( Node  one  ) 

Read a DOM attribute node and return a new AcsAttribute object

Parameters:
node the DOM attribute node
Returns:
A new AcsAttribute object from the node

References cl.utfsm.acs.xml.CommonSchema.getType().

Referenced by cl.utfsm.acs.ebe.ErrorSchema.fillSchema(), and cl.utfsm.acs.xml.CommonSchema.searchComplexTypes().

String cl.utfsm.acs.xml.CommonSchema.readDocumentation ( Node  anno  ) 

Read a DOM annotation node with documentation, and return the string documentation.

Parameters:
anno the DOM node
Returns:
The String with the documentation

Referenced by cl.utfsm.acs.ebe.ErrorSchema.fillSchema(), cl.utfsm.acs.xml.CommonSchema.searchComplexTypes(), and cl.utfsm.acs.xml.CommonSchema.searchSimpleTypes().

void cl.utfsm.acs.xml.CommonSchema.searchComplexTypes ( Document  doc,
String  namespace 
)

Search for ComplexTypes in the parsed document and add them to the Arraylist. This class is unstable, and untested. I asure that works with the commontypes file only.

Parameters:
doc The DOM document to search
namespace The namespace that those types should have

References cl.utfsm.acs.types.AcsComplexType.addAttr(), cl.utfsm.acs.xml.CommonSchema.readAttribute(), cl.utfsm.acs.xml.CommonSchema.readDocumentation(), and cl.utfsm.acs.xml.CommonSchema.typeList.

Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema().

void cl.utfsm.acs.xml.CommonSchema.searchSimpleTypes ( Document  doc,
String  namespace 
)

Search for SimpleTypes in the parsed document and add them to the Arraylist.

Parameters:
doc The DOM document to search
namespace The namespace that those types should have

References cl.utfsm.acs.xml.CommonSchema.readDocumentation(), and cl.utfsm.acs.xml.CommonSchema.typeList.

Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema(), and cl.utfsm.acs.ebe.ErrorSchema.ErrorSchema().


Member Data Documentation

String cl.utfsm.acs.xml.CommonSchema.COMMON_TYPES = "commontypes.xsd" [static, protected]

The common types schema filename

Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema().

The DOM Document object.

Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties