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


Java XSConstants.DERIVATION_UNION属性代码示例

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


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

示例1: errorType

private XSSimpleType errorType(String name, String namespace, short refType) {
    XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string");
    switch (refType) {
    case XSConstants.DERIVATION_RESTRICTION:
        return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0,
                stringType, null);
    case XSConstants.DERIVATION_LIST:
        return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0,
                stringType, null);
    case XSConstants.DERIVATION_UNION:
        return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0,
                new XSSimpleType[]{stringType}, null);
    }
    
    return null;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:16,代码来源:XSDSimpleTypeTraverser.java

示例2: translateDerivation

private String translateDerivation(short deriv) {
    switch (deriv) {
        case XSConstants.DERIVATION_EXTENSION :
            return SchemaSymbols.ELT_EXTENSION;
        case XSConstants.DERIVATION_LIST :
            return SchemaSymbols.ELT_LIST;
        case XSConstants.DERIVATION_RESTRICTION :
            return SchemaSymbols.ELT_RESTRICTION;
        case XSConstants.DERIVATION_SUBSTITUTION :
            return SchemaSymbols.ATTVAL_SUBSTITUTION;
        case XSConstants.DERIVATION_UNION :
            return SchemaSymbols.ELT_UNION;
        case XSConstants.DERIVATION_NONE :
            return null;
        default :
            return "unknown";
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:18,代码来源:PSVIWriter.java

示例3: printFinal

void printFinal(short finalSet){

    System.err.println("'final' values \t\t\t: " );

    if ((finalSet & XSConstants.DERIVATION_EXTENSION ) != 0) {
        System.err.println("\t\t\t\t Extension");
    }
    if ((finalSet & XSConstants.DERIVATION_RESTRICTION) != 0) {
        System.err.println("\t\t\t\t Restriction");
    }
    if ((finalSet & XSConstants.DERIVATION_LIST ) != 0) {
        System.err.println("\t\t\t\t List");
    }
    if ((finalSet & XSConstants.DERIVATION_UNION ) != 0) {
        System.err.println("\t\t\t\t Union");
    }
    if (finalSet == XSConstants.DERIVATION_NONE) {
        System.err.println("\t\t\t\t EMPTY");
    }

}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:21,代码来源:SimpleTypeUsage.java

示例4: translateBlockOrFinal

private String translateBlockOrFinal(short val) {
    String ret = "";
    if ((val & XSConstants.DERIVATION_EXTENSION) != 0) {
        ret += SchemaSymbols.ATTVAL_EXTENSION;
    }
    if ((val & XSConstants.DERIVATION_LIST) != 0) {
        if (ret.length() != 0)
            ret += " ";
        ret += SchemaSymbols.ATTVAL_LIST;
    }
    if ((val & XSConstants.DERIVATION_RESTRICTION) != 0) {
        if (ret.length() != 0)
            ret += " ";
        ret += SchemaSymbols.ATTVAL_RESTRICTION;
    }
    if ((val & XSConstants.DERIVATION_UNION) != 0) {
        if (ret.length() != 0)
            ret += " ";
        ret += SchemaSymbols.ATTVAL_UNION;
    }
    if ((val & XSConstants.DERIVATION_SUBSTITUTION) != 0) {
        if (ret.length() != 0)
            ret += " ";
        ret += SchemaSymbols.ATTVAL_SUBSTITUTION;
    }
    return ret;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:27,代码来源:PSVIWriter.java

示例5: findDTValidator

private XSSimpleType findDTValidator(Element elm, String refName,
        QName baseTypeStr, short baseRefContext,
        XSDocumentInfo schemaDoc) {
    if (baseTypeStr == null)
        return null;
    
    XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm);
    if (baseType == null) {
        return null;
    }
    if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) {
        reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm);
        return null;
    }

    // if it's a complex type, or if its restriction of anySimpleType
    if (baseType == SchemaGrammar.fAnySimpleType &&
        baseRefContext == XSConstants.DERIVATION_RESTRICTION) {
        // if the base type is anySimpleType and the current type is
        // a S4S built-in type, return null. (not an error).
        if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) {
            return null;
        }
        reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm);
        return null;
    }

    if ((baseType.getFinal() & baseRefContext) != 0) {
        if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) {
            reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm);
        }
        else if (baseRefContext == XSConstants.DERIVATION_LIST) {
            reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm);
        }
        else if (baseRefContext == XSConstants.DERIVATION_UNION) {
            reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm);
        }
        return null;
    }
    
    return (XSSimpleType)baseType;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:42,代码来源:XSDSimpleTypeTraverser.java


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