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