Examples of TripleComparator


Examples of lupos.datastructures.items.TripleComparator

    final int order = in.read();
    if (order < 0) {
      return null;
    }
    final Triple t = InputHelper.readLuposTriple(previousTriple, in);
    return new TripleKey(t, new TripleComparator((byte) order));
  }
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

    super(new DBMergeSortedSet<BindingsArrayReadTriples>(new SortConfiguration(),
        new Comparator<BindingsArrayReadTriples>() {

          public int compare(final BindingsArrayReadTriples arg0,
              final BindingsArrayReadTriples arg1) {
            final TripleComparator tc = new TripleComparator(
                RDF3XIndexScan.CollationOrder.SPO);
            final Iterator<Triple> it0 = arg0.getTriples()
                .iterator();
            final Iterator<Triple> it1 = arg1.getTriples()
                .iterator();
            while (it0.hasNext()) {
              if (!it1.hasNext())
                return -1;
              final Triple t0 = it0.next();
              final Triple t1 = it1.next();
              final int compare = tc.compare(t0, t1);
              if (compare != 0)
                return compare;
            }
            if (it1.hasNext())
              return 1;
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

      return LengthHelper.lengthLuposByte();
    }

    @Override
    public void serialize(final Comparator<Triple> t, final OutputStream out) throws IOException {
      final TripleComparator tc = (TripleComparator) t;
      OutHelper.writeLuposByte(tc.getBytePattern(), out);
    }
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

      OutHelper.writeLuposByte(tc.getBytePattern(), out);
    }

    @Override
    public Comparator<Triple> deserialize(final InputStream in) throws IOException, URISyntaxException, ClassNotFoundException {
      return new TripleComparator(InputHelper.readLuposByte(in));
    }
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

                    objectIsLazyLiteralOriginalContent));
          }
          break;
        }
      }
      return new InnerNodeEntry(new TripleKey(t, new TripleComparator(
          this.order)), fileName, numberOfTriples, numberDistinctSubjects,
          numberDistinctPredicates, numberDistinctObjects,
          subjectDifferentFromPreviousTriple,
          predicateDifferentFromPreviousTriple,
          objectDifferentFromPreviousTriple);
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

            tertiary = innerNode.getFirst().getTripleComparator()
                .getTertiary();
          }
        }
        final TripleKey key = new TripleKey(lastTriple,
            new TripleComparator(primary, secondary, tertiary));
        while (innerNode.getFirst().compareTo(key) < 0) {
          final InnerNodeEntry ine = LazyLiteralTripleKeyDBBPTreeStatistics.this.getNextInnerNodeEntryStatistics(
              innerNode.getFirst(), innerNode.getSecond());
          if (ine == null) {
            try {
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

          final COMPARE primary = nextEntry.key.getTripleComparator()
              .getPrimary();
          final COMPARE secondary = COMPARE.NONE;
          final COMPARE tertiary = COMPARE.NONE;
          final TripleKey key = new TripleKey(lastTriple,
              new TripleComparator(primary, secondary, tertiary));
          while (true) {
            if (nextEntry == null || nextEntry.fileName <= 0) {
              in.close();
              this.close();
              this.next = null;
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

            break;
          }
        }
      }
      return new DBBPTreeEntry<TripleKey, Triple>(new TripleKey(t,
          new TripleComparator(this.order)), t, filenameOfNextLeafNode);
    } catch (final FileNotFoundException e) {
      e.printStackTrace();
      System.err.println(e);
    } catch (final IOException e) {
    }
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

          }
          break;
        }
      }
      return new Tuple<TripleKey, Integer>(new TripleKey(t,
          new TripleComparator(this.order)), fileName);
    } catch (final FileNotFoundException e) {
      e.printStackTrace();
      System.err.println(e);
    } catch (final IOException e) {
      // just ignore...
View Full Code Here

Examples of lupos.datastructures.items.TripleComparator

          }
          break;
        }
      }
      return new Tuple<TripleKey, Integer>(new TripleKey(t,
          new TripleComparator(this.order)), fileName);
    } catch (final FileNotFoundException e) {
      e.printStackTrace();
      System.err.println(e);
    } catch (final IOException e) {
    }
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.