本文整理汇总了Java中net.sf.saxon.om.AxisInfo.NAMESPACE属性的典型用法代码示例。如果您正苦于以下问题:Java AxisInfo.NAMESPACE属性的具体用法?Java AxisInfo.NAMESPACE怎么用?Java AxisInfo.NAMESPACE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.sf.saxon.om.AxisInfo
的用法示例。
在下文中一共展示了AxisInfo.NAMESPACE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAxisType
private AxisType getAxisType(byte axis) {
switch (axis) {
case AxisInfo.ANCESTOR:
return AxisType.ANCESTOR;
case AxisInfo.ANCESTOR_OR_SELF:
return AxisType.ANCESTOR_OR_SELF;
case AxisInfo.ATTRIBUTE:
return AxisType.ATTRIBUTE;
case AxisInfo.CHILD:
return AxisType.CHILD;
case AxisInfo.DESCENDANT:
return AxisType.DESCENDANT;
case AxisInfo.DESCENDANT_OR_SELF:
return AxisType.DESCENDANT_OR_SELF;
case AxisInfo.FOLLOWING:
return AxisType.FOLLOWING;
case AxisInfo.FOLLOWING_SIBLING:
return AxisType.FOLLOWING_SIBLING;
case AxisInfo.NAMESPACE:
return AxisType.NAMESPACE;
case AxisInfo.PARENT:
return AxisType.PARENT;
case AxisInfo.PRECEDING:
return AxisType.PRECEDING;
case AxisInfo.PRECEDING_OR_ANCESTOR:
return null; // ??
case AxisInfo.PRECEDING_SIBLING:
return AxisType.PRECEDING_SIBLING;
case AxisInfo.SELF:
return AxisType.SELF;
}
return null;
}
示例2: validateColumnForStreaming
private boolean validateColumnForStreaming(AnalysisRecord record,
XMLColumn xmlColumn, PathMapArc arc) {
boolean ancestor = false;
LinkedList<PathMapArc> arcStack = new LinkedList<PathMapArc>();
arcStack.add(arc);
while (!arcStack.isEmpty()) {
PathMapArc current = arcStack.removeFirst();
byte axis = current.getAxis();
if (ancestor) {
if (current.getTarget().isReturnable()) {
if (axis != AxisInfo.NAMESPACE && axis != AxisInfo.ATTRIBUTE) {
if (record.recordAnnotations()) {
record.addAnnotation(XQUERY_PLANNING, "The column path contains an invalid reverse axis " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
}
}
if (!isValidAncestorAxis[axis]) {
if (record.recordAnnotations()) {
record.addAnnotation(XQUERY_PLANNING, "The column path contains an invalid reverse axis " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
}
} else if (!AxisInfo.isSubtreeAxis[axis]) {
if (axis == AxisInfo.PARENT
|| axis == AxisInfo.ANCESTOR
|| axis == AxisInfo.ANCESTOR_OR_SELF) {
if (current.getTarget().isReturnable()) {
if (record.recordAnnotations()) {
record.addAnnotation(XQUERY_PLANNING, "The column path contains an invalid reverse axis " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
}
ancestor = true;
} else {
if (record.recordAnnotations()) {
record.addAnnotation(XQUERY_PLANNING, "The column path may not reference an ancestor or subtree " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
}
}
for (PathMapArc pathMapArc : current.getTarget().getArcs()) {
arcStack.add(pathMapArc);
}
}
return true;
}