本文整理匯總了Java中org.javarosa.xpath.expr.XPathFilterExpr類的典型用法代碼示例。如果您正苦於以下問題:Java XPathFilterExpr類的具體用法?Java XPathFilterExpr怎麽用?Java XPathFilterExpr使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
XPathFilterExpr類屬於org.javarosa.xpath.expr包,在下文中一共展示了XPathFilterExpr類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: build
import org.javarosa.xpath.expr.XPathFilterExpr; //導入依賴的package包/類
public XPathExpression build() throws XPathSyntaxException {
XPathExpression[] preds = new XPathExpression[predicates.size()];
for (int i = 0; i < preds.length; i++)
preds[i] = predicates.elementAt(i).build();
return new XPathFilterExpr(expr.build(), preds);
}
示例2: build
import org.javarosa.xpath.expr.XPathFilterExpr; //導入依賴的package包/類
public XPathExpression build() throws XPathSyntaxException {
Vector<XPathStep> steps = new Vector<XPathStep>();
XPathExpression filtExpr = null;
int offset = isAbsolute() ? 1 : 0;
for (int i = 0; i < clauses.size() + offset; i++) {
if (offset == 0 || i > 0) {
if (clauses.elementAt(i - offset) instanceof ASTNodePathStep) {
steps.addElement(((ASTNodePathStep)clauses.elementAt(i - offset)).getStep());
} else {
filtExpr = clauses.elementAt(i - offset).build();
}
}
if (i < separators.size()) {
if (Parser.vectInt(separators, i) == Token.DBL_SLASH) {
steps.addElement(XPathStep.ABBR_DESCENDANTS());
}
}
}
XPathStep[] stepArr = new XPathStep[steps.size()];
for (int i = 0; i < stepArr.length; i++)
stepArr[i] = steps.elementAt(i);
if (filtExpr == null) {
return new XPathPathExpr(isAbsolute() ? XPathPathExpr.INIT_CONTEXT_ROOT : XPathPathExpr.INIT_CONTEXT_RELATIVE, stepArr);
} else {
if (filtExpr instanceof XPathFilterExpr) {
return new XPathPathExpr((XPathFilterExpr)filtExpr, stepArr);
} else {
return new XPathPathExpr(new XPathFilterExpr(filtExpr, new XPathExpression[0]), stepArr);
}
}
}
示例3: build
import org.javarosa.xpath.expr.XPathFilterExpr; //導入依賴的package包/類
@Override
public XPathExpression build() throws XPathSyntaxException {
XPathExpression[] preds = new XPathExpression[predicates.size()];
for (int i = 0; i < preds.length; i++)
preds[i] = ((ASTNode)predicates.elementAt(i)).build();
return new XPathFilterExpr(expr.build(), preds);
}
示例4: build
import org.javarosa.xpath.expr.XPathFilterExpr; //導入依賴的package包/類
public XPathExpression build() throws XPathSyntaxException {
Vector<XPathStep> steps = new Vector<XPathStep>();
XPathExpression filtExpr = null;
int offset = isAbsolute() ? 1 : 0;
for (int i = 0; i < clauses.size() + offset; i++) {
if (offset == 0 || i > 0) {
if (clauses.elementAt(i - offset) instanceof ASTNodePathStep) {
steps.addElement(((ASTNodePathStep)clauses.elementAt(i - offset)).getStep());
} else {
filtExpr = clauses.elementAt(i - offset).build();
}
}
if (i < separators.size()) {
if (Parser.vectInt(separators, i) == Token.DBL_SLASH) {
steps.addElement(XPathStep.ABBR_DESCENDANTS());
}
}
}
XPathStep[] stepArr = new XPathStep[steps.size()];
for (int i = 0; i < stepArr.length; i++)
stepArr[i] = steps.elementAt(i);
if (filtExpr == null) {
return new XPathPathExpr(isAbsolute() ? XPathPathExpr.INIT_CONTEXT_ROOT : XPathPathExpr.INIT_CONTEXT_RELATIVE, stepArr);
} else {
if (filtExpr instanceof XPathFilterExpr) {
return new XPathPathExpr((XPathFilterExpr)filtExpr, stepArr);
} else {
return new XPathPathExpr(new XPathFilterExpr(filtExpr, new XPathExpression[0]), stepArr);
}
}
}
示例5: build
import org.javarosa.xpath.expr.XPathFilterExpr; //導入依賴的package包/類
@Override
public XPathExpression build() throws XPathSyntaxException {
XPathExpression[] preds = new XPathExpression[predicates.size()];
for (int i = 0; i < preds.length; i++)
preds[i] = predicates.elementAt(i).build();
return new XPathFilterExpr(expr.build(), preds);
}
示例6: build
import org.javarosa.xpath.expr.XPathFilterExpr; //導入依賴的package包/類
@Override
public XPathExpression build() throws XPathSyntaxException {
Vector<XPathStep> steps = new Vector<>();
XPathExpression filtExpr = null;
int offset = isAbsolute() ? 1 : 0;
for (int i = 0; i < clauses.size() + offset; i++) {
if (offset == 0 || i > 0) {
if (clauses.elementAt(i - offset) instanceof ASTNodePathStep) {
steps.addElement(((ASTNodePathStep)clauses.elementAt(i - offset)).getStep());
} else {
filtExpr = clauses.elementAt(i - offset).build();
}
}
if (i < separators.size()) {
if (separators.get(i) == Token.DBL_SLASH) {
steps.addElement(XPathStep.ABBR_DESCENDANTS());
}
}
}
XPathStep[] stepArr = new XPathStep[steps.size()];
for (int i = 0; i < stepArr.length; i++)
stepArr[i] = steps.elementAt(i);
if (filtExpr == null) {
return new XPathPathExpr(isAbsolute() ? XPathPathExpr.INIT_CONTEXT_ROOT : XPathPathExpr.INIT_CONTEXT_RELATIVE, stepArr);
} else {
if (filtExpr instanceof XPathFilterExpr) {
return new XPathPathExpr((XPathFilterExpr)filtExpr, stepArr);
} else {
return new XPathPathExpr(new XPathFilterExpr(filtExpr, new XPathExpression[0]), stepArr);
}
}
}