• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ItemType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.sf.saxon.type.ItemType的典型用法代码示例。如果您正苦于以下问题:Java ItemType类的具体用法?Java ItemType怎么用?Java ItemType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ItemType类属于net.sf.saxon.type包,在下文中一共展示了ItemType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: sequenceToAttributeCollection

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
protected Collection<Attribute> sequenceToAttributeCollection(Sequence seq) throws XPathException {
  ArrayList<Attribute> attrs = new ArrayList<Attribute>();
  Item item;
  SequenceIterator iter = seq.iterate();
  while ((item = iter.next()) != null) {                
    Object value;
    String type;
    boolean isSerialized;
    if (item instanceof NodeInfo) {
      value = serialize((NodeInfo) item);
      type = "node()";
      isSerialized = true;
    } else {                             
      value = SequenceTool.convertToJava(item);
      ItemType itemType = Type.getItemType(item, null);
      type = itemType.toString();
      isSerialized = false;
    }
    attrs.add(new Attribute(value, type, isSerialized));
  }
  return attrs;
}
 
开发者ID:Armatiek,项目名称:xslweb,代码行数:23,代码来源:ExtensionFunctionCall.java


示例2: createValue

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
private Value createValue(ValueFacade expression) throws XPathException {
  final TypeHierarchy typeHierarchy = myXPathContext.getConfiguration().getTypeHierarchy();
  final ItemType itemType = expression.getItemType(typeHierarchy);

  final SequenceIterator it = expression.iterate(myXPathContext);
  Item value = null;
  if (it.next() != null) {
    value = it.current();
  }
  if (it.next() == null) {
    return new SingleValue(value, itemType);        
  }
  return new SequenceValue(value, it, itemType);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:Saxon9StyleFrame.java


示例3: SequenceValue

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public SequenceValue(Item value, SequenceIterator it, ItemType type) throws XPathException {
  String s = "(" + value.getStringValue() + ", " + it.current().getStringValue();
  while (it.next() != null) {
    s += ", " + it.current().getStringValue();
  }
  s += ")";
  myValue = s;
  myItemType = type;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:Saxon9StyleFrame.java


示例4: getItemType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public ItemType getItemType(TypeHierarchy hierarchy) {
  if (myValue instanceof net.sf.saxon.value.Value) {
    return ((net.sf.saxon.value.Value)myValue).getItemType(hierarchy);
  }
  if (myValue instanceof Item) {
    return Type.getItemType((Item)myValue, hierarchy);
  }
  return AnyItemType.getInstance();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:Saxon9StyleFrame.java


示例5: getArgumentTypes

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
@Override
public SequenceType[] getArgumentTypes() {
  // 1/ element(http:request)
  final int one = StaticProperty.EXACTLY_ONE;
  final int kind = Type.ELEMENT;
  final String uri = HttpConstants.HTTP_CLIENT_NS_URI;
  final NamePool pool = myConfig.getNamePool();
  final ItemType itype = new NameTest(kind, uri, "request", pool);
  SequenceType stype1 = SequenceType.makeSequenceType(itype, one); // 2/ xs:string?
  SequenceType stype2 = SequenceType.OPTIONAL_STRING; // 3/ item()*
  SequenceType stype3 = SequenceType.ANY_SEQUENCE; // 1/, 2/ and 3/
  return new SequenceType[] { stype1, stype2, stype3 };
}
 
开发者ID:Armatiek,项目名称:xslweb,代码行数:14,代码来源:SendRequestFunction.java


示例6: type2Sequence

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public static SequenceType type2Sequence(DataType type) {
	ItemType it = type2Item(type.getType());
	int cardinality;
	switch (type.getCardinality()) {
		case one_or_more: cardinality = StaticProperty.ALLOWS_ONE_OR_MORE; break; 
		case zero_or_one: cardinality = StaticProperty.ALLOWS_ZERO_OR_ONE; break; 
		case zero_or_more: cardinality = StaticProperty.ALLOWS_ZERO_OR_MORE; break;
		default: cardinality = StaticProperty.ALLOWS_ONE;  
	}
	return SequenceType.makeSequenceType(it, cardinality);
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:12,代码来源:SaxonUtils.java


示例7: getTypeName

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public static String getTypeName(ItemType type) {
	if (type.isAtomicType()) {
		return type.getAtomizedItemType().getTypeName().getLocalPart();
	}
	String result = type.toString();
	// delete () at the end
	return result.substring(0, result.length() - 2);
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:9,代码来源:SaxonUtils.java


示例8: typeCheck

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException 
{
    for (Entry<String, Expression> attrib : attribs.entrySet()) {
      attrib.setValue(attrib.getValue().typeCheck(env, contextItemType));
      adoptChildExpression(attrib.getValue());
    }
    if (content != null) {
        content = content.typeCheck(env, contextItemType);
        adoptChildExpression(content);
    }
    return this;
}
 
开发者ID:CDLUC3,项目名称:dash-xtf,代码行数:13,代码来源:InstructionWithContent.java


示例9: optimize

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException 
{
     for (Entry<String, Expression> attrib : attribs.entrySet()) {
       Expression exp = attrib.getValue();
       exp = exp.optimize(opt, env, contextItemType);
       attrib.setValue(exp);
       adoptChildExpression(exp);
     }
     
     if (content != null) {
         content = content.optimize(opt, env, contextItemType);
         adoptChildExpression(content);
     }
     return this;
 }
 
开发者ID:CDLUC3,项目名称:dash-xtf,代码行数:16,代码来源:InstructionWithContent.java


示例10: iterate

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public SequenceIterator iterate(XPathContext context) throws XPathException {
    Expression[] argExpressions = getArguments();
    ValueRepresentation vr = ExpressionTool.lazyEvaluate(argExpressions[0],
            context, 1);
    ItemType it = Value.asValue(vr).getItemType(
            context.getConfiguration().getTypeHierarchy());
    String type = getTypeName(it);
    Value v = Value.convertJavaObjectToXPath(type,
            SequenceType.SINGLE_STRING, context);
    return v.iterate();
}
 
开发者ID:opengeospatial,项目名称:teamengine,代码行数:12,代码来源:GetTypeFunctionCall.java


示例11: getType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public static String getType(Expression expr, XPathContext context)
        throws XPathException {
    ValueRepresentation vr = ExpressionTool.lazyEvaluate(expr, context, 1);
    ItemType it = Value.asValue(vr).getItemType(
            context.getConfiguration().getTypeHierarchy());
    if (it instanceof SchemaType) {
        return "xs:" + ((SchemaType) it).getName();
    }
    return "xs:any";
}
 
开发者ID:opengeospatial,项目名称:teamengine,代码行数:11,代码来源:TEXSLFunctionCall.java


示例12: SingleValue

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public SingleValue(Item value, ItemType itemType) {
  myValue = value;
  myItemType = itemType;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:Saxon9StyleFrame.java


示例13: getResultType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
@Override
public SequenceType getResultType(SequenceType[] params) {
  final int more = StaticProperty.ALLOWS_ONE_OR_MORE;
  final ItemType itype = AnyItemType.getInstance();
  return SequenceType.makeSequenceType(itype, more);
}
 
开发者ID:Armatiek,项目名称:xslweb,代码行数:7,代码来源:SendRequestFunction.java


示例14: getItemType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
@Override
public ItemType getItemType(TypeHierarchy th) {
	return null;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:5,代码来源:SaxonXQueryExpression.java


示例15: getItemType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
@Override
public ItemType getItemType() {
	return AnyItemType.getInstance(); 
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:5,代码来源:JPConverterImpl.java


示例16: type2Item

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public static ItemType type2Item(String type) {

		switch (type) {
			case "anyAtomicType": return BuiltInAtomicType.ANY_ATOMIC;
			//case "anySimpleType": return XQBASETYPE_ANYSIMPLETYPE;
			//case "anyType": return XQBASETYPE_ANYTYPE;
			case "anyURI": return BuiltInAtomicType.ANY_URI;
			case "base64Binary": return BuiltInAtomicType.BASE64_BINARY;
			case "boolean": return BuiltInAtomicType.BOOLEAN; 
			case "byte": return BuiltInAtomicType.BYTE; 
			case "date": return BuiltInAtomicType.DATE;
			case "dateTime": return BuiltInAtomicType.DATE_TIME; 
    		case "dayTimeDuration": return BuiltInAtomicType.DAY_TIME_DURATION;
    		case "decimal": return BuiltInAtomicType.DECIMAL;
			case "double": return BuiltInAtomicType.DOUBLE;
    		case "duration": return BuiltInAtomicType.DURATION;
    		//case "ENTITIES": return BuiltInAtomicType.ENTITIES;
    		case "ENTITY": return BuiltInAtomicType.ENTITY;
			case "float": return BuiltInAtomicType.FLOAT;
    		case "gDay": return BuiltInAtomicType.G_DAY;
    		case "gMonth": return BuiltInAtomicType.G_MONTH;
    		case "gMonthDay": return BuiltInAtomicType.G_MONTH_DAY;
    		case "gYear": return BuiltInAtomicType.G_YEAR;
    		case "gYearMonth": return BuiltInAtomicType.G_YEAR_MONTH;
    		case "hexBinary": return BuiltInAtomicType.HEX_BINARY;
    		case "ID": return BuiltInAtomicType.ID;
    		case "IDREF": return BuiltInAtomicType.IDREF;
    		//case "IDREFS": return BuiltInAtomicType.IDREFS;
			case "int": return BuiltInAtomicType.INT; 
			case "integer": return BuiltInAtomicType.INTEGER;
    		case "language": return BuiltInAtomicType.LANGUAGE;
			case "long": return BuiltInAtomicType.LONG;
    		case "Name": return BuiltInAtomicType.NAME;
    		case "NCName": return BuiltInAtomicType.NCNAME;
    		case "negativeInteger": return BuiltInAtomicType.NEGATIVE_INTEGER;
    		case "NMTOKEN": return BuiltInAtomicType.NMTOKEN;
    		//case "NMTOKENS": return BuiltInAtomicType.NMTOKENS;
    		case "nonNegativeInteger": return BuiltInAtomicType.NON_NEGATIVE_INTEGER;
    		case "nonPositiveInteger": return BuiltInAtomicType.NON_POSITIVE_INTEGER;
    		case "normalizedString": return BuiltInAtomicType.NORMALIZED_STRING;
    		case "NOTATION": return BuiltInAtomicType.NOTATION;
    		case "positiveInteger": return BuiltInAtomicType.POSITIVE_INTEGER;
    		case "QName": return BuiltInAtomicType.QNAME;
			case "short": return BuiltInAtomicType.SHORT; 
			case "string": return BuiltInAtomicType.STRING; 
    		case "time": return BuiltInAtomicType.TIME;
    		case "token": return BuiltInAtomicType.TOKEN;
    		case "unsignedByte": return BuiltInAtomicType.UNSIGNED_BYTE;
    		case "unsignedInt": return BuiltInAtomicType.UNSIGNED_INT;
    		case "unsignedLong": return BuiltInAtomicType.UNSIGNED_LONG;
    		case "unsignedShort": return BuiltInAtomicType.UNSIGNED_SHORT;
    		//case "untyped": return BuiltInAtomicType.UNTYPED;
    		case "untypedAtomic": return BuiltInAtomicType.UNTYPED_ATOMIC;
    		case "yearMonthDuration": return BuiltInAtomicType.YEAR_MONTH_DURATION;
		}
		return BuiltInAtomicType.ANY_ATOMIC; 
	}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:58,代码来源:SaxonUtils.java


示例17: getItemType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public ItemType getItemType(TypeHierarchy th) {
    return EmptySequenceTest.getInstance();
}
 
开发者ID:CDLUC3,项目名称:dash-xtf,代码行数:4,代码来源:InstructionWithContent.java


示例18: getRequiredContextItemType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
@Override
public ItemType getRequiredContextItemType() {
    return original.getRequiredContextItemType();
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:5,代码来源:SaxonExpressionEvaluator.java


示例19: getTypeName

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public static String getTypeName(ItemType it) throws XPathException {
    if (it instanceof SchemaType) {
        return "xs:" + ((SchemaType) it).getName();
    }
    return it.toString();
}
 
开发者ID:opengeospatial,项目名称:teamengine,代码行数:7,代码来源:GetTypeFunctionCall.java


示例20: getItemType

import net.sf.saxon.type.ItemType; //导入依赖的package包/类
public ItemType getItemType(TypeHierarchy th) {
    return AnyItemType.getInstance();
}
 
开发者ID:opengeospatial,项目名称:teamengine,代码行数:4,代码来源:TEFunctionCall.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VideoStatus类代码示例发布时间:2022-05-22
下一篇:
Java Map1类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap