Examples of MetsObjectDAO


Examples of edu.indiana.dlib.metsnav.dao.MetsObjectDAO

     * @return
     * @throws ConfigurationException
     * @throws DAOException
     */
    public MetsObjectDAO getMetsObjectDAO(String col) throws ConfigurationException, DAOException {
        MetsObjectDAO dao = (MetsObjectDAO)servletContext.getAttribute(Globals.DAO_KEY + "/" + col);
        if (dao == null) {
            CollectionConfig config = getConfig(col);
            MetsObjectDAOFactory factory = MetsObjectDAOFactory.instance();
            MetsObjectDAO wrappedDao = factory.createMetsObjectDAO(config.getDataSource().getDaoType());
            dao = new CacheMetsObjectDAO(wrappedDao);
            dao.init(config);
            servletContext.setAttribute(Globals.DAO_KEY + "/" + col, dao);
        }
        return dao;
View Full Code Here

Examples of edu.indiana.dlib.metsnav.dao.MetsObjectDAO

    private MetsObjectDAO dao = null;
    @Context
    ServletContext servletContext;

    protected JSONObject getJSONObject(String oid, String coll) throws ConfigurationException, DAOException {
        MetsObjectDAO dao = getMetsObjectDAO(coll);
        return dao.getJSONObject(oid);
    }
View Full Code Here

Examples of edu.indiana.dlib.metsnav.dao.MetsObjectDAO

     */
    private static final Logger log = Logger.getLogger(MetsObjectController.class);
   
    public MetsObjectController(CollectionConfig config) throws ConfigurationException, DAOException {
        MetsObjectDAOFactory factory = MetsObjectDAOFactory.instance();
        MetsObjectDAO dao = factory.createMetsObjectDAO(config.getDataSource().getDaoType());
        metsDao = new CacheMetsObjectDAO(dao);
        metsDao.init(config);     
    }
View Full Code Here

Examples of edu.indiana.dlib.metsnav.dao.MetsObjectDAO

        // Data source configuration will not be implemented in this version
        this.context = context;
        this.prefix = prefix;
        String key = Globals.COLLECTION_CONFIG_KEY + prefix;
        CollectionConfig config = (CollectionConfig) context.getAttribute(key);
        MetsObjectDAO childDao = MetsObjectDAOFactory.instance().createMetsObjectDAO(
                config.getDataSource().getDaoType());
        dao = new CacheMetsObjectDAO(childDao);
        dao.init(config);

        log.debug("Finished initializing NavigationController for collection: " + prefix);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.