com::cosylab::cdb::jdal::XSDElementTypeResolver Class Reference

Collaboration diagram for com::cosylab::cdb::jdal::XSDElementTypeResolver:
Collaboration graph
[legend]

List of all members.

Classes

class  DALURIResolver
class  XMLNSElement

Public Member Functions

 XSDElementTypeResolver (String root, Logger logger) throws ParserConfigurationException, SAXException
String[] getElementTypes (final String parentElementName, final String[] xmlns, final String[] elements)
boolean doesExtend (final String xmlns, final String baseTypeName) throws SAXException, IOException, URIException, XMLException
DALURIResolver getUriResolver ()

Protected Member Functions

void initializeParser () throws ParserConfigurationException, SAXException
String[] internalGetElementTypes (String parentElementName, final String xmlns, final String[] elements) throws SAXException, IOException, URIException, XMLException

Protected Attributes

Parser parser
Map< XMLNSElement, String > cache = new HashMap<XMLNSElement, String>()
Map< String, Boolean > doesExtendMap = new HashMap<String, Boolean>()

Package Attributes

DALURIResolver uriResolver

Static Private Member Functions

static final String getXSDElementName (final String xmlns)

Private Attributes

final Logger logger
final String root

Constructor & Destructor Documentation

com::cosylab::cdb::jdal::XSDElementTypeResolver::XSDElementTypeResolver ( String  root,
Logger  logger 
) throws ParserConfigurationException, SAXException [inline]

References initializeParser(), logger, and root.


Member Function Documentation

boolean com::cosylab::cdb::jdal::XSDElementTypeResolver::doesExtend ( final String  xmlns,
final String  baseTypeName 
) throws SAXException, IOException, URIException, XMLException [inline]

: Change this method to not rely on the xsd file name to match a part of the xml namespace. For example, all xsd files could be parsed using a xerces XMLGrammarLoader (see http://xerces.apache.org/xerces2-j/faq-grammars.html#faq-3). This xsd cache could then be queried here for the given namespace, and it could also be shared with the xml parser in DALImpl.

References doesExtendMap, getXSDElementName(), logger, parser, com::cosylab::cdb::jdal::XSDElementTypeResolver::DALURIResolver::resolve(), and uriResolver.

Referenced by com::cosylab::cdb::jdal::HibernateWDALImpl::loadXMLCDB().

String [] com::cosylab::cdb::jdal::XSDElementTypeResolver::getElementTypes ( final String  parentElementName,
final String[]  xmlns,
final String[]  elements 
) [inline]
DALURIResolver com::cosylab::cdb::jdal::XSDElementTypeResolver::getUriResolver (  )  [inline]
Returns:
the uriResolver

References uriResolver.

static final String com::cosylab::cdb::jdal::XSDElementTypeResolver::getXSDElementName ( final String  xmlns  )  [inline, static, private]
void com::cosylab::cdb::jdal::XSDElementTypeResolver::initializeParser (  )  throws ParserConfigurationException, SAXException [inline, protected]
String [] com::cosylab::cdb::jdal::XSDElementTypeResolver::internalGetElementTypes ( String  parentElementName,
final String  xmlns,
final String[]  elements 
) throws SAXException, IOException, URIException, XMLException [inline, protected]

Member Data Documentation

Map<XMLNSElement, String> com::cosylab::cdb::jdal::XSDElementTypeResolver::cache = new HashMap<XMLNSElement, String>() [protected]
Map<String, Boolean> com::cosylab::cdb::jdal::XSDElementTypeResolver::doesExtendMap = new HashMap<String, Boolean>() [protected]

Referenced by doesExtend().


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

Generated by  doxygen 1.6.2