use of org.sirix.service.xml.xpath.functions.sequences.FNBoolean in project sirix by sirixdb.
the class Function method ebv.
public static boolean ebv(final Axis axis) throws SirixXPathException {
final FuncDef ebv = FuncDef.BOOLEAN;
final List<Axis> param = new ArrayList<Axis>();
param.add(axis);
final AbstractAxis bAxis = new FNBoolean(axis.getTrx(), param, ebv.getMin(), ebv.getMax(), axis.getTrx().keyForName(ebv.getReturnType()));
if (bAxis.hasNext()) {
bAxis.next();
final boolean result = Boolean.parseBoolean(bAxis.getTrx().getValue());
if (!bAxis.hasNext()) {
bAxis.reset(axis.getTrx().getNodeKey());
return result;
}
}
// TODO!!
throw new IllegalStateException("This should not happen!");
}
Aggregations