| java.lang.Object org.xml.sax.helpers.DefaultHandler org.jpox.metadata.xml.MetaDataParser
MetaDataParser | public class MetaDataParser extends DefaultHandler (Code) | | Class to provide the parsing framework for parsing metadata files.
This will support parsing of any metadata files where the resultant object is
derived from org.jpox.metadata.MetaData, so can be used on JDO files, ORM files,
JDOQUERY files, JPA files, or "persistence.xml" files. Can be used for any future
metadata files too.
Provides 3 different entry points depending on whether the caller has a URL,
a file, or an InputStream.
since: 1.1 version: $Revision: 1.1 $ |
validate | final protected boolean validate(Code) | | Whether to validate while parsing.
|
MetaDataParser | public MetaDataParser(MetaDataManager mgr, boolean validate)(Code) | | Constructor.
Parameters: mgr - MetaDataManager Parameters: validate - Whether to validate while parsing |
parseMetaDataFile | public MetaData parseMetaDataFile(String fileName, String handlerName)(Code) | | Method to parse a MetaData file given the filename.
Parameters: fileName - Name of the file Parameters: handlerName - Name of the handler plugin to use when parsing The MetaData for this file throws: JPOXException - if error occurred |
parseMetaDataStream | public MetaData parseMetaDataStream(InputStream in, String filename, String handlerName)(Code) | | Method to parse a MetaData file given an InputStream.
Parameters: in - input stream Parameters: filename - Name of the file (if applicable) Parameters: handlerName - Name of the handler plugin to use when parsing The MetaData for this file throws: JPOXException - thrown if error occurred |
parseMetaDataURL | public MetaData parseMetaDataURL(URL url, String handlerName)(Code) | | Method to parse a MetaData file given the URL of the file.
Parameters: url - Url of the metadata file Parameters: handlerName - Name of the handler plugin to use when parsing The MetaData for this file throws: JPOXException - thrown if error occurred |
Methods inherited from org.xml.sax.helpers.DefaultHandler | public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void error(SAXParseException e) throws SAXException(Code)(Java Doc) public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc) public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)
|
|
|