Package net.yacy.cora.document

Examples of net.yacy.cora.document.JSONArray


            // iterate over all references
            final Iterator<String> termIterator = idx.keys();
            String term;
            while (termIterator.hasNext()) {
                term = termIterator.next();
                final JSONArray references = idx.getJSONArray(term);
                // iterate until we get an exception or null
                int c = 0;
                String reference;
                final ReferenceContainer<HostReference> referenceContainer = new ReferenceContainer<HostReference>(WebStructureGraph.hostReferenceFactory, UTF8.getBytes(term));
                try {
                    while ((reference = references.getString(c++)) != null) {
                        //System.out.println("REFERENCE: " + reference);
                        referenceContainer.add(new HostReference(reference));
                    }
                } catch (final JSONException e) {} // this finishes the iteration
                index.add(referenceContainer);
View Full Code Here


            // iterate over all references
            final Iterator<String> termIterator = idx.keys();
            String term;
            while (termIterator.hasNext()) {
                term = termIterator.next();
                final JSONArray references = idx.getJSONArray(term);
                // iterate until we get an exception or null
                int c = 0;
                String reference;
                final ReferenceContainer<HostReference> referenceContainer = new ReferenceContainer<HostReference>(WebStructureGraph.hostReferenceFactory, UTF8.getBytes(term));
                try {
                    while ((reference = references.getString(c++)) != null) {
                        //System.out.println("REFERENCE: " + reference);
                        referenceContainer.add(new HostReference(reference));
                    }
                } catch (final JSONException e) {} // this finishes the iteration
                index.add(referenceContainer);
View Full Code Here

TOP

Related Classes of net.yacy.cora.document.JSONArray

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.