Package lupos.datastructures.items

Examples of lupos.datastructures.items.Item


    try {

      // get the graph constraint from the super class.
      // If it is null, a default graph is used, if not null a named one
      // is used
      final Item graphConstraintItem = this.getGraphConstraint();

      // get a collection of indices using the determined graph constraint
      final Collection<Indices> indicesC = this.root.dataset.indexingRDFGraphs(
          graphConstraintItem, false, false, this.root);
      if ((indicesC != null) && !(indicesC.size() == 0)) {
View Full Code Here


        // get the graph constraint from the super class.
        // If it is null, a default graph is used, if not null a named
        // one
        // is used
        final Item graphConstraintItem = this.getGraphConstraint();

        // get a collection of indices using the determined graph
        // constraint
        final Collection<Indices> indicesC = this.root.dataset.indexingRDFGraphs(
            graphConstraintItem, false, false, this.root);
View Full Code Here

    }

    final HashMap<Variable, Literal> conditions = new HashMap<Variable, Literal>();
    final Item[] pat1Items = pat1.getItems();
    final Item[] pat2Items = pat2.getItems();
    Item i1;
    Item i2;
    for (int i = 0; i < 3; i++) {
      i1 = pat1Items[i];
      i2 = pat2Items[i];
      if ((!i1.isVariable()) && (i2.isVariable())) {
        conditions.put((Variable) i2, (Literal) i1);
      }
    }

    final GenerateAddEnv genAdd = new GenerateAddEnv(conditions, constants);
View Full Code Here

    else
      return null;
  }

  private boolean isSpecialCase(final Item[] general, final Item[] special) {
    Item ig;
    Item is;
    for (int i = 0; i < 3; i++) {
      ig = general[i];
      is = special[i];
      if (!ig.equals(is)) {
        if (!(ig.isVariable() && !is.isVariable())) {
          return false;
        }
      }
    }
    return true;
View Full Code Here

    return true;
  }

  private boolean replaceLitAddsExtras(final Item[] general,
      final Item[] special, final ReplaceLit replaceLit) {
    Item ig;
    Item is;
    for (int i = 0; i < 3; i++) {
      ig = general[i];
      is = special[i];
      if (!ig.equals(is)) {
        return replaceLit.contains(ig, is);
View Full Code Here

    // We split the plan at star-shaped joins!
    final HashMap<Item, LinkedList<LeafNodePlan>> starJoins = new HashMap<Item, LinkedList<LeafNodePlan>>();
    final HashMap<Item, LinkedList<LeafNodePlan>> helperStarJoins = new HashMap<Item, LinkedList<LeafNodePlan>>();
    for (final LeafNodePlan lnp : initialPlans) {
      TriplePattern tp = lnp.getTriplePatterns().iterator().next();
      final Item subject = tp.getPos(0);
      LinkedList<LeafNodePlan> list = starJoins.get(subject);
      if (list == null){
        list = new LinkedList<LeafNodePlan>();
     
      list.add(lnp);
      starJoins.put(subject, list);
      final Item predicate = tp.getPos(1);
      if (predicate instanceof Variable) {
        list = helperStarJoins.get(predicate);
        if (list == null)
          list = new LinkedList<LeafNodePlan>();
        list.add(lnp);
        helperStarJoins.put(predicate, list);
      }
      final Item object = tp.getPos(2);
      if (object instanceof Variable) {
        list = helperStarJoins.get(object);
        if (list == null)
          list = new LinkedList<LeafNodePlan>();
        list.add(lnp);
View Full Code Here

                .setX((int) this.visualGraphs.get(0).PADDING);
              }
            }
          } else {
            // it is an RDF term!
            final Item item = SPARQLCoreParserVisitorImplementation.getItem(child);

            rdfHash.put(
                item,
                new QueryRDFTerm(
                    ((VisualGraphOperatorWithPrefix) this.visualGraphs
View Full Code Here

  private Bindings addVariablesToBindings(Item[] items, Triple t) {
   
    Bindings b = bindingsFactory.createInstance();
    for (int i = 0; i < items.length; i++) {
      Item item = items[i];
      if (item.getClass() == Variable.class) {
        Variable v = (Variable) item;
        b.add(v, t.getPos(i));

      } else {
        if (t.getPos(i)
View Full Code Here

  }

  private Bindings addVariablesToBindings(Item[] items, Triple t) {
    Bindings b = this.bindings.createInstance();
    for (int i = 0; i < items.length; i++) {
      Item item = items[i];
      if (item.getClass() == Variable.class) {
        Variable v = (Variable) item;
        b.add(v, t.getPos(i));

      } else {
        if (t.getPos(i)
View Full Code Here

  }

  private Bindings addVariablesToBindings(Item[] items, Triple t) {
    Bindings b = this.bindings.createInstance();
    for (int i = 0; i < items.length; i++) {
      Item item = items[i];
      if (item.getClass() == Variable.class) {
        Variable v = (Variable) item;
        b.add(v, t.getPos(i));

      } else {
        if (t.getPos(i)
View Full Code Here

TOP

Related Classes of lupos.datastructures.items.Item

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.