本文整理汇总了Java中com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition类的典型用法代码示例。如果您正苦于以下问题:Java XSSimpleTypeDefinition类的具体用法?Java XSSimpleTypeDefinition怎么用?Java XSSimpleTypeDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XSSimpleTypeDefinition类属于com.sun.org.apache.xerces.internal.xs包,在下文中一共展示了XSSimpleTypeDefinition类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isDerivedByList
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
/**
* Checks if a type is derived from another by list. See:
* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
*
* @param ancestorNS
* The namspace of the ancestor type declaration
* @param ancestorName
* The name of the ancestor type declaration
* @param type
* The reference type definition
*
* @return boolean True if the type is derived by list for the reference type
*/
private boolean isDerivedByList (String ancestorNS, String ancestorName, XSTypeDefinition type) {
// If the variety is union
if (type !=null && ((XSSimpleTypeDefinition)type).getVariety() == VARIETY_LIST) {
// get the {item type}
XSTypeDefinition itemType = ((XSSimpleTypeDefinition)type).getItemType();
// T2 is the {item type definition}
if (itemType != null) {
// T2 is derived from the other type definition by DERIVATION_RESTRICTION
if (isDerivedByRestriction(ancestorNS, ancestorName, itemType)) {
return true;
}
}
}
return false;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:XSSimpleTypeDecl.java
示例2: isDerivedByUnion
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
/**
* Checks if a type is derived from another by union. See:
* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
*
* @param ancestorNS
* The namspace of the ancestor type declaration
* @param ancestorName
* The name of the ancestor type declaration
* @param type
* The reference type definition
*
* @return boolean True if the type is derived by union for the reference type
*/
private boolean isDerivedByUnion (String ancestorNS, String ancestorName, XSTypeDefinition type) {
// If the variety is union
if (type !=null && ((XSSimpleTypeDefinition)type).getVariety() == VARIETY_UNION) {
// get member types
XSObjectList memberTypes = ((XSSimpleTypeDefinition)type).getMemberTypes();
for (int i = 0; i < memberTypes.getLength(); i++) {
// One of the {member type definitions} is T2.
if (memberTypes.item(i) != null) {
// T2 is derived from the other type definition by DERIVATION_RESTRICTION
if (isDerivedByRestriction(ancestorNS, ancestorName,(XSSimpleTypeDefinition)memberTypes.item(i))) {
return true;
}
}
}
}
return false;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:XSSimpleTypeDecl.java
示例3: expandRelatedSimpleTypeComponents
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
private void expandRelatedSimpleTypeComponents(XSSimpleTypeDefinition type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
final XSTypeDefinition baseType = type.getBaseType();
if (baseType != null) {
addRelatedType(baseType, componentList, namespace, dependencies);
}
final XSTypeDefinition itemType = type.getItemType();
if (itemType != null) {
addRelatedType(itemType, componentList, namespace, dependencies);
}
final XSTypeDefinition primitiveType = type.getPrimitiveType();
if (primitiveType != null) {
addRelatedType(primitiveType, componentList, namespace, dependencies);
}
final XSObjectList memberTypes = type.getMemberTypes();
if (memberTypes.size() > 0) {
for (int i=0; i<memberTypes.size(); i++) {
addRelatedType((XSTypeDefinition)memberTypes.item(i), componentList, namespace, dependencies);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:XSDHandler.java
示例4: facetKindToString
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
public static String facetKindToString(short facetKind) {
switch(facetKind) {
case XSSimpleTypeDefinition.FACET_MINLENGTH: return "minLength";
case XSSimpleTypeDefinition.FACET_MAXLENGTH: return "maxLength";
case XSSimpleTypeDefinition.FACET_PATTERN: return "pattern";
case XSSimpleTypeDefinition.FACET_MAXINCLUSIVE: return "maximum";
case XSSimpleTypeDefinition.FACET_MININCLUSIVE: return "minimum";
//
// case XSSimpleTypeDefinition.FACET_NONE: return "none";
// case XSSimpleTypeDefinition.FACET_LENGTH: return "length";
// case XSSimpleTypeDefinition.FACET_WHITESPACE: return "whitespace";
// case XSSimpleTypeDefinition.FACET_MAXEXCLUSIVE: return "maxExclusive";
// case XSSimpleTypeDefinition.FACET_MINEXCLUSIVE: return "minExclusive";
// case XSSimpleTypeDefinition.FACET_TOTALDIGITS: return "totalDigits";
// case XSSimpleTypeDefinition.FACET_FRACTIONDIGITS: return "fractionDigits";
// case XSSimpleTypeDefinition.FACET_ENUMERATION: return "enumeration";
// default: return "unknown facet kind";
default: return null;
}
}
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:22,代码来源:Facet.java
示例5: iterateComplexType
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
private List<JSElement> iterateComplexType(final XSComplexTypeDefinition complexType) {
final List<JSElement> result = new ArrayList<>();
final XSParticle xsParticle = complexType.getParticle();
if (xsParticle != null) {
result.addAll(iterateParticle(xsParticle));
} else {
final XSSimpleTypeDefinition xsSimpleType = complexType.getSimpleType();
if (xsSimpleType != null) {
result.add(iterateSimpleType(xsSimpleType));
}
}
iterateComplexAttributes(complexType, result);
return result;
}
开发者ID:dswarm,项目名称:dswarm-xsd2jsonschema,代码行数:21,代码来源:JsonSchemaParser.java
示例6: getPrimitiveType
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
/**
* If variety is <code>atomic</code> the primitive type definition (a
* built-in primitive datatype definition or the simple ur-type
* definition) is available, otherwise <code>null</code>.
*/
public XSSimpleTypeDefinition getPrimitiveType() {
if (fVariety == VARIETY_ATOMIC && fValidationDV != DV_ANYSIMPLETYPE) {
XSSimpleTypeDecl pri = this;
// recursively get base, until we reach anySimpleType
while (pri.fBase != fAnySimpleType)
pri = pri.fBase;
return pri;
}
else {
// REVISIT: error situation. runtime exception?
return null;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:XSSimpleTypeDecl.java
示例7: getItemType
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
/**
* If variety is <code>list</code> the item type definition (an atomic or
* union simple type definition) is available, otherwise
* <code>null</code>.
*/
public XSSimpleTypeDefinition getItemType() {
if (fVariety == VARIETY_LIST) {
return fItemType;
}
else {
// REVISIT: error situation. runtime exception?
return null;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:XSSimpleTypeDecl.java
示例8: expandRelatedTypeComponents
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
private void expandRelatedTypeComponents(XSTypeDefinition type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
if (type instanceof XSComplexTypeDecl) {
expandRelatedComplexTypeComponents((XSComplexTypeDecl) type, componentList, namespace, dependencies);
}
else if (type instanceof XSSimpleTypeDecl) {
expandRelatedSimpleTypeComponents((XSSimpleTypeDefinition) type, componentList, namespace, dependencies);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:XSDHandler.java
示例9: getSchemaTypeName
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; //导入依赖的package包/类
public static String getSchemaTypeName(XSTypeDefinition typeDefn) {
String typeNameStr;
if (typeDefn instanceof XSSimpleTypeDefinition) {
typeNameStr = ((XSSimpleTypeDecl) typeDefn).getTypeName();
}
else {
typeNameStr = ((XSComplexTypeDecl) typeDefn).getTypeName();
}
return typeNameStr;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:XS10TypeHelper.java
注:本文中的com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论