Package org.dbwiki.data.query.xpath

Examples of org.dbwiki.data.query.xpath.XPath


    } else {
      pathElement = new XPathComponent(entity);
    }
   
    if (pathTokens.hasNext()) {
      return new XPath(pathElement, new RelativeTargetPathGenerator().getTargetPath(entity, versionIndex, pathTokens));
    } else {
      return new XPath(pathElement);
    }
  }
View Full Code Here


    Vector<XAQLToken> fromClauseTokens = token.children();
    int iToken = 0;
   
      String variableName = fromClauseTokens.get(iToken++).value();
      XPath archiveTargetPath = null;
      if (fromClauseTokens.size() > iToken) {
        if (fromClauseTokens.get(iToken).type() == XAQLToken.RELATIVE_TARGET_PATH) {
          archiveTargetPath = new AbsoluteTargetPathGenerator().getTargetPath(schemaRoot, versionIndex, fromClauseTokens.get(iToken++).children().iterator());
        } else {
            archiveTargetPath = new AbsoluteTargetPathGenerator().getTargetPath(schemaRoot, versionIndex);
        }
      } else {
        archiveTargetPath = new AbsoluteTargetPathGenerator().getTargetPath(schemaRoot, versionIndex);
      }
      QueryVariable rootVariable = new QueryVariable(variableName, archiveTargetPath);
      QueryVariableListing variableListing = new QueryVariableListing(rootVariable);
     
      while (iToken < fromClauseTokens.size()) {
        variableName = fromClauseTokens.get(iToken++).value();
        QueryVariable parent = variableListing.get(fromClauseTokens.get(iToken).children().firstElement().value());
        XPath targetPath = new VariableTargetPathGenerator().getTargetPath(parent.targetEntity(), versionIndex, fromClauseTokens.get(iToken++).children().iterator()); //should order matter??YES
        QueryVariable variable = new QueryVariable(variableName, targetPath);
        parent.children().add(variable);
        variableListing.add(variable);
      }
      return new FromClause(rootVariable, variableListing);
View Full Code Here

      QueryVariableListing variableListing = new QueryVariableListing(rootVariable);
     
      while (iToken < fromClauseTokens.size()) {
        variableName = fromClauseTokens.get(iToken++).value();
        QueryVariable parent = variableListing.get(fromClauseTokens.get(iToken).children().firstElement().value());
        XPath targetPath = new VariableTargetPathGenerator().getTargetPath(parent.targetEntity(), versionIndex, fromClauseTokens.get(iToken++).children().iterator());
        QueryVariable variable = new QueryVariable(variableName, targetPath);
        parent.children().add(variable);
        variableListing.add(variable);
      }
      return new FromClause(rootVariable, variableListing);
View Full Code Here

    } else {
      pathElement = new XPathComponent(rootEntity);
    }
   
    if (pathTokens.hasNext()) {
      return new XPath(pathElement, new RelativeTargetPathGenerator().getTargetPath(rootEntity, versionIndex, pathTokens));
    } else {
      return new XPath(pathElement);
    }
  }
View Full Code Here

    if (tokens.get(index).type() == XAQLToken.FOR_ALL_QUANTIFIER) {
      quantifier = Quantifier.FOR_ALL;
      index++;
    }
   
    XPath targetPath = pathGenerator.getTargetPath(entity, versionIndex, tokens.get(index++).children().iterator());
   
    int valueQuantifier = Quantifier.FOR_ANY;
    if (tokens.get(index).type() == XAQLToken.FOR_ALL_VALUES_QUANTIFIER) {
      valueQuantifier = Quantifier.FOR_ALL;
      index++;
View Full Code Here

TOP

Related Classes of org.dbwiki.data.query.xpath.XPath

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.