Public Types | |
typedef std::list< Element > | ElementList |
typedef std::list< Attribute > | AttributeList |
typedef std::list< Group > | GroupList |
typedef std::list< AttributeGroup * > | AttributeGroupList |
typedef std::list< Constraint * > | ConstraintList |
typedef std::list< Qname > | QNameList |
typedef std::list< const XSDType * > | ConstTypeList |
Public Member Functions | |
Constructors and Destructors | |
SchemaParser (const std::string &Uri, std::string tns="", std::ostream &log=std::cout, const std::string &confPath="") | |
SchemaParser (XmlPullParser *parser, std::string tns="", std::ostream &log=std::cout, const std::string &confPath="") | |
~SchemaParser () | |
methods used for parsing | |
bool | parseSchemaTag () |
Various Getter methods | |
const XSDType * | getType (const Qname &type) |
const XSDType * | getType (int id) const |
const XSDType * | getType (int id, std::string &nameSpace) |
ConstTypeList * | getAllTypes () const |
const Element * | getElement (const Qname &element) const |
const ElementList & | getElements () const |
int | getNumElements () const |
Attribute * | getAttribute (const Qname &attribute) |
const AttributeList & | getAttributes () const |
int | getNumAttributes () const |
std::string | getNamespace (void) const |
int | getNumTypes () const |
int | getTypeId (const Qname &, bool create=false) |
bool | isBasicType (int sType) const |
int | getBasicContentType (int typeId) const |
Group * | getGroup (const Qname &name) |
AttributeGroup * | getAttributeGroup (const Qname &name) |
Methods for handling Imports | |
bool | isImported (const std::string &ns) const |
const SchemaParser * | getImportedSchemaParser (const std::string &ns) const |
bool | addImport (std::string ns, std::string location="") |
bool | addImport (SchemaParser *sp) |
bool | addImports (const std::vector< SchemaParser * > &schemaParsers) |
Miscellaneous Methods | |
bool | finalize (void) |
void | setWarningLevel (int l) |
void | setSchemaPath (const std::string &s) |
void | setUri (const std::string &u) |
std::string | getTypeName (Schema::Type t) const |
TypesTable * | getTypesTable () |
const SchemaParser * | getImportedSchema (std::string &nameSpace) |
std::vector< ImportedSchema > & | getImportedSchemas () |
std::string | getVersion () const |
bool | getElementQualified () const |
std::string | getTnsPrefix (void) const |
Classes | |
struct | ImportedSchema |
Definition at line 41 of file SchemaParser.h.
|
typedefs Definition at line 49 of file SchemaParser.h. |
|
The constructor for SchemaParser
Definition at line 46 of file SchemaParser.cpp. References XmlPullParser::END_DOCUMENT, XmlUtils::fetchUri(), XmlPullParser::getEventType(), XmlPullParser::getName(), XmlPullParser::nextTag(), XmlPullParser::require(), XmlPullParser::setFeature(), and XmlPullParser::START_TAG. Referenced by addImport(). |
|
The constructor for SchemaParser
Definition at line 29 of file SchemaParser.cpp. |
|
addImport . imports the namespace of the schemaparser
Definition at line 1957 of file SchemaParser.cpp. References getNamespace(), Schema::SchemaParser::ImportedSchema::ns, and Schema::SchemaParser::ImportedSchema::sParser. |
|
addImport .Instructs the schema parser to import a namespace
Definition at line 1999 of file SchemaParser.cpp. References XmlUtils::fetchUri(), Schema::SchemaParser::ImportedSchema::ns, parseSchemaTag(), SchemaParser(), setUri(), and Schema::SchemaParser::ImportedSchema::sParser. Referenced by addImports(). |
|
finalize : tries to match unresolved types and references with imported schemas you *must* call this to ensure successful type resolution
Definition at line 1624 of file SchemaParser.cpp. References Schema::TypesTable::addExtType(), Schema::TypesTable::getExtRefName(), Schema::TypesTable::getExtRefType(), and Schema::TypesTable::getNumExtRefs(). |
|
Definition at line 1910 of file SchemaParser.cpp. References getNumTypes(), and getType(). |
|
getAttribute
Definition at line 1754 of file SchemaParser.cpp. References Qname::getLocalName(), Qname::getNamespace(), and Schema::SchemaUri. |
|
getAttributeGroup
Definition at line 1818 of file SchemaParser.cpp. References Qname::getLocalName(), Qname::getNamespace(), and Schema::SchemaUri. |
|
returns a std::list of global attributes in the schema
Definition at line 407 of file SchemaParser.h. |
|
getBasicContentType If the type has a simple content model then this method returns the basic schema type which defines its contents For example calling on a type like below would return Schema::STRING <xsd:complexType> <xsd:simpleContent> <xsd:extension base = "xsd:std::string"> <xsd:attribute name = "lang" type = "xsd:std::string"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType>
Definition at line 2065 of file SchemaParser.cpp. References getType(), and Schema::XSDType::isSimple(). Referenced by Schema::TypeContainer::getValue(), Schema::TypeContainer::print(), Schema::TypeContainer::rewind(), and Schema::SchemaValidator::validate(). |
|
Definition at line 1720 of file SchemaParser.cpp. References Qname::getLocalName(), Qname::getNamespace(), and Schema::SchemaUri. Referenced by WsdlPull::Soap::handleElement(), WsdlPull::Soap::isSoapBody(), and WsdlPull::Soap::isSoapHeader(). |
|
returns the std::list of all the global elements in the schema
Definition at line 400 of file SchemaParser.h. |
|
getGroup
Definition at line 1785 of file SchemaParser.cpp. References Qname::getLocalName(), Qname::getNamespace(), and Schema::SchemaUri. |
|
Definition at line 1851 of file SchemaParser.cpp. Referenced by addImport(), addImports(), and Schema::SchemaValidator::instance(). |
|
Definition at line 1937 of file SchemaParser.cpp. |
|
Definition at line 1930 of file SchemaParser.cpp. |
|
Definition at line 1923 of file SchemaParser.cpp. References Schema::TypesTable::getNumTypes(). Referenced by getAllTypes(). |
|
Definition at line 1878 of file SchemaParser.cpp. References getImportedSchema(), and getType(). |
|
Definition at line 1858 of file SchemaParser.cpp. References Schema::TypesTable::getTypePtr(). |
|
getType
Definition at line 1865 of file SchemaParser.cpp. References getTypeId(), and Schema::TypesTable::getTypePtr(). Referenced by getAllTypes(), Schema::TypeContainer::getAttributeContainer(), Schema::TypeContainer::getBaseTypeContainer(), getBasicContentType(), getType(), WsdlPull::WsdlInvoker::setInputValue(), and Schema::SchemaValidator::validate(). |
|
getTypeId :Search for a type ,if not present create one
Definition at line 1576 of file SchemaParser.cpp. References Qname::getNamespace(), Schema::TypesTable::getTypeId(), and Schema::SchemaUri. Referenced by getType(). |
|
getTypeName() return the type name given the id Definition at line 2098 of file SchemaParser.cpp. References Schema::TypesTable::getAtomicTypeName(), Schema::XSDType::getName(), Schema::TypesTable::getTypePtr(), and isBasicType(). |
|
getVersion() return the schema version Definition at line 465 of file SchemaParser.h. |
|
isBasicType
Definition at line 1558 of file SchemaParser.cpp. Referenced by getTypeName(), Schema::TypeContainer::getValue(), and Schema::TypeContainer::rewind(). |
|
isImported true if the schema parser imports a namespace Definition at line 420 of file SchemaParser.h. |
|
parseSchemaTag
Definition at line 144 of file SchemaParser.cpp. References XmlPullParser::getAttributeCount(), XmlPullParser::getAttributeName(), XmlPullParser::getAttributeValue(), XmlPullParser::getEventType(), XmlPullParser::next(), XmlPullParser::require(), Schema::SchemaUri, and XmlPullParser::START_TAG. Referenced by addImport(), and Schema::SchemaValidator::validate(). |
|
setWarningLevel default is 0 . 1 is wanrning level 2 is information level //quite verbose Definition at line 414 of file SchemaParser.h. |