cl::utfsm::acs::xml::CommonSchema Class Reference

Inheritance diagram for cl::utfsm::acs::xml::CommonSchema:
Inheritance graph
[legend]
Collaboration diagram for cl::utfsm::acs::xml::CommonSchema:
Collaboration graph
[legend]

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 (  )  [inline]

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 COMMON_TYPES, commonTypes, parser, searchComplexTypes(), searchSimpleTypes(), and typeList.


Member Function Documentation

AcsType cl::utfsm::acs::xml::CommonSchema::getType ( String  name  )  [inline]

Get a type (simple or complex) by name.

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

References typeList.

Referenced by cl::utfsm::acs::ebe::EbeDocumentManager::EbeDocumentManager(), cl::utfsm::acs::ebe::ErrorSchema::fillSchema(), readAttribute(), cl::utfsm::acs::ebe::EbeDocumentTEST::setUp(), and cl::utfsm::acs::xml::CommonSchemaTEST::testSchema().

AcsAttribute cl::utfsm::acs::xml::CommonSchema::readAttribute ( Node  one  )  [inline]

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 getType().

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

String cl::utfsm::acs::xml::CommonSchema::readDocumentation ( Node  anno  )  [inline]

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(), searchComplexTypes(), and searchSimpleTypes().

void cl::utfsm::acs::xml::CommonSchema::searchComplexTypes ( Document  doc,
String  namespace 
) [inline]

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(), readAttribute(), readDocumentation(), and typeList.

Referenced by CommonSchema().

void cl::utfsm::acs::xml::CommonSchema::searchSimpleTypes ( Document  doc,
String  namespace 
) [inline]

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 readDocumentation(), and typeList.

Referenced by 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 CommonSchema().

The DOM Document object.

Referenced by CommonSchema().

The local DOM parser reference

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

The list of types on the schema

Referenced by CommonSchema(), getType(), searchComplexTypes(), and searchSimpleTypes().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2