Package lupos.engine.operators.index.adaptedRDF3X

Examples of lupos.engine.operators.index.adaptedRDF3X.SixIndices


        size = FastRDF3XIndexConstruction.mergeRuns(dir, listOfTries.size(), primaryPos, other_condition1, other_condition2);
        size = FastRDF3XIndexConstruction.mergeRuns(dir, listOfTries.size(), primaryPos, other_condition2, other_condition1);
      }

      // generate indices (evaluation indices plus histogram indices)
      final SixIndices indices = new SixIndices(defaultGraphs.iterator().next());

      for(int primaryPos=0; primaryPos<3; primaryPos++) {
        final int other_condition1 = (primaryPos==0)?1:0;
        final int other_condition2 = (primaryPos==2)?1:2;
        final CollationOrder order1 = CollationOrder.valueOf(FastRDF3XIndexConstruction.map[primaryPos] + FastRDF3XIndexConstruction.map[other_condition1] + FastRDF3XIndexConstruction.map[other_condition2]);
        final String prefixFilename = dir + FastRDF3XIndexConstruction.map[primaryPos] + "_Final_Run_";
        indices.generate(order1, new GeneratorFromFinalRun(prefixFilename + FastRDF3XIndexConstruction.map[other_condition1] + FastRDF3XIndexConstruction.map[other_condition2], size, primaryPos, other_condition1, other_condition2));
        indices.generateStatistics(order1);

        final CollationOrder order2 = CollationOrder.valueOf(FastRDF3XIndexConstruction.map[primaryPos] + FastRDF3XIndexConstruction.map[other_condition2] + FastRDF3XIndexConstruction.map[other_condition1]);
        indices.generate(order2, new GeneratorFromFinalRun(prefixFilename + FastRDF3XIndexConstruction.map[other_condition2] + FastRDF3XIndexConstruction.map[other_condition1], size, primaryPos, other_condition2, other_condition1));
        indices.generateStatistics(order2);
      }

      indices.constructCompletely();

      // write out index info

      final OutputStream out = new BufferedOutputStream(new FileOutputStream(writeindexinfo));

      BufferManager.getBufferManager().writeAllModifiedPages();

      OutHelper.writeLuposInt(lupos.datastructures.paged_dbbptree.DBBPTree.getCurrentFileID(), out);

      ((lupos.datastructures.paged_dbbptree.DBBPTree) ((StringIntegerMapJava) LazyLiteral.getHm()).getOriginalMap()).writeLuposObject(out);
      ((StringArray) LazyLiteral.getV()).writeLuposStringArray(out);
      OutHelper.writeLuposInt(1, out);
      LiteralFactory.writeLuposLiteral(defaultGraphs.iterator().next(), out);
      indices.writeIndexInfo(out);
      OutHelper.writeLuposInt(0, out);
      out.close();
      final Date end = new Date();
      log.debug("_______________________________________________________________");
      log.info("Done, RDF3X index constructed!");
      log.debug("End time: {}", end);

      log.debug("Used time: {}", new TimeInterval(start, end));
      log.debug("Number of imported triples: {}", indices.getIndex(CollationOrder.SPO).size());
    } catch (final Exception e) {
      log.error(e.getMessage(), e);
    }
  }
View Full Code Here


//      };
//
//      new GenerateIDTriplesUsingStringSearch2(rdfURL, dataFormat,
//          interTripleConsumer);

      final Indices indices = new SixIndices(defaultGraphs.iterator().next());
      new GenerateIDTriplesUsingStringSearch2(defaultGraphs, dataFormat, indices);

      // write out index info

      final OutputStream out = new BufferedOutputStream(new FileOutputStream(writeindexinfo));
      indices.constructCompletely();

      OutHelper.writeLuposInt(lupos.datastructures.paged_dbbptree.DBBPTree.getCurrentFileID(), out);

      ((lupos.datastructures.paged_dbbptree.DBBPTree) ((StringIntegerMapJava) LazyLiteral.getHm()).getOriginalMap()).writeLuposObject(out);
      ((StringArray) LazyLiteral.getV()).writeLuposStringArray(out);
      OutHelper.writeLuposInt(1, out);
      LiteralFactory.writeLuposLiteral(defaultGraphs.iterator().next(), out);
      indices.writeIndexInfo(out);
      OutHelper.writeLuposInt(0, out);
      out.close();
      final Date end = new Date();
      log.debug("_______________________________________________________________");
      log.info("Done, RDF3X index constructed!");
View Full Code Here

      final URILiteral defaultGraph = new StringURILiteral("<http://localhost/default>");
      // just for inserting it into the codemap:
      defaultGraph.createThisLiteralNew();

      final Indices indices = new SixIndices(defaultGraph, true);

      // write out index info

      final OutputStream out = new BufferedOutputStream(new FileOutputStream(writeindexinfo));
      indices.constructCompletely();
      BufferManager.getBufferManager().writeAllModifiedPages();

      OutHelper.writeLuposInt(lupos.datastructures.paged_dbbptree.DBBPTree.getCurrentFileID(), out);

      ((lupos.datastructures.paged_dbbptree.DBBPTree) ((StringIntegerMapJava) LazyLiteral.getHm()).getOriginalMap()).writeLuposObject(out);
      ((StringArray) LazyLiteral.getV()).writeLuposStringArray(out);
      OutHelper.writeLuposInt(1, out);
      LiteralFactory.writeLuposLiteral(defaultGraph, out);
      indices.writeIndexInfo(out);
      OutHelper.writeLuposInt(0, out);
      out.close();
      final Date end = new Date();
      log.debug("_______________________________________________________________");
      log.info("Done, RDF3X index constructed!");
View Full Code Here

          this.opt,
          new Dataset.IndicesFactory() {
                @Override
                public Indices createIndices(
                    final URILiteral uriLiteral) {
                  return new SixIndices(uriLiteral, false);
                }

                @Override
                public lupos.engine.operators.index.Root createRoot() {
                  final RDF3XRoot ic = new RDF3XRoot();
                  ic.dataset = RDF3XQueryEvaluator.this.dataset;
                  return ic;
                }
              }, in);
      in.close();
      timeUsed = ((new Date()).getTime() - a.getTime());
    } else {
      this.dataset = new Dataset(
          defaultGraphs,
          namedGraphs,
          this.type,
          this.getMaterializeOntology(),
          this.opt,
          new Dataset.IndicesFactory() {
                @Override
                public Indices createIndices(
                    final URILiteral uriLiteral) {
                  return new SixIndices(uriLiteral);
                }

                @Override
                public lupos.engine.operators.index.Root createRoot() {
                  final RDF3XRoot ic = new RDF3XRoot();
View Full Code Here

          this.opt,
          new Dataset.IndicesFactory() {
                @Override
                public Indices createIndices(
                    final URILiteral uriLiteral) {
                  return new SixIndices(uriLiteral, false);
                }

                @Override
                public lupos.engine.operators.index.Root createRoot() {
                  final RDF3XRoot ic = new RDF3XRoot();
                  ic.dataset = RDF3XQueryEvaluator.this.dataset;
                  return ic;
                }
              }, in);
      in.close();
      timeUsed = ((new Date()).getTime() - a.getTime());
    } else {
      this.dataset = new Dataset(
          defaultGraphs,
          namedGraphs,
          this.getMaterializeOntology(),
          this.type,
          this.opt,
          new Dataset.IndicesFactory() {
                @Override
                public Indices createIndices(
                    final URILiteral uriLiteral) {
                  return new SixIndices(uriLiteral);
                }

                @Override
                public lupos.engine.operators.index.Root createRoot() {
                  final RDF3XRoot ic = new RDF3XRoot();
View Full Code Here

            BasicIndexScan.MERGEJOIN,
            new Dataset.IndicesFactory() {
              @Override
              public Indices createIndices(
                  final URILiteral uriLiteral) {
                return new SixIndices(uriLiteral);
              }

              @Override
              public lupos.engine.operators.index.Root createRoot() {
                return new lupos.engine.operators.index.adaptedRDF3X.RDF3XRoot();
View Full Code Here

TOP

Related Classes of lupos.engine.operators.index.adaptedRDF3X.SixIndices

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.