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

Java XSObjectList类代码示例

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

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



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

示例1: XSSimpleTypeDecl

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
protected XSSimpleTypeDecl(String name, String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable,
        XSObjectList annotations) {
    fBase = fAnySimpleType;
    fTypeName = name;
    fTargetNamespace = uri;
    fFinalSet = finalSet;
    fAnnotations = annotations;

    fVariety = VARIETY_LIST;
    fItemType = (XSSimpleTypeDecl)itemType;
    fValidationDV = DV_LIST;
    fFacetsDefined = FACET_WHITESPACE;
    fFixedFacet = FACET_WHITESPACE;
    fWhiteSpace = WS_COLLAPSE;

    //setting fundamental facets
    calcFundamentalFacets();
    fIsImmutable = isImmutable;

    // Values of this type are lists
    fBuiltInKind = XSConstants.LIST_DT;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:XSSimpleTypeDecl.java


示例2: setListValues

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
protected XSSimpleTypeDecl setListValues(String name, String uri, short finalSet, XSSimpleTypeDecl itemType,
        XSObjectList annotations) {
    //decline to do anything if the object is immutable.
    if(fIsImmutable) return null;
    fBase = fAnySimpleType;
    fAnonymous = false;
    fTypeName = name;
    fTargetNamespace = uri;
    fFinalSet = finalSet;
    fAnnotations = annotations;

    fVariety = VARIETY_LIST;
    fItemType = (XSSimpleTypeDecl)itemType;
    fValidationDV = DV_LIST;
    fFacetsDefined = FACET_WHITESPACE;
    fFixedFacet = FACET_WHITESPACE;
    fWhiteSpace = WS_COLLAPSE;

    //setting fundamental facets
    calcFundamentalFacets();

    // Values of this type are lists
    fBuiltInKind = XSConstants.LIST_DT;

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


示例3: isDerivedByUnion

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的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


示例4: expandRelatedSimpleTypeComponents

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的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


示例5: containsQName

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的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:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:XSDAbstractTraverser.java


示例6: setUnionValues

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
protected XSSimpleTypeDecl setUnionValues(String name, String uri, short finalSet, XSSimpleTypeDecl[] memberTypes,
        XSObjectList annotations) {
    //decline to do anything if the object is immutable.
    if(fIsImmutable) return null;
    fBase = fAnySimpleType;
    fAnonymous = false;
    fTypeName = name;
    fTargetNamespace = uri;
    fFinalSet = finalSet;
    fAnnotations = annotations;

    fVariety = VARIETY_UNION;
    fMemberTypes = memberTypes;
    fValidationDV = DV_UNION;
    // even for union, we set whitespace to something
    // this will never be used, but we can use fFacetsDefined to check
    // whether applyFacets() is allwwed: it's not allowed
    // if fFacetsDefined != 0
    fFacetsDefined = FACET_WHITESPACE;
    fWhiteSpace = WS_COLLAPSE;

    //setting fundamental facets
    calcFundamentalFacets();

    // No value can be of this type, so it's unavailable.
    fBuiltInKind = XSConstants.UNAVAILABLE_DT;

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


示例7: getMemberTypes

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
/**
 * If variety is <code>union</code> the list of member type definitions (a
 * non-empty sequence of simple type definitions) is available,
 * otherwise an empty <code>XSObjectList</code>.
 */
public XSObjectList getMemberTypes() {
    if (fVariety == VARIETY_UNION) {
        return new XSObjectListImpl(fMemberTypes, fMemberTypes.length);
    }
    else {
        return XSObjectListImpl.EMPTY_LIST;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:XSSimpleTypeDecl.java


示例8: createTypeUnion

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的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:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:BaseSchemaDVFactory.java


示例9: isListDatatype

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
private boolean isListDatatype(XSSimpleType validator) {
    if (validator.getVariety() == XSSimpleType.VARIETY_LIST)
        return true;

    if (validator.getVariety() == XSSimpleType.VARIETY_UNION) {
        XSObjectList temp = validator.getMemberTypes();
        for (int i = 0; i < temp.getLength(); i++) {
            if (((XSSimpleType)temp.item(i)).getVariety() == XSSimpleType.VARIETY_LIST) {
                return true;
            }
        }
    }

    return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:XSDSimpleTypeTraverser.java


示例10: expandRelatedAttributeUsesComponents

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
private void expandRelatedAttributeUsesComponents(XSObjectList attrUses, Vector componentList,
        String namespace, Map<String, Vector> dependencies) {
    final int attrUseSize = (attrUses == null) ? 0 : attrUses.size();
    for (int i=0; i<attrUseSize; i++) {
        expandRelatedAttributeUseComponents((XSAttributeUse)attrUses.item(i), componentList, namespace, dependencies);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:XSDHandler.java


示例11: expandRelatedModelGroupComponents

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
private void expandRelatedModelGroupComponents(XSModelGroup modelGroup, Vector componentList,
        String namespace, Map<String, Vector> dependencies) {
    XSObjectList particles = modelGroup.getParticles();
    final int length = (particles == null) ? 0 : particles.getLength();
    for (int i=0; i<length; i++) {
        expandRelatedParticleComponents((XSParticle)particles.item(i), componentList, namespace, dependencies);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:XSDHandler.java


示例12: setValues

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的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


示例13: getAnnotations

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
/**
 * @see org.apache.xerces.xs.XSNamespaceItem#getAnnotations()
 */
public XSObjectList getAnnotations() {
    if (fNumAnnotations == 0) {
        return XSObjectListImpl.EMPTY_LIST;
    }
    return new XSObjectListImpl(fAnnotations, fNumAnnotations);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:SchemaGrammar.java


示例14: copyFrom

import com.sun.org.apache.xerces.internal.xs.XSObjectList; //导入依赖的package包/类
public void copyFrom(XSValue o) {
    if (o == null) {
        reset();
    }
    else if (o instanceof ValidatedInfo) {
        ValidatedInfo other = (ValidatedInfo)o;
        normalizedValue = other.normalizedValue;
        actualValue = other.actualValue;
        actualValueType = other.actualValueType;
        actualType = other.actualType;
        memberType = other.memberType;
        memberTypes = other.memberTypes;
        itemValueTypes = other.itemValueTypes;
    }
    else {
        normalizedValue = o.getNormalizedValue();
        actualValue = o.getActualValue();
        actualValueType = o.getActualValueType();
        actualType = (XSSimpleType)o.getTypeDefinition();
        memberType = (XSSimpleType)o.getMemberTypeDefinition();
        XSSimpleType realType = memberType == null ? actualType : memberType;
        if (realType != null && realType.getBuiltInKind() == XSConstants.LISTOFUNION_DT) {
            XSObjectList members = o.getMemberTypeDefinitions();
            memberTypes = new XSSimpleType[members.getLength()];
            for (int i = 0; i < members.getLength(); i++) {
                memberTypes[i] = (XSSimpleType)members.get(i);
            }
        }
        else {
            memberTypes = null;
        }
        itemValueTypes = o.getListValueTypes();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:35,代码来源:ValidatedInfo.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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