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

Java ValidatedInfo类代码示例

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

本文整理汇总了Java中com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo的典型用法代码示例。如果您正苦于以下问题:Java ValidatedInfo类的具体用法?Java ValidatedInfo怎么用?Java ValidatedInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValidatedInfo类属于com.sun.org.apache.xerces.internal.impl.dv包,在下文中一共展示了ValidatedInfo类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: validate

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
/**
 * validate an actual value against this DV
 *
 * @param context       the validation context
 * @param validatedInfo used to provide the actual value and member types
 */
public void validate(ValidationContext context, ValidatedInfo validatedInfo)
    throws InvalidDatatypeValueException {

    if (context == null)
        context = fEmptyContext;

    // then validate the actual value against the facets
    if (context.needFacetChecking() &&
            (fFacetsDefined != 0 && fFacetsDefined != FACET_WHITESPACE)) {
        checkFacets(validatedInfo);
    }

    // now check extra rules: for ID/IDREF/ENTITY
    if (context.needExtraChecking()) {
        checkExtraRules(context, validatedInfo);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:XSSimpleTypeDecl.java


示例2: checkExtraRules

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
private void checkExtraRules(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException {

        Object ob = validatedInfo.actualValue;

        if (fVariety == VARIETY_ATOMIC) {

            fDVs[fValidationDV].checkExtraRules(ob, context);

        } else if (fVariety == VARIETY_LIST) {

            ListDV.ListData values = (ListDV.ListData)ob;
            XSSimpleType memberType = validatedInfo.memberType;
            int len = values.getLength();
            try {
                if (fItemType.fVariety == VARIETY_UNION) {
                    XSSimpleTypeDecl[] memberTypes = (XSSimpleTypeDecl[])validatedInfo.memberTypes;
                    for (int i = len-1; i >= 0; i--) {
                        validatedInfo.actualValue = values.item(i);
                        validatedInfo.memberType = memberTypes[i];
                        fItemType.checkExtraRules(context, validatedInfo);
                    }
                } else { // (fVariety == VARIETY_ATOMIC)
                    for (int i = len-1; i >= 0; i--) {
                        validatedInfo.actualValue = values.item(i);
                        fItemType.checkExtraRules(context, validatedInfo);
                    }
                }
            }
            finally {
                validatedInfo.actualValue = values;
                validatedInfo.memberType = memberType;
            }

        } else { // (fVariety == VARIETY_UNION)

            ((XSSimpleTypeDecl)validatedInfo.memberType).checkExtraRules(context, validatedInfo);

        }

    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:XSSimpleTypeDecl.java


示例3: setValues

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
public void setValues(String name, String targetNamespace,
        XSSimpleType simpleType, short constraintType, short scope,
        ValidatedInfo valInfo, XSComplexTypeDecl enclosingCT,
        XSObjectList annotations) {
    fName = name;
    fTargetNamespace = targetNamespace;
    fType = simpleType;
    fConstraintType = constraintType;
    fScope = scope;
    fDefault = valInfo;
    fEnclosingCT = enclosingCT;
    fAnnotations = annotations;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:XSAttributeDecl.java


示例4: isComparable

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
/** Returns true if the two ValidatedInfo objects can be compared in the same value space. **/
private 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:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:XMLSchemaValidator.java


示例5: getActualEnumValue

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
protected ValidatedInfo getActualEnumValue(String lexical, ValidationContext ctx, ValidatedInfo info)
throws InvalidDatatypeValueException {
    return fBase.validateWithInfo(lexical, ctx, info);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:XSSimpleTypeDecl.java


示例6: validate

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
public void validate(ValidationContext context, ValidatedInfo validatedInfo)
    throws InvalidDatatypeValueException {
    type.validate(context, validatedInfo);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:XSSimpleTypeDelegate.java


示例7: getValInfo

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
public ValidatedInfo getValInfo() {
    return fDefault;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:XSAttributeDecl.java


示例8: setValues

import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; //导入依赖的package包/类
public void setValues(String name, String targetNamespace,
        XSSimpleType simpleType, short constraintType, short scope,
        ValidatedInfo valInfo, XSComplexTypeDecl enclosingCT) {
    // ignore this call.
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:SchemaGrammar.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java CyRootNetworkManager类代码示例发布时间:2022-05-22
下一篇:
Java NotAudited类代码示例发布时间: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