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

Java XSSimpleType类代码示例

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

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



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

示例1: getSimpleTypesString

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private static String getSimpleTypesString(XSTypeDefinition et) {
    StringBuffer typesHierarchy = new StringBuffer();
    while (et != null && !"anySimpleType".equals(et.getName()) && !"anyType".equals(et.getName()) && et.getNamespace() != null) {
        typesHierarchy.append(et.getNamespace().substring(et.getNamespace().lastIndexOf("/") + 1))
                      .append(":")
                      .append(et.getName())
                      .append(";");
        if (et instanceof XSSimpleType) {
            XSSimpleType simpleType = (XSSimpleType) et;
            if (simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST
                || simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
                XSObjectList list = simpleType.getMemberTypes();
                if (list.getLength() > 0) {
                    typesHierarchy.append("{");
                    for (int i = 0; i < list.getLength(); i++) {
                        typesHierarchy.append(getSimpleTypesString((XSTypeDefinition) list.item(i)));
                    }
                    typesHierarchy.append("}");
                }
            }
        }
        et = et.getBaseType();
    }
    return typesHierarchy.toString();
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:26,代码来源:XSDModelLoader.java


示例2: getSimpleTypesString

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private static String getSimpleTypesString(XSTypeDefinition et) {
  StringBuffer typesHierarchy = new StringBuffer();
  while (et != null && !"anySimpleType".equals(et.getName()) && !"anyType".equals(et.getName()) && et.getNamespace() != null) {
    typesHierarchy.append(et.getNamespace().substring(et.getNamespace().lastIndexOf("/") + 1)).append(":").append(et.getName()).append(";");
    if (et instanceof XSSimpleType) {
      XSSimpleType simpleType = (XSSimpleType) et;
      if (simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST
              || simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
        XSObjectList list = simpleType.getMemberTypes();
        if (list.getLength() > 0) {
          typesHierarchy.append("{");
          for (int i = 0; i < list.getLength(); i++) {
            typesHierarchy.append(getSimpleTypesString((XSTypeDefinition) list.item(i)));
          }
          typesHierarchy.append("}");
        }
      }
    }
    et = et.getBaseType();
  }
  return typesHierarchy.toString();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:XSDModelLoader.java


示例3: processAttributePSVI

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
/** Returns whether the given attribute is an ID type. **/
private boolean processAttributePSVI(AttrImpl attr, AttributePSVI attrPSVI) {
    if (fStorePSVI) {
        ((PSVIAttrNSImpl) attr).setPSVI (attrPSVI);
    }
    Object type = attrPSVI.getMemberTypeDefinition ();
    if (type == null) {
        type = attrPSVI.getTypeDefinition ();
        if (type != null) {
            attr.setType(type);
            return ((XSSimpleType) type).isIDType();
        }
    }
    else {
        attr.setType(type);
        return ((XSSimpleType) type).isIDType();
    }
    return false;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:20,代码来源:DOMResultAugmentor.java


示例4: setNumeric

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private void setNumeric(){
    if(fVariety == VARIETY_ATOMIC){
        this.fNumeric = fBase.fNumeric;
    }
    else if(fVariety == VARIETY_LIST){
        this.fNumeric = false;
    }
    else if(fVariety == VARIETY_UNION){
        XSSimpleType[] memberTypes = fMemberTypes;
        for(int i = 0 ; i < memberTypes.length ; i++){
            if(!memberTypes[i].getNumeric() ){
                this.fNumeric = false;
                return;
            }
        }
        this.fNumeric = true;
    }

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


示例5: createBuiltInTypes

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
static void createBuiltInTypes() {
    final String ANYATOMICTYPE     = "anyAtomicType";
    final String DURATION          = "duration";
    final String YEARMONTHDURATION = "yearMonthDuration";
    final String DAYTIMEDURATION   = "dayTimeDuration";

	createBuiltInTypes(fBuiltInTypes, XSSimpleTypeDecl.fAnyAtomicType);

    // add anyAtomicType
    fBuiltInTypes.put(ANYATOMICTYPE, XSSimpleTypeDecl.fAnyAtomicType);

    // add 2 duration types
    XSSimpleTypeDecl durationDV = (XSSimpleTypeDecl)fBuiltInTypes.get(DURATION);
    fBuiltInTypes.put(YEARMONTHDURATION, new XSSimpleTypeDecl(durationDV, YEARMONTHDURATION, XSSimpleTypeDecl.DV_YEARMONTHDURATION, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSSimpleTypeDecl.YEARMONTHDURATION_DT));
    fBuiltInTypes.put(DAYTIMEDURATION, new XSSimpleTypeDecl(durationDV, DAYTIMEDURATION, XSSimpleTypeDecl.DV_DAYTIMEDURATION, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSSimpleTypeDecl.DAYTIMEDURATION_DT));
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:17,代码来源:ExtendedSchemaDVFactoryImpl.java


示例6: errorType

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
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,代码行数:17,代码来源:XSDSimpleTypeTraverser.java


示例7: contentRestore

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private void contentRestore() {
    fAnnotations = (XSAnnotationImpl [])fGlobalStore[--fGlobalStorePos];
    fXSSimpleType = (XSSimpleType)fGlobalStore[--fGlobalStorePos];
    fParticle = (XSParticleDecl)fGlobalStore[--fGlobalStorePos];
    fAttrGrp = (XSAttributeGroupDecl)fGlobalStore[--fGlobalStorePos];
    fBaseType = (XSTypeDefinition)fGlobalStore[--fGlobalStorePos];
    int i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
    fBlock = (short)(i >> 16);
    fContentType = (short)i;
    i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
    fDerivedBy = (short)(i >> 16);
    fFinal = (short)i;
    fTargetNamespace = (String)fGlobalStore[--fGlobalStorePos];
    fName = (String)fGlobalStore[--fGlobalStorePos];
    fIsAbstract = ((Boolean)fGlobalStore[--fGlobalStorePos]).booleanValue();
    fComplexTypeDecl = (XSComplexTypeDecl)fGlobalStore[--fGlobalStorePos];
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:18,代码来源:XSDComplexTypeTraverser.java


示例8: containsQName

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private boolean containsQName(XSSimpleType type) {
    if (type.getVariety() == XSSimpleType.VARIETY_ATOMIC) {
        short primitive = type.getPrimitiveKind();
        return (primitive == XSSimpleType.PRIMITIVE_QNAME ||
                primitive == XSSimpleType.PRIMITIVE_NOTATION);
    }
    else if (type.getVariety() == XSSimpleType.VARIETY_LIST) {
        return containsQName((XSSimpleType)type.getItemType());
    }
    else if (type.getVariety() == XSSimpleType.VARIETY_UNION) {
        XSObjectList members = type.getMemberTypes();
        for (int i = 0; i < members.getLength(); i++) {
            if (containsQName((XSSimpleType)members.item(i)))
                return true;
        }
    }
    return false;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:19,代码来源:XSDAbstractTraverser.java


示例9: checkSimpleDerivationOk

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
/**
 * check whether simple type derived is valid derived from base,
 * given a subset of {restriction, extension}.
 */
public static boolean checkSimpleDerivationOk(XSSimpleType derived, XSTypeDefinition base, short block) {
    // if derived is anySimpleType, then it's valid only if the base
    // is ur-type
    if (derived == SchemaGrammar.fAnySimpleType) {
        return (base == SchemaGrammar.fAnyType ||
                base == SchemaGrammar.fAnySimpleType);
    }

    // if base is complex type
    if (base.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
        // if base is anyType, change base to anySimpleType,
        // otherwise, not valid
        if (base == SchemaGrammar.fAnyType)
            base = SchemaGrammar.fAnySimpleType;
        else
            return false;
    }
    return checkSimpleDerivation((XSSimpleType)derived,
            (XSSimpleType)base, block);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:25,代码来源:XSConstraints.java


示例10: setValues

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
public void setValues(String name, String targetNamespace,
         XSTypeDefinition baseType, short derivedBy, short schemaFinal, 
         short block, short contentType,
         boolean isAbstract, XSAttributeGroupDecl attrGrp, 
         XSSimpleType simpleType, XSParticleDecl particle,
         XSObjectListImpl annotations) {
     fTargetNamespace = targetNamespace;
     fBaseType = baseType;
     fDerivedBy = derivedBy;
     fFinal = schemaFinal;
     fBlock = block;
     fContentType = contentType;
     if(isAbstract)
         fMiscFlags |= CT_IS_ABSTRACT;
     fAttrGrp = attrGrp;
     fXSSimpleType = simpleType;
     fParticle = particle;
     fAnnotations = annotations;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:20,代码来源:XSComplexTypeDecl.java


示例11: printOrdered

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
void printOrdered (short ordered){

    switch(ordered){
    
        case XSSimpleType.ORDERED_FALSE:
            System.err.println("'ordered' \t\t\t\t: false"  );
            break;
            
        case XSSimpleType.ORDERED_PARTIAL:
            System.err.println("'ordered' \t\t\t\t: partial"  );
            break;
            
        case XSSimpleType.ORDERED_TOTAL:
            System.err.println("'ordered' \t\t\t\t: total"  );
            break;
            
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:19,代码来源:SimpleTypeUsage.java


示例12: printVariety

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
void printVariety(short variety){

    switch(variety){

    case XSSimpleType.VARIETY_ATOMIC:
        System.err.println("'variety' \t\t\t: ATOMIC");
        break;

    case XSSimpleType.VARIETY_LIST:
        System.err.println("'variety' \t\t\t: LIST");
        break;

    case XSSimpleType.VARIETY_UNION:
        System.err.println("'variety' \t\t\t: UNION");
        break;

    default:
        System.err.println("Invalid value of 'Variety' property , it should be one of atomic, list or union.");
        break;
    }


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


示例13: main

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
public static void main(String [] args){

    SimpleTypeUsage usage = new SimpleTypeUsage();

    if(args.length == 1 ){         
        XSSimpleType builtInType = factory.getBuiltInType(args[0]);
        if(builtInType == null){
            System.err.println("Invalid built-in Simple datatype given as argument.");
            printUsage();
        }
        else {
            usage.querySimpleType(builtInType);
        }

    }else{
        printUsage();
    }

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


示例14: characters

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
	XSSimpleType simpleType=aligner.getElementType();
	boolean numericType=false;
	boolean booleanType=false;
	if (simpleType!=null) {
		if (DEBUG) log.debug("characters for SimpleType ["+new String(ch,start,length)+"]");
		if (simpleType.getNumeric()) {
			numericType=true;
		}
		if (simpleType.getBuiltInKind()==XSConstants.BOOLEAN_DT) {
			booleanType=true;
		}
	}
	documentContainer.characters(ch, start, length, numericType, booleanType);
	super.characters(ch, start, length);
}
 
开发者ID:ibissource,项目名称:iaf,代码行数:18,代码来源:XmlTo.java


示例15: getNumericType

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private static int getNumericType(RDFDatatype numeric)
{
	XSSimpleType type = (XSSimpleType) numeric.extendedTypeDefinition();
			
	if (type.derivedFromType(integerType, XSConstants.DERIVATION_EXTENSION))
		return integerType.getBuiltInKind();
	if (type.derivedFromType(decimalType, XSConstants.DERIVATION_EXTENSION))
		return decimalType.getBuiltInKind();
	if (type.derivedFromType(floatType, XSConstants.DERIVATION_EXTENSION))
		return floatType.getBuiltInKind();
	if (type.derivedFromType(doubleType, XSConstants.DERIVATION_EXTENSION))
		return doubleType.getBuiltInKind();
	
	throw new IllegalArgumentException();
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:16,代码来源:XSD.java


示例16: isIdAttribute

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
public boolean isIdAttribute(int index) {
    checkStateAttribute();
    XSSimpleType type = (XSSimpleType)getAttributeType(index);
    if (type == null) {
        return false;
    }
    return type.isIDType();
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:9,代码来源:ValidatorHandlerImpl.java


示例17: checkExtraRules

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的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:AaronZhangL,项目名称:SplitCharater,代码行数:41,代码来源:XSSimpleTypeDecl.java


示例18: createTypeUnion

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
/**
 * Create a new simple type which is derived by union from a list of other
 * simple types.
 *
 * @param name              name of the new type, could be null
 * @param targetNamespace   target namespace of the new type, could be null
 * @param finalSet          value of "final"
 * @param memberTypes       member types of the union type
 * @param annotations       set of annotations
 * @return                  the newly created simple type
 */
public XSSimpleType createTypeUnion(String name, String targetNamespace,
                                    short finalSet, XSSimpleType[] memberTypes,
                                    XSObjectList annotations) {
    int typeNum = memberTypes.length;
    XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum];
    System.arraycopy(memberTypes, 0, mtypes, 0, typeNum);

    if (fDeclPool != null) {
       XSSimpleTypeDecl st= fDeclPool.getSimpleTypeDecl();
       return st.setUnionValues(name, targetNamespace, finalSet, mtypes, annotations);
    }
    return new XSSimpleTypeDecl(name, targetNamespace, finalSet, mtypes, annotations);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:25,代码来源:BaseSchemaDVFactory.java


示例19: traverseLocal

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
XSSimpleType traverseLocal(Element elmNode,
        XSDocumentInfo schemaDoc,
        SchemaGrammar grammar) {
    
    // General Attribute Checking
    Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc);
    String name = genAnonTypeName(elmNode);
    XSSimpleType type = getSimpleType (name, elmNode, attrValues, schemaDoc, grammar);
    if (type instanceof XSSimpleTypeDecl) {
        ((XSSimpleTypeDecl)type).setAnonymous(true);
    }
    fAttrChecker.returnAttrArray(attrValues, schemaDoc);
    
    return type;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:16,代码来源:XSDSimpleTypeTraverser.java


示例20: traverseSimpleTypeDecl

import org.apache.xerces.impl.dv.XSSimpleType; //导入依赖的package包/类
private XSSimpleType traverseSimpleTypeDecl(Element simpleTypeDecl,
        Object[] attrValues,
        XSDocumentInfo schemaDoc,
        SchemaGrammar grammar) {
    
    // get name and final values
    String name = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
    return getSimpleType(name, simpleTypeDecl, attrValues, schemaDoc, grammar);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:10,代码来源:XSDSimpleTypeTraverser.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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