Package org.openbel.framework.api.internal

Examples of org.openbel.framework.api.internal.KAMCatalogDao


    private KamInfo loadKAMInfo(final String kamName, final String filePath,
            final SystemConfiguration cfg) throws PKAMSerializationFailure {
        final DBConnection kcc = createKAMConnection(kamName, cfg);

        KamInfo kamInfo;
        KAMCatalogDao kcdao = null;
        try {
            kcdao = new KAMCatalogDao(kcc,
                    cfg.getKamCatalogSchema(), cfg.getKamSchemaPrefix());
            kamInfo = kcdao.getKamInfoByName(kamName);
        } catch (SQLException e) {
            throw new PKAMSerializationFailure(filePath, e.getMessage());
        } finally {
            if (kcdao != null) {
                kcdao.terminate();
            }
        }

        return kamInfo;
    }
View Full Code Here


        // Load the KAM catalog schema, if it doesn't exist (see #88).
        kamSchemaService.setupKAMCatalogSchema();

        if (command == Command.SET_DESCRIPTION || command == Command.RENAME) {
            kamCatalogDao = new KAMCatalogDao(dbConnection,
                    syscfg.getKamCatalogSchema(), syscfg.getKamSchemaPrefix());
        }

        if (command == Command.IMPORT || command == Command.EXPORT) {
            pkamService = new DefaultPKAMSerializationService(
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public String saveToKAMCatalog(KamDbObject kamDb)
            throws SQLException {
        KAMCatalogDao catalogDAO = null;

        try {
            catalogDAO = createCatalogDao();
            catalogDAO.saveToCatalog(kamDb);
        } finally {
            if (catalogDAO != null) {
                closeCatalogDao(catalogDAO);
            }
        }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public void deleteFromKAMCatalog(final String kamName)
            throws SQLException {
        KAMCatalogDao catalogDAO = null;

        try {
            catalogDAO = createCatalogDao();
            catalogDAO.deleteFromCatalog(kamName);
        } finally {
            if (catalogDAO != null) {
                closeCatalogDao(catalogDAO);
            }
        }
View Full Code Here

    }

    private KAMCatalogDao createCatalogDao() throws SQLException {
        String catalogSchema = getSystemConfiguration().getKamCatalogSchema();
        String kamSchemaPrefix = getSystemConfiguration().getKamSchemaPrefix();
        return new KAMCatalogDao(createConnection(), catalogSchema,
                kamSchemaPrefix);
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.api.internal.KAMCatalogDao

Copyright © 2018 www.massapicom. 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.