Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.lib » meta » [javadoc | source]
org.apache.openjpa.lib.meta
public class: CFMetaDataParser [javadoc | source]
java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.apache.openjpa.lib.meta.XMLMetaDataParser
         org.apache.openjpa.lib.meta.CFMetaDataParser

All Implemented Interfaces:
    MetaDataParser, LexicalHandler, ErrorHandler, EntityResolver, ContentHandler, DTDHandler

Direct Known Subclasses:
    XMLPersistenceMetaDataParser

Custom SAX parser used by the system to quickly parse metadata files for classes.
Field Summary
static final  String[] PACKAGES     
Constructor:
 public CFMetaDataParser() 
Method from org.apache.openjpa.lib.meta.CFMetaDataParser Summary:
classForName,   classForName,   currentClassName,   currentPackage,   endClass,   endClassElement,   endElement,   endPackage,   endPackageElement,   endSystemElement,   getClassAttributeName,   getClassElementDepth,   getPackageAttributeName,   getPackageElementDepth,   isClassElementName,   isPackageElementName,   reset,   startClass,   startClassElement,   startElement,   startPackage,   startPackageElement,   startSystemElement
Methods from org.apache.openjpa.lib.meta.XMLMetaDataParser:
addComments,   addResult,   characters,   clear,   comment,   currentClassLoader,   currentComments,   currentDepth,   currentLocation,   currentText,   endCDATA,   endDTD,   endElement,   endElement,   endEntity,   error,   fatalError,   finish,   getClassLoader,   getDocType,   getException,   getException,   getException,   getLexicalHandler,   getLocation,   getLog,   getParseComments,   getParseText,   getResults,   getSchemaSource,   getSourceFile,   getSourceIsSystemId,   getSourceName,   getSuffix,   ignoreContent,   isCaching,   isValidating,   parse,   parse,   parse,   parse,   parse,   parse,   parseNewResource,   parsed,   reset,   setCaching,   setClassLoader,   setDocumentLocator,   setLexicalHandler,   setLocation,   setLog,   setParseComments,   setParseText,   setSourceIsSystemId,   setSuffix,   setValidating,   startCDATA,   startDTD,   startElement,   startElement,   startEntity
Methods from org.xml.sax.helpers.DefaultHandler:
characters,   endDocument,   endElement,   endPrefixMapping,   error,   fatalError,   ignorableWhitespace,   notationDecl,   processingInstruction,   resolveEntity,   setDocumentLocator,   skippedEntity,   startDocument,   startElement,   startPrefixMapping,   unparsedEntityDecl,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.lib.meta.CFMetaDataParser Detail:
 protected Class classForName(String name,
    boolean resolve) throws SAXException 
    Helper method to create the Class for the given name, taking into account the package currently being parsed for relative class names.
 public static Class classForName(String name,
    String pkg,
    boolean resolve,
    ClassLoader loader) 
    Load the given class name against the given package and the set of accepted standard packages. Return null if the class cannot be loaded.
 protected String currentClassName() 
    Return the current class being parsed; the returned name will be fully qualified.
 protected String currentPackage() 
    Return the current package being parsed.
 protected  void endClass(String elem) throws SAXException 
    End a class. Parses contained text by default.
 protected  void endClassElement(String name) throws SAXException 
    Override this method marking the end of an element within a declared class.
 protected  void endElement(String name) throws SAXException 
 protected  void endPackage(String elem) 
    End a package. Parses contained text by default.
 protected  void endPackageElement(String name) throws SAXException 
    Override this method marking the end of an element within a declared package.
 protected  void endSystemElement(String name) throws SAXException 
    Override this method marking the end of an element outside of any package or class.
 protected String getClassAttributeName() 
    The attribute of the class element that holds the name, or null to use the element text. Defaults to "name".
 protected int getClassElementDepth() 
    The depth of the class element. Defaults to 2.
 protected String getPackageAttributeName() 
    The attribute of the package element that holds the name, or null to use the element text. Defaults to "name".
 protected int getPackageElementDepth() 
    The depth of the package element. Defaults to 1.
 protected boolean isClassElementName(String name) 
    The name of the class element. Defaults to "class".
 protected boolean isPackageElementName(String name) 
    The name of the package element. Defaults to "package".
 protected  void reset() 
    Override this method to clear any state and ready the parser for a new document. Subclasses should call super.reset() to clear superclass state.
 protected boolean startClass(String elem,
    Attributes attrs) throws SAXException 
    Start a class. Parses out class name by default. Return false to skip class element and its contents.
 protected boolean startClassElement(String name,
    Attributes attrs) throws SAXException 
    Override this method marking the start of an element within a declared class.
 protected boolean startElement(String name,
    Attributes attrs) throws SAXException 
 protected boolean startPackage(String elem,
    Attributes attrs) throws SAXException 
    Start a package. Parses out package attribute by default. Return false to skip package element and its contents.
 protected boolean startPackageElement(String name,
    Attributes attrs) throws SAXException 
    Override this method marking the start of an element within a declared package.
 protected boolean startSystemElement(String name,
    Attributes attrs) throws SAXException 
    Override this method marking the start of an element outside of any package or class.