Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdbf.engine.xml
Class XPathManager  view XPathManager download XPathManager.java

java.lang.Object
  extended byorg.jdbf.engine.xml.XPathManager
All Implemented Interfaces:
GenericXPath

public class XPathManager
extends java.lang.Object
implements GenericXPath

XPathManager is the class that parses the informations on the repository and finally it creates an RepositoryView. To create a RepositoryView, XPathManager uses the XPath that specifies the path the repositoryView on the repository file. XPath is express as /repository/repositoryView/[name='repositoryName'], where repositoryName is the name of repository which needs to return the informations. These informations are:

  • BeanDescriptor

  • ItemDescriptor


  • Field Summary
    private  org.w3c.dom.Document document
              Document object
    private  java.lang.String fileName
              name of repository file
    private  org.jdbf.engine.repository.RepositoryFactory repFactory
              RepositoryFactory object
    private  java.lang.String xPath
              XPath
     
    Constructor Summary
    XPathManager(java.lang.String fileName)
              Creates the XPathManager object and it parses the repository file specified in fileName.
     
    Method Summary
     org.jdbf.engine.mapping.GeneratorMap createGeneratorMap(java.lang.String xPath)
              Creates the repositoryView.
     org.jdbf.engine.repository.Repository createRepositoryView(org.w3c.dom.Element e)
              Creates the repositoryView.
    protected  org.jdbf.engine.mapping.BeanDescriptor getBeanDescriptor(org.w3c.dom.Element e)
              Return the BeanDescriptor object.
    protected  java.util.ArrayList getItemDescriptor(java.lang.String xPath)
              Return the ItemDescriptor object.
     org.jdbf.engine.repository.RepositoryFactory getRepositoryFactory()
              Return RepositoryFactory
     java.lang.Object getValueOfAttribute(java.lang.String xPath, java.lang.String attribute, java.lang.String value)
              Deprecated. Method deprecated
    protected  void loadRepositoryFactory()
              Load all repositoryView object in RepositoryFactory.
    protected  org.w3c.dom.Document parse(java.lang.String fileName)
              Parses the repository file specified in fileName
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    fileName

    private java.lang.String fileName
    name of repository file


    xPath

    private java.lang.String xPath
    XPath


    document

    private org.w3c.dom.Document document
    Document object


    repFactory

    private org.jdbf.engine.repository.RepositoryFactory repFactory
    RepositoryFactory object

    Constructor Detail

    XPathManager

    public XPathManager(java.lang.String fileName)
                 throws java.lang.Exception
    Creates the XPathManager object and it parses the repository file specified in fileName.

    Method Detail

    createRepositoryView

    public org.jdbf.engine.repository.Repository createRepositoryView(org.w3c.dom.Element e)
                                                               throws org.jdbf.engine.mapping.MappingException
    Creates the repositoryView.

    Specified by:
    createRepositoryView in interface GenericXPath

    createGeneratorMap

    public org.jdbf.engine.mapping.GeneratorMap createGeneratorMap(java.lang.String xPath)
                                                            throws org.jdbf.engine.mapping.MappingException
    Creates the repositoryView.


    getValueOfAttribute

    public java.lang.Object getValueOfAttribute(java.lang.String xPath,
                                                java.lang.String attribute,
                                                java.lang.String value)
                                         throws org.jdbf.engine.mapping.MappingException
    Deprecated. Method deprecated

    Return name of repository

    Specified by:
    getValueOfAttribute in interface GenericXPath

    getBeanDescriptor

    protected org.jdbf.engine.mapping.BeanDescriptor getBeanDescriptor(org.w3c.dom.Element e)
                                                                throws org.jdbf.engine.mapping.MappingException
    Return the BeanDescriptor object.


    getItemDescriptor

    protected java.util.ArrayList getItemDescriptor(java.lang.String xPath)
                                             throws org.jdbf.engine.mapping.MappingException
    Return the ItemDescriptor object. If the xPath is incorrect TransformerException is throwed.


    loadRepositoryFactory

    protected void loadRepositoryFactory()
                                  throws org.jdbf.engine.mapping.MappingException
    Load all repositoryView object in RepositoryFactory.


    getRepositoryFactory

    public org.jdbf.engine.repository.RepositoryFactory getRepositoryFactory()
    Return RepositoryFactory


    parse

    protected org.w3c.dom.Document parse(java.lang.String fileName)
                                  throws javax.xml.parsers.ParserConfigurationException,
                                         org.xml.sax.SAXException,
                                         org.jdbf.engine.mapping.MappingException
    Parses the repository file specified in fileName