Package lupos.gui.operatorgraph.visualeditor.operators

Examples of lupos.gui.operatorgraph.visualeditor.operators.OperatorContainer


    this.handleWhereClause(node, c);

    this.handleDatasetClause(node, c);
    this.handleSolutionModifier(node, c);

    final OperatorContainer constructTemplateOp = (OperatorContainer) node
    .jjtGetChild(0).jjtAccept(this, data);
    c.addSucceedingOperator(new OperatorIDTuple<Operator>(constructTemplateOp, 0));

    return c;
  }
View Full Code Here


    connectionMode.setConnectionContent(predicateItem);
    connectionMode.addOperator(subjectOp);
    connectionMode.addOperator(this.op);

    // sort elements of the outer reference...
    final OperatorContainer opContainer = (OperatorContainer) this.queryGraph.outerReference
        .getOperator();

    if (opContainer.getOperators().contains(this.op))
      opContainer.removeOperator(this.op);

    opContainer.addOperator(subjectOp);

    this.queryGraph.arrange(Arrange.values()[0]);
  }
View Full Code Here

        .getParentQG(), queryResult_preceding, queryResult_succeeding,
        op, makeSuggestionSOVar, makeSuggestionPredVar);
  }

  private String getQueryForSuggestions(final Operator op) {
    final OperatorContainer outerReference = op.getParentContainer();

    if (outerReference != null) {
      final String query = outerReference.serializeOperatorAndTree(
          new HashSet<Operator>()).toString();

      return this.findParentNodes(outerReference, query);
    }
View Full Code Here

            this.visualGraphs.get(0).addOperator(graphBox.getX(),
                rowY, newOp);

            // TODO: update x position of last box...
            if (data instanceof OperatorContainer) {
              final OperatorContainer tc = (OperatorContainer) data;

              ((ContainerPanel) tc.getGUIComponent()).arrange(Arrange.values()[0]);

              if (tc.getGUIComponent().getLocation().x < 0) {
                this.visualGraphs
                .get(0)
                .getBoxes()
                .get(new GraphWrapperOperator(tc))
                .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
                        .get(0)).prefix, item));
          }
        }

        if (result.size() == 1
            && result.get(0) instanceof OperatorContainer) {
          final OperatorContainer tc = (OperatorContainer) result
          .get(0);

          final LinkedHashSet<Operator> hop = new LinkedHashSet<Operator>();

          for (final Operator op : tc.getOperators()) {
            hop.add(op);

            op.visit(new SimpleOperatorGraphVisitor() {
              private static final long serialVersionUID = -350730291684630002L;

              public Object visit(final Operator basicOperator) {
                hop.add(basicOperator);

                return null;
              }
            });
          }

          for (final Operator op : rdfHash.values()) {
            if (!hop.contains(op)) {
              tc.addOperator(op);

              op.setParents();
            }
          }

          ((ContainerPanel) tc.getGUIComponent()).arrange(Arrange.values()[0]);

          if (tc.getGUIComponent().getLocation().x < 0) {
            this.visualGraphs.get(0).getBoxes()
            .get(new GraphWrapperOperator(tc))
            .setX((int) this.visualGraphs.get(0).PADDING);
          }
        } else if (rdfHash.size() > 0) {
          // only single RDF terms are pasted...
          // => collect them in a TripleContainer!
          final LinkedHashSet<Operator> lhso = new LinkedHashSet<Operator>();
          lhso.addAll(rdfHash.values());

          final TripleContainer tc = new TripleContainer(lhso);
          tc.setParents();

          final GraphBox graphBox = this.visualGraphs.get(0).graphBoxCreator.createGraphBox(
              this.visualGraphs.get(0), new GraphWrapperOperator(
                  tc));
          graphBox.setY(rowY);
          graphBox.arrange(Arrange.values()[0]);

          this.visualGraphs.get(0).addOperator(graphBox.getX(), rowY,
              tc);

          ((ContainerPanel) tc.getGUIComponent()).arrange(Arrange.values()[0]);

          if (tc.getGUIComponent().getLocation().x < 0) {
            this.visualGraphs.get(0).getBoxes()
            .get(new GraphWrapperOperator(tc))
            .setX((int) this.visualGraphs.get(0).PADDING);
          }
        }
View Full Code Here

TOP

Related Classes of lupos.gui.operatorgraph.visualeditor.operators.OperatorContainer

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.