Examples of SimpleNode


Examples of lupos.sparql1_1.SimpleNode

    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

Examples of lupos.sparql1_1.SimpleNode

      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

Examples of lupos.sparql1_1.SimpleNode

    }
  }

  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

Examples of lupos.sparql1_1.SimpleNode

  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

Examples of lupos.sparql1_1.SimpleNode

      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

Examples of lupos.sparql1_1.SimpleNode

    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

Examples of lupos.sparql1_1.SimpleNode

  }

  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

Examples of ognl.SimpleNode

        Ognl.setValue(tree, context, root, value);
    }

    private boolean isEvalExpression(Object tree, Map<String, Object> context) throws OgnlException {
        if (tree instanceof SimpleNode) {
            SimpleNode node = (SimpleNode) tree;
            OgnlContext ognlContext = null;

            if (context!=null && context instanceof OgnlContext) {
                ognlContext = (OgnlContext) context;
            }
            return node.isEvalChain(ognlContext);
        }
        return false;
    }
View Full Code Here

Examples of opennlp.ccgbank.parse.SimpleNode

      }
      else {
        CCGbankDerivation.ReInit(reader);
      }
     
      SimpleNode root = CCGbankDerivation.start();
      Element result = new Element("Derivation");
     
      String fileName = file.getName();
      int start = fileName.contains(File.separator)
        ? fileName.lastIndexOf(File.separatorChar) : 0;
View Full Code Here

Examples of org.adjective.syntactic.parser.ast.SimpleNode

            _stream.print(node.jjtGetFirstToken().image);
        }
        _stream.print('\n');
        for (int i = 0; i < node.jjtGetNumChildren(); i++)
        {
            SimpleNode child = getChild(node, i);
            print(child, prefix + "  ");
        }
    }
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.