Package org.openrdf.query.parser.serql.ast

Examples of org.openrdf.query.parser.serql.ast.ASTNodeElem


  @Override
  public Object visit(ASTNode node, Object data)
    throws VisitorException
  {
    if (node.jjtGetNumChildren() == 0) {
      ASTNodeElem nodeElem = createNodeElem();
      nodeElem.jjtSetParent(node);
      node.jjtAppendChild(nodeElem);
    }

    return super.visit(node, data);
  }
View Full Code Here


  public Object visit(ASTReifiedStat node, Object data)
    throws VisitorException
  {
    if (node.jjtGetChild(0) instanceof ASTEdge) {
      // subject node is missing
      ASTNodeElem nodeElem = createNodeElem();
      nodeElem.jjtSetParent(node);
      node.jjtInsertChild(nodeElem, 0);
    }

    if (node.jjtGetNumChildren() <= 2) {
      // object node is missing
      ASTNodeElem nodeElem = createNodeElem();
      nodeElem.jjtSetParent(node);
      node.jjtAppendChild(nodeElem);
    }

    if (node.getID() == null) {
      node.setID(createAnonymousVar());
View Full Code Here

    return super.visit(node, data);
  }

  private ASTNodeElem createNodeElem() {
    ASTNodeElem nodeElem = new ASTNodeElem(SyntaxTreeBuilderTreeConstants.JJTNODEELEM);

    ASTVar var = createAnonymousVar();
    var.jjtSetParent(nodeElem);
    nodeElem.jjtAppendChild(var);

    return nodeElem;
  }
View Full Code Here

  @Override
  public Object visit(ASTNode node, Object data)
    throws VisitorException
  {
    if (node.jjtGetNumChildren() == 0) {
      ASTNodeElem nodeElem = createNodeElem();
      nodeElem.jjtSetParent(node);
      node.jjtAppendChild(nodeElem);
    }

    return super.visit(node, data);
  }
View Full Code Here

  public Object visit(ASTReifiedStat node, Object data)
    throws VisitorException
  {
    if (node.jjtGetChild(0) instanceof ASTEdge) {
      // subject node is missing
      ASTNodeElem nodeElem = createNodeElem();
      nodeElem.jjtSetParent(node);
      node.jjtInsertChild(nodeElem, 0);
    }

    if (node.jjtGetNumChildren() <= 2) {
      // object node is missing
      ASTNodeElem nodeElem = createNodeElem();
      nodeElem.jjtSetParent(node);
      node.jjtAppendChild(nodeElem);
    }
   
    if (node.getID() == null) {
      node.setID(createAnonymousVar());
View Full Code Here

    return super.visit(node, data);
  }

  private ASTNodeElem createNodeElem() {
    ASTNodeElem nodeElem = new ASTNodeElem(SyntaxTreeBuilderTreeConstants.JJTNODEELEM);
   
    ASTVar var = createAnonymousVar();
    var.jjtSetParent(nodeElem);
    nodeElem.jjtAppendChild(var);
   
    return nodeElem;
  }
View Full Code Here

TOP

Related Classes of org.openrdf.query.parser.serql.ast.ASTNodeElem

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.