Examples of KamDbObject


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

     * Test cache mechanisms.
     */
    @Test
    public void test() {
        KamCacheService kcSvc = new DefaultKamCacheService(new MockKAMStore1());
        KamDbObject kdbobj = new KamDbObject(1, null, null, null, null);
        KamInfo ki = new KamInfo(kdbobj);
        long t1 = currentTimeMillis();
        try {
            kcSvc.loadKam(ki, null);
        } catch (KamCacheServiceException e) {
View Full Code Here

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

        // check to see if it exists
        KamInfo kamInfo = loadKAMInfo(kamName, filePath, cfg);

        // create a kam catalog entry if it does not exist
        final KamDbObject kamDb;
        if (kamInfo == null) {
            kamDb = new KamDbObject(null, kamName, kamDescription,
                    new Date(lastCompiled), null);
        } else {
            if (!noPreserve) {
                // FIXME Hack to throw noPreserve check error to be processed by the calling CLI
                throw new IllegalStateException();
            }

            kamDb = new KamDbObject(kamInfo.getId(), kamName, kamDescription,
                    new Date(lastCompiled), kamInfo.getSchemaName());
        }

        final String kamSchema;
        try {
View Full Code Here

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

        // Get a list of all the KAMs available in the KAM store
        reportable.output("Available KAMs:");
        reportable.output("\tName\tLast Compiled\tSchema Name");
        reportable.output("\t------\t-------------\t-----------");
        for (KamInfo kamInfo : kamInfos) {
            KamDbObject kamDb = kamInfo.getKamDbObject();
            reportable.output(String.format("\t%s\t%s\t%s",
                    kamDb.getName(), kamDb.getLastCompiled(),
                    kamDb.getSchemaName()));
        }
        System.out.print("\n");
    }
View Full Code Here

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

            e.printStackTrace();
            stageError(e.getUserFacingMessage());
            exit(ExitCode.KAM_CONNECTION_FAILURE);
        }

        KamDbObject kamDb = new KamDbObject(null, kamName, kamDescription,
                new Date(), null);

        String kamSchemaName = null;
        try {
            kamSchemaName = p4.stage2SaveToKAMCatalog(kamDb);
View Full Code Here

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

            // Get a list of all the KAMs available in the KAM store
            reportable.output("Available KAMs:");
            reportable.output("\tName\tLast Compiled\tSchema Name");
            reportable.output("\t------\t-------------\t-----------");
            for (KamInfo kamInfo : kamInfos) {
                KamDbObject kamDb = kamInfo.getKamDbObject();
                reportable.output(format("\t%s\t%s\t%s",
                        kamDb.getName(), kamDb.getLastCompiled(),
                        kamDb.getSchemaName()));
            }
            reportable.output("\n");
        } catch (KAMStoreException e) {
            teardown();
            bailOnException(e);
View Full Code Here

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

            final KamInfo kamInfo = kAMStore.getKamInfo(kamName);
            if (kamInfo != null) {
                if (!BELUtilities.equals(kamInfo.getDescription(),
                        newDescription)) {
                    final KamDbObject updated =
                            new KamDbObject(kamInfo.getId(), kamInfo.getName(),
                                    newDescription, kamInfo.getLastCompiled(),
                                    kamInfo.getSchemaName());
                    kamCatalogDao.saveToCatalog(updated);
                }
            } else {
View Full Code Here

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

                        fatal(format(
                                "A KAM named '%s' already exists in the KAM store. Specify --%s to override.",
                                newKamName, LONG_OPT_NO_PRESERVE));
                    }
                }
                final KamDbObject updated =
                        new KamDbObject(kamInfo.getId(), newKamName,
                                kamInfo.getDescription(),
                                kamInfo.getLastCompiled(),
                                kamInfo.getSchemaName());
                kamCatalogDao.saveToCatalog(updated);
            } else {
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.