edu.indiana.dlib.metsnav.dao
Class PersistentMets1_5FileDAO

java.lang.Object
  extended by edu.indiana.dlib.metsnav.dao.NavigatorDAO
      extended by edu.indiana.dlib.metsnav.dao.PersistentMets1_5FileDAO

public class PersistentMets1_5FileDAO
extends NavigatorDAO

This DAO construts a MetsNavObject from a mets file and keeps the data inside the dao

Author:
David Jiao

Field Summary
protected  String currentDivision
          Comment for currentDivision
protected  FileSystemDataSource dsConfig
          Comment for dsConfig
protected  NavigationObject navObj
          Comment for navObj
 
Constructor Summary
PersistentMets1_5FileDAO()
           
 
Method Summary
 void destroy()
          Destroy the DAO.
 NavigationObject getNavigateObject(String oid)
          Returns a navigateobject
protected  String getPageId(Div pageDiv)
          Returns the id of this page
 PageItem getPageItem(String oid, String pid)
          Returns a single page item
 void init(DataSourceConfig dsConfig)
          Initialize the DAO and set configuration parameters
protected  Object parseDiv(String oid, Div div, Division parent)
          parses a div in the logical structmap.
protected  PageItem parsePage(Div pageDiv)
          Parses a div of type page
protected  ArrayList parsePhysicalStructMap(Div div)
          Parses physical structmap
protected  void setDivisionStart(Division division)
           
protected  Mets unmarshallMets(String oid)
          This method unmarshall mets document into a Mets object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentDivision

protected String currentDivision
Comment for currentDivision


navObj

protected NavigationObject navObj
Comment for navObj


dsConfig

protected FileSystemDataSource dsConfig
Comment for dsConfig

Constructor Detail

PersistentMets1_5FileDAO

public PersistentMets1_5FileDAO()
Method Detail

init

public void init(DataSourceConfig dsConfig)
          throws DAOException
Description copied from class: NavigatorDAO
Initialize the DAO and set configuration parameters

Specified by:
init in class NavigatorDAO
Throws:
DAOException

destroy

public void destroy()
             throws DAOException
Description copied from class: NavigatorDAO
Destroy the DAO. Close database connections if necessary

Specified by:
destroy in class NavigatorDAO
Throws:
DAOException

getNavigateObject

public NavigationObject getNavigateObject(String oid)
                                   throws DAOException
Description copied from class: NavigatorDAO
Returns a navigateobject

Specified by:
getNavigateObject in class NavigatorDAO
Returns:
Throws:
DAOException

getPageId

protected String getPageId(Div pageDiv)
Returns the id of this page

Parameters:
pageDiv -
Returns:

getPageItem

public PageItem getPageItem(String oid,
                            String pid)
                     throws DAOException
Description copied from class: NavigatorDAO
Returns a single page item

Specified by:
getPageItem in class NavigatorDAO
Returns:
Throws:
DAOException

parseDiv

protected Object parseDiv(String oid,
                          Div div,
                          Division parent)
                   throws DAOException
parses a div in the logical structmap. This is a recursive function

Parameters:
div -
parent -
Returns:
Throws:
DAOException

parsePage

protected PageItem parsePage(Div pageDiv)
                      throws DAOException
Parses a div of type page

Parameters:
pageDiv -
Returns:
Throws:
DAOException

parsePhysicalStructMap

protected ArrayList parsePhysicalStructMap(Div div)
                                    throws DAOException
Parses physical structmap

Parameters:
div -
Returns:
Throws:
DAOException

setDivisionStart

protected void setDivisionStart(Division division)

unmarshallMets

protected Mets unmarshallMets(String oid)
                       throws Exception
This method unmarshall mets document into a Mets object. This method can be extended to utilize other Mets file storage methods

Parameters:
oid -
Returns:
a Mets object
Throws:
Exception


Copyright © 2005 Trustees of Indiana University. All Rights Reserved.