Class JDOXmlMetaDataHandler

  • All Implemented Interfaces:
    ContentHandler, DTDHandler, EntityResolver, ErrorHandler

    public class JDOXmlMetaDataHandler
    extends org.datanucleus.metadata.xml.AbstractXmlMetaDataHandler
    Parser handler for JDO XML MetaData. Caters for "JDO", "ORM" and "JDOQUERY" XML MetaData. Implements DefaultHandler and handles the extracting of MetaData for JDO from the XML elements/attributes. This class simply constructs the MetaData representation mirroring what is in the XML MetaData file. It has no knowledge of the class(es) that it represents, simply the information in the XML MetaData file. The knowledge of the classes is imposed on the representation at a later stage where necessary.

    Operates the parse process using a Stack. XML MetaData components are added to the stack as they are encountered and created. They are then popped off the stack when the end element is encountered.

    • Constructor Detail

      • JDOXmlMetaDataHandler

        public JDOXmlMetaDataHandler​(org.datanucleus.metadata.MetaDataManager mgr,
                                     String filename,
                                     EntityResolver resolver)
        Constructor. Protected to prevent instantiation.
        Parameters:
        mgr - the metadata manager
        filename - The name of the file to parse
        resolver - Entity Resolver to use (null if not available)
    • Method Detail

      • newClassObject

        protected org.datanucleus.metadata.ClassMetaData newClassObject​(org.datanucleus.metadata.PackageMetaData pmd,
                                                                        Attributes attrs)
        Utility to create a new class component.
        Parameters:
        pmd - The parent PackageMetaData
        attrs - The attributes
        Returns:
        The ClassMetaData
      • newInterfaceObject

        protected org.datanucleus.metadata.InterfaceMetaData newInterfaceObject​(org.datanucleus.metadata.PackageMetaData pmd,
                                                                                Attributes attrs)
        Utility to create a new interface component.
        Parameters:
        pmd - The parent PackageMetaData
        attrs - The attributes
        Returns:
        The InterfaceMetaData
      • newFieldObject

        protected org.datanucleus.metadata.FieldMetaData newFieldObject​(org.datanucleus.metadata.MetaData md,
                                                                        Attributes attrs)
        Utility to create a new field component.
        Parameters:
        md - The parent MetaData
        attrs - The attributes
        Returns:
        The FieldMetaData
      • newPropertyObject

        protected org.datanucleus.metadata.PropertyMetaData newPropertyObject​(org.datanucleus.metadata.MetaData md,
                                                                              Attributes attrs)
        Utility to create a new property component.
        Parameters:
        md - The parent MetaData
        attrs - The attributes
        Returns:
        The PropertyMetaData