/** * {particles} A list of particles */ public XSObjectList getParticles() { return new XSObjectListImpl(fParticles, fParticleCount); }
public XSObjectList getMemberTypeDefinitions() { if (memberTypes == null) { return XSObjectListImpl.EMPTY_LIST; } return new XSObjectListImpl(memberTypes, memberTypes.length); }
/** * Optional. Annotation. */ public XSObjectList getAnnotations() { return new XSObjectListImpl(fAnnotations, fNumAnnotations); }
/** * @see org.apache.xerces.xs.XSNamespaceItem#getAnnotations() */ public XSObjectList getAnnotations() { if (fNumAnnotations == 0) { return XSObjectListImpl.EMPTY_LIST; } return new XSObjectListImpl(fAnnotations, fNumAnnotations); }
/** * If variety is <code>union</code> the list of member type definitions (a * non-empty sequence of simple type definitions) if 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; } }
/** * {attribute uses} A set of attribute uses. */ public XSObjectList getAttributeUses() { if (fAttrUses == null) { if (fAttrUseNum > 0) { fAttrUses = new XSObjectListImpl(fAttributeUses, fAttrUseNum); } else { fAttrUses = XSObjectListImpl.EMPTY_LIST; } } return fAttrUses; }
/** * [annotations]: a set of annotations if it exists, otherwise an empty * <code>XSObjectList</code>. */ public synchronized XSObjectList getAnnotations() { if (fAnnotations != null) { return fAnnotations; } // do this in two passes to avoid inaccurate array size int totalAnnotations = 0; for (int i = 0; i < fGrammarCount; i++) { totalAnnotations += fGrammarList[i].fNumAnnotations; } if (totalAnnotations == 0) { fAnnotations = XSObjectListImpl.EMPTY_LIST; return fAnnotations; } XSAnnotationImpl [] annotations = new XSAnnotationImpl [totalAnnotations]; int currPos = 0; for (int i = 0; i < fGrammarCount; i++) { SchemaGrammar currGrammar = fGrammarList[i]; if (currGrammar.fNumAnnotations > 0) { System.arraycopy(currGrammar.fAnnotations, 0, annotations, currPos, currGrammar.fNumAnnotations); currPos += currGrammar.fNumAnnotations; } } fAnnotations = new XSObjectListImpl(annotations, annotations.length); return fAnnotations; }
public void addAnnotation(XSAnnotation annotation) { if (fAnnotations == XSObjectListImpl.EMPTY_LIST) { fAnnotations = new XSObjectListImpl(); } ((XSObjectListImpl)fAnnotations).addXSObject(annotation); }
public XSFacetImpl(short kind, String svalue, int ivalue, Object avalue, boolean fixed, XSAnnotation annotation) { this.kind = kind; this.svalue = svalue; this.ivalue = ivalue; this.avalue = avalue; this.fixed = fixed; if (annotation != null) { this.annotations = new XSObjectListImpl(); ((XSObjectListImpl)this.annotations).addXSObject(annotation); } else { this.annotations = XSObjectListImpl.EMPTY_LIST; } }
XSObjectListImpl resultComps = new XSObjectListImpl(); for (int i = 0, n = result.size(); i < n; ++i) { resultComps.addXSObject((XSObject)result.get(i));
private XSObjectListImpl getGlobalElements() { final SymbolHash[] tables = new SymbolHash[fGrammarCount]; int length = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i] = fGrammarList[i].fAllGlobalElemDecls; length += tables[i].getLength(); } if (length == 0) { return XSObjectListImpl.EMPTY_LIST; } final XSObject[] components = new XSObject[length]; int start = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i].getValues(components, start); start += tables[i].getLength(); } return new XSObjectListImpl(components, length); }
private XSObjectListImpl getAssertsFromAttributes(XMLAttributes attributes) { XSObjectListImpl attrAssertList = new XSObjectListImpl(); List xsTypeList = new ArrayList(); for (int attrIndx = 0; attrIndx < attributes.getLength(); attrIndx++) { Augmentations attrAugs = attributes.getAugmentations(attrIndx); AttributePSVImpl attrPSVI = (AttributePSVImpl) attrAugs.getItem(Constants.ATTRIBUTE_PSVI); XSSimpleTypeDefinition attrType = (XSSimpleTypeDefinition) attrPSVI.getTypeDefinition(); if (attrType != null && !XS11TypeHelper.isListContainsType(xsTypeList, attrType)) { // since different attributes may be validated by the same type, so we deduplicate the type list here // to only store unique assertions. xsTypeList.add(attrType); List attrAsserts = getAssertsFromSimpleType(attrType); // copy assertions to the parent list if (attrAsserts != null) { for (Iterator iter = attrAsserts.iterator(); iter.hasNext();) { attrAssertList.addXSObject((XSAssertImpl)iter.next()); } } } } return attrAssertList; } // getAssertsFromAttributes
private XSObjectListImpl getAssertsFromComplexType(XSComplexTypeDefinition complexTypeDef, XMLAttributes attributes) { XSObjectListImpl complexTypeAsserts = new XSObjectListImpl();
private SymbolHash buildSubGroups(short s4sVersion) { SubstitutionGroupHandler sgHandler = new SubstitutionGroupHandler(null); for (int i = 0 ; i < fGrammarCount; i++) { sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups()); } final XSObjectListImpl elements = getGlobalElements(); final int len = elements.getLength(); final SymbolHash subGroupMap = new SymbolHash(len*2); XSElementDecl head; XSElementDeclaration[] subGroup; for (int i = 0; i < len; i++) { head = (XSElementDecl)elements.item(i); subGroup = sgHandler.getSubstitutionGroup(head, s4sVersion); subGroupMap.put(head, subGroup.length > 0 ? new XSObjectListImpl(subGroup, subGroup.length) : XSObjectListImpl.EMPTY_LIST); } return subGroupMap; }
private SymbolHash buildSubGroups_Org(short s4sVersion) { SubstitutionGroupHandler sgHandler = new SubstitutionGroupHandler(null); for (int i = 0 ; i < fGrammarCount; i++) { sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups()); } final XSNamedMap elements = getComponents(XSConstants.ELEMENT_DECLARATION); final int len = elements.getLength(); final SymbolHash subGroupMap = new SymbolHash(len*2); XSElementDecl head; XSElementDeclaration[] subGroup; for (int i = 0; i < len; i++) { head = (XSElementDecl)elements.item(i); subGroup = sgHandler.getSubstitutionGroup(head, s4sVersion); subGroupMap.put(head, subGroup.length > 0 ? new XSObjectListImpl(subGroup, subGroup.length) : XSObjectListImpl.EMPTY_LIST); } return subGroupMap; }
count++; fMultiValueFacets = new XSObjectListImpl(facets, count);
final XSObjectListImpl annotations = ctd1.getAnnotations() instanceof XSObjectListImpl ? (XSObjectListImpl) ctd1.getAnnotations() : new XSObjectListImpl(); ctd.setValues(o.getName(), ctd1.getNamespace(), ctd1.getBaseType(), ctd1.getDerivationMethod(), ctd1.getFinal(), ctd1.getProhibitedSubstitutions(), ctd1.getContentType(), final XSObjectListImpl annotations = ctd1.getAnnotations() instanceof XSObjectListImpl ? (XSObjectListImpl) ctd1.getAnnotations() : new XSObjectListImpl(); ctd.setValues(o.getName(), ctd1.getNamespace(), ctd1.getBaseType(), XSConstants.DERIVATION_RESTRICTION, ctd1.getFinal(), (short) 0, XSComplexTypeDefinition.CONTENTTYPE_SIMPLE,
XSObjectList annotations; if (annotation != null) { annotations = new XSObjectListImpl(); ((XSObjectListImpl) annotations).addXSObject(annotation); } else {
annotations = new XSObjectListImpl(); ((XSObjectListImpl) annotations).addXSObject(annotation); } else {
annotations = new XSObjectListImpl(); ((XSObjectListImpl) annotations).addXSObject(annotation); } else {