当前位置: 首页>>代码示例>>Java>>正文


Java AxisInfo.NAMESPACE属性代码示例

本文整理汇总了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;
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:33,代码来源:CollectionFinderImpl.java

示例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;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:47,代码来源:SaxonXQueryExpression.java


注:本文中的net.sf.saxon.om.AxisInfo.NAMESPACE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。