本文整理汇总了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;
}
示例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";
}
}
示例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");
}
}
示例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;
}
示例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;
}