Package org.jrdf.graph.global.molecule.mem

Examples of org.jrdf.graph.global.molecule.mem.MoleculeTraverserImpl


        this.moleculeComparator = new MoleculeHeadTripleComparatorImpl(comparator);
        this.handler = new MoleculeGraphHandlerImpl(nodePool, readableIndex, moleculeComparator);
    }

    public void add(Molecule molecule) {
        MoleculeTraverser traverser = new MoleculeTraverserImpl();
        traverser.traverse(molecule, new AddMoleculeToIndex(writableIndex, localizer));
    }
View Full Code Here


    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        MoleculeTraverser traverser = new MoleculeTraverserImpl();
        try {
            ClosableIterator<Molecule> iterator = iterator();
            try {
                MoleculeHandler tmpHandler = new MoleculeToText(builder, localizer.getLocalizer());
                while (iterator.hasNext()) {
                    Molecule molecule = iterator.next();
                    traverser.traverse(molecule, tmpHandler);
                }
                return builder.toString();
            } finally {
                iterator.close();
            }
View Full Code Here

TOP

Related Classes of org.jrdf.graph.global.molecule.mem.MoleculeTraverserImpl

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.