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


Java XSConstants.LIST_DT属性代码示例

本文整理汇总了Java中mf.org.apache.xerces.xs.XSConstants.LIST_DT属性的典型用法代码示例。如果您正苦于以下问题:Java XSConstants.LIST_DT属性的具体用法?Java XSConstants.LIST_DT怎么用?Java XSConstants.LIST_DT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在mf.org.apache.xerces.xs.XSConstants的用法示例。


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

示例1: XSSimpleTypeDecl

protected XSSimpleTypeDecl(String name, String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable,
        XSObjectList annotations) {
    fBase = fAnySimpleType;
    fTypeName = name;
    fTargetNamespace = uri;
    fFinalSet = finalSet;
    fAnnotations = annotations;

    fVariety = VARIETY_LIST;
    fItemType = (XSSimpleTypeDecl)itemType;
    fValidationDV = DV_LIST;
    fFacetsDefined = FACET_WHITESPACE;
    fFixedFacet = FACET_WHITESPACE;
    fWhiteSpace = WS_COLLAPSE;

    //setting fundamental facets
    calcFundamentalFacets();
    fIsImmutable = isImmutable;

    // Values of this type are lists
    fBuiltInKind = XSConstants.LIST_DT;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:22,代码来源:XSSimpleTypeDecl.java

示例2: setListValues

protected XSSimpleTypeDecl setListValues(String name, String uri, short finalSet, XSSimpleTypeDecl itemType,
        XSObjectList annotations) {
    //decline to do anything if the object is immutable.
    if(fIsImmutable) return null;
    fBase = fAnySimpleType;
    fAnonymous = false;
    fTypeName = name;
    fTargetNamespace = uri;
    fFinalSet = finalSet;
    fAnnotations = annotations;

    fVariety = VARIETY_LIST;
    fItemType = (XSSimpleTypeDecl)itemType;
    fValidationDV = DV_LIST;
    fFacetsDefined = FACET_WHITESPACE;
    fFixedFacet = FACET_WHITESPACE;
    fWhiteSpace = WS_COLLAPSE;

    //setting fundamental facets
    calcFundamentalFacets();

    // Values of this type are lists
    fBuiltInKind = XSConstants.LIST_DT;

    return this;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:26,代码来源:XSSimpleTypeDecl.java

示例3: isComparable

/**
 * Returns true if the two ValidatedInfo objects can be compared in the same
 * value space.
 */
public static boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
    final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
    final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
    if (primitiveType1 != primitiveType2) {    
        return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
                primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
    }
    else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
        final ShortList typeList1 = info1.itemValueTypes;
        final ShortList typeList2 = info2.itemValueTypes;
        final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
        final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
        if (typeList1Length != typeList2Length) {
            return false;
        }
        for (int i = 0; i < typeList1Length; ++i) {
            final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
            final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
            if (primitiveItem1 != primitiveItem2) {
                if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
                    primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
                    continue;
                }
                return false;
            }
        }
    }
    return true;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:33,代码来源:ValidatedInfo.java

示例4: contains

/**
 * Returns true if this value store contains the locally scoped value stores
 */
public boolean contains() {
    // REVISIT: we can improve performance by using hash codes, instead of
    // traversing global vector that could be quite large.
    int next = 0;
    final int size = fValues.size();
    LOOP : for (int i = 0; i < size; i = next) {
        next = i + fFieldCount;
        for (int j = 0; j < fFieldCount; j++) {
            Object value1 = fLocalValues[j];
            Object value2 = fValues.elementAt(i);
            short valueType1 = fLocalValueTypes[j];
            short valueType2 = getValueTypeAt(i);
            if (value1 == null || value2 == null || valueType1 != valueType2 || !(value1.equals(value2))) {
                continue LOOP;
            }
            else if(valueType1 == XSConstants.LIST_DT || valueType1 == XSConstants.LISTOFUNION_DT) {
                ShortList list1 = fLocalItemValueTypes[j];
                ShortList list2 = getItemValueTypeAt(i);
                if(list1 == null || list2 == null || !list1.equals(list2))
                    continue LOOP;
            }
            i++;
        }
        // found it
        return true;
    }
    // didn't find it
    return false;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:32,代码来源:XMLSchemaValidator.java


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