Package com.google.common.collect

Examples of com.google.common.collect.BstTesting$SimpleNode


    visited.add(this);

    try {
      HashSet<Variable> variables = new HashSet<Variable>();

      SimpleNode node = SPARQL1_1Parser.parseFilter("FILTER(" + this.filterExpression + ")", this.prefix.getPrefixNames());

      Operator.computeUsedVariables(node, variables);

      if(variables.contains(new Variable(variable)))
        return true;
View Full Code Here


    this.item = item;
  }

  public void addPredicate(RDFTerm child, String predicate) throws ModificationException {
    try {
      SimpleNode node = SPARQL1_1Parser.parseVerb(predicate, this.prefix.getPrefixNames());

      this.addPredicate(child, this.getItem(node));
    }
    catch(Throwable t) {
      this.handleParseError(t);
View Full Code Here

      if(this.predicates.get(child).size() == index) {
        this.predicates.get(child).add(null);
      }

      // parse new value...
      SimpleNode node = SPARQL1_1Parser.parseVerb(predicate, this.prefix.getPrefixNames());

      // remove old value...
      if(this.predicates.get(child).get(index) != null) {
        this.predicates.get(child).remove(index);
      }
View Full Code Here

    }
  }

  public void applyChange(String value) throws ModificationException {
    try {
      SimpleNode node = SPARQL1_1Parser.parseRDFTerm(value, this.prefix.getPrefixNames());

      this.item = this.getItem(node);
    }
    catch(Throwable t) {
      this.handleParseError(t);
View Full Code Here

  protected abstract SimpleNode parseProjectionElement(String projectionElement) throws Throwable;

  public void addProjectionElement(String projectionElement) throws ModificationException {
    try {
      SimpleNode node = this.parseProjectionElement(projectionElement);

      if(node instanceof ASTVar) {
        this.projectionElements.add(((ASTVar) node).toQueryString());
      }
      else if(node instanceof ASTQuotedURIRef) {
View Full Code Here

      if(this.projectionElements.size() == index) {
        this.projectionElements.add("");
      }

      // parse new value
      SimpleNode node = this.parseProjectionElement(projectionElement);

      // remove old value...
      if(this.projectionElements.get(index) != null) {
        this.projectionElements.remove(index);
      }
View Full Code Here

    return this.panel;
  }

  public void applyChange(String value) throws ModificationException {
    try {
      SimpleNode node = SPARQL1_1Parser.parseVarOrBlankNodeOrIRIref(value, this.prefix.getPrefixNames());

      this.graphItem = this.getItem(node);
    }
    catch(Throwable t) {
      this.handleParseError(t);
View Full Code Here

  }

  private Operator parseQuery(final String query) throws Throwable {
    this.statusBar.setText("Parsing query ...");

    SimpleNode root = SPARQL1_1Parser.parse(query); // get root node...

    ((VisualGraphOperatorWithPrefix) this.visualGraphs.get(0)).prefix
    .registerElementsInPrefixInstance(root);

    // get coreSPARQL query...
    final boolean[] rules = { true, true, true, true, true, true, true,
        true, true, true, true, true, true, true, false , true, true, true};

    final SPARQL2CoreSPARQLParserVisitorImplementationDumper spvid = SPARQL2CoreSPARQLParserVisitorImplementationDumper.createInstance(rules);
    final String corequery = spvid.visit(root);

    // get root node of coreSPARQL query...
    root = SPARQL1_1Parser.parse(corequery);

    // generate VisualQuery and get root element of it...
    final VisualQueryGenerator vqg = new VisualQueryGenerator(
        ((VisualGraphOperatorWithPrefix) this.visualGraphs.get(0)).prefix);

    final Operator rootNode = (Operator) root.jjtAccept(
        (SPARQL1_1ParserVisitor) vqg, null);
    rootNode.setParents();

    this.statusBar.clear();
View Full Code Here

    this.operator = operator;
  }

  public void getUsedVariables(HashSet<Variable> variables) {
    try {
      SimpleNode node = SPARQL1_1Parser.parseOrderCondition(this.sortString, this.prefix.getPrefixNames());

      Operator.computeUsedVariables(node, variables);
    }
    catch(ParseException e) {
      e.printStackTrace();
View Full Code Here

    this.item = item;
  }

  public void addPredicate(RDFTerm child, String predicate) throws ModificationException {
    try {
      SimpleNode node = SPARQL1_1Parser.parseVerbWithoutVar(predicate, this.prefix.getPrefixNames());

      this.addPredicate(child, this.getItem(node));
    }
    catch(Throwable t) {
      this.handleParseError(t);
View Full Code Here

TOP

Related Classes of com.google.common.collect.BstTesting$SimpleNode

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.