Package lupos.datastructures.dbmergesortedds

Examples of lupos.datastructures.dbmergesortedds.SortConfiguration


                final DBBPTree<TripleKey, Triple> dbbptree = new DBBPTree<TripleKey, Triple>(k, k_, nodeDeSerializer, TripleKey.class, Triple.class);

                dbbptree.setName(order.toString());

                return new OptimizedDBBPTreeGeneration<TripleKey, Triple>(new DBMergeSortedMap<TripleKey, Triple>(new SortConfiguration(), (Class<lupos.datastructures.dbmergesortedds.MapEntry<TripleKey, Triple>>) (new lupos.datastructures.dbmergesortedds.MapEntry<TripleKey, Triple>(null, null)).getClass()), dbbptree);
            } else {
        return new PrefixSearchFromSortedMap<TripleKey, Triple>(new TreeMap<TripleKey, Triple>(new TripleKeyComparator(new TripleComparator(order))));
      }

        } catch (final IOException e) {
View Full Code Here


                  dataset.waitForCodeMapConstruction();
                  final Collection<URILiteral> graphURIs = new LinkedList<URILiteral>();
                    new RDF3XIndexConstruction.GenerateIDTriplesUsingStringSearch2(graphURIs, dataFormat, this);
                } else {
                    final SortedSet<Triple> dsst_s;
                    dsst_s = new DBMergeSortedSet<Triple>(new SortConfiguration(), new TripleComparatorCompareStringRepresentationsOrCodeOfLazyLiteral(CollationOrder.SPO), Triple.class);
                    try {
                        CommonCoreQueryEvaluator.readTriples(dataFormat, graphURI.openStream(), new TripleConsumer() {

                            @Override
                            public void consume(final Triple triple) {
                                dsst_s.add(triple);
                            }

                        });
                    } catch (final IOException e) {
                        System.err.println(e);
                        e.printStackTrace();
                    }
                    final SortedSet<Triple> dsst_p;
                    dsst_p = new DBMergeSortedSet<Triple>(new SortConfiguration(), new TripleComparatorCompareStringRepresentationsOrCodeOfLazyLiteral(CollationOrder.PSO), Triple.class);
                    ((DBMergeSortedSet<Triple>) dsst_s).sort();
                    dataset.waitForCodeMapConstruction();
                    this.makeLazyLiteral(0, dsst_s, dsst_p);
                    if (dsst_s instanceof DBMergeSortedSet) {
            ((DBMergeSortedSet) dsst_s).release();
          }
                    final SortedSet<Triple> dsst_o;
                    dsst_o = new DBMergeSortedSet<Triple>(new SortConfiguration(), new TripleComparatorCompareStringRepresentationsOrCodeOfLazyLiteral(CollationOrder.OPS), Triple.class);
                    this.makeLazyLiteral(1, dsst_p, dsst_o);
                    if (dsst_p instanceof DBMergeSortedSet) {
            ((DBMergeSortedSet) dsst_p).release();
          }
                    this.makeLazyLiteral(2, dsst_o, this);
View Full Code Here

      this.codeMapConstructionThread = new Thread() {
        @Override
        public void run() {
          final SortedSet<String> rdftermsRepresentations = (SortingApproach == SORT.NORMAL) ? new DBMergeSortedSet<String>(
              new SortConfiguration(), String.class)
              : new DBMergeSortedSetUsingTrie(
                  new SortConfiguration(), String.class);

              if(toAddToRdftermsRepresentations!=null){
                for(final String s: toAddToRdftermsRepresentations){
                  rdftermsRepresentations.add(s);
                }
View Full Code Here

    final int size = InputHelper.readLuposInt(this.is);
    if (size < 0) {
      return null;
    }
    if (size == 0){
      final SortConfiguration sortConfiguration = new SortConfiguration();
      sortConfiguration.useReplacementSelection(2, 2);
      return (E) new DBMergeSortedSet(sortConfiguration, comparator, null);
    }
    final Class type = Registration.deserializeId(this)[0];
    final SortedSet ms;
    if (size < memoryLimit) {
      if (type == Triple.class) {
        ms = new TreeSet<Triple>(comparator);
      } else {
        ms = new TreeSet(comparator);
      }
    } else {
      final SortConfiguration sortConfiguration = new SortConfiguration();
      sortConfiguration.useReplacementSelection(2, 2);

      if (type == Triple.class) {
        ms = new DBMergeSortedSet(sortConfiguration, comparator, Triple.class);
      } else {
        ms = new DBMergeSortedSet(sortConfiguration, comparator, null);
View Full Code Here

    final int size = InputHelper.readLuposInt(this.is);
    if (size < 0) {
      return null;
    }

    final SortConfiguration sortConfiguration = new SortConfiguration();
    sortConfiguration.useReplacementSelection(2, 2);

    final DBMergeSortedMap ms = new DBMergeSortedMap(sortConfiguration, comparator, null);
    if (size == 0) {
      return (E) ms;
    }
View Full Code Here

import lupos.engine.operators.index.adaptedRDF3X.RDF3XIndexScan;

public class DBSetBlockingDistinct extends BlockingDistinct {

  public DBSetBlockingDistinct() throws RemoteException {
    super(new DBMergeSortedSet<BindingsArrayReadTriples>(new SortConfiguration(),
        new Comparator<BindingsArrayReadTriples>() {

          public int compare(final BindingsArrayReadTriples arg0,
              final BindingsArrayReadTriples arg1) {
            final TripleComparator tc = new TripleComparator(
View Full Code Here

import lupos.datastructures.queryresult.ParallelIterator;

public class DBSetBlockingDistinct extends BlockingDistinct {

  public DBSetBlockingDistinct() {
    super(new DBMergeSortedSet<Bindings>(new SortConfiguration(), Bindings.class));
  }
View Full Code Here

TOP

Related Classes of lupos.datastructures.dbmergesortedds.SortConfiguration

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.