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< AcsType > | typeList |
Static Protected Attributes | |
static String | COMMON_TYPES = "commontypes.xsd" |
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.
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.
AcsType cl.utfsm.acs.xml.CommonSchema.getType | ( | String | name | ) |
Get a type (simple or complex) by name.
name | the name of the type |
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
node | the DOM attribute 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.
anno | the DOM node |
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.
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.
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().
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().
Document cl.utfsm.acs.xml.CommonSchema.commonTypes [protected] |
The DOM Document object.
Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema().
DOMParser cl.utfsm.acs.xml.CommonSchema.parser [protected] |
The local DOM parser reference
Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema(), and cl.utfsm.acs.ebe.ErrorSchema.ErrorSchema().
ArrayList<AcsType> cl.utfsm.acs.xml.CommonSchema.typeList [protected] |
The list of types on the schema
Referenced by cl.utfsm.acs.xml.CommonSchema.CommonSchema(), cl.utfsm.acs.xml.CommonSchema.getType(), cl.utfsm.acs.xml.CommonSchema.searchComplexTypes(), and cl.utfsm.acs.xml.CommonSchema.searchSimpleTypes().