Package org.openbel.framework.core.indexer

Examples of org.openbel.framework.core.indexer.JDBMNamespaceLookup.lookup()


            final String fmt = "Namespace '%s' is not open.";
            final String msg = String.format(fmt, resourceLocation);
            throw new IndexingFailure(resourceLocation, msg);
        }

        String encoding = il.lookup(p.getValue());

        if (encoding == null) {
            String rl = ns.getResourceLocation();
            String pref = ns.getPrefix();
            throw new NamespaceSyntaxWarning(rl, pref, p.getValue());
View Full Code Here


        JDBMNamespaceLookup il = openNamespaces.get(ns.getResourceLocation());
        if (il == null) {
            throw new IllegalStateException("namespace index is not open.");
        }

        String encoding = il.lookup(p.getValue());
        if (encoding == null) {
            throw new NamespaceSyntaxWarning(ns.getResourceLocation(),
                    ns.getPrefix(),
                    p.getValue());
        }
View Full Code Here

            JDBMNamespaceLookup jdbmLookup =
                    new JDBMNamespaceLookup(indexPath.getAbsolutePath());
            jdbmLookup.open();

            assertEquals(1, jdbmLookup.getRecordCount());
            assertEquals(value, jdbmLookup.lookup("1"));

            jdbmLookup.close();
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
View Full Code Here

            JDBMNamespaceLookup jdbmLookup =
                    new JDBMNamespaceLookup(indexPath.getAbsolutePath());
            jdbmLookup.open();

            assertEquals(1, jdbmLookup.getRecordCount());
            assertNull(jdbmLookup.lookup("0"));

            jdbmLookup.close();
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
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.