public void addAnnotation(XSAnnotation annotation) { if (fAnnotations == XSObjectListImpl.EMPTY_LIST) { fAnnotations = new XSObjectListImpl(); } ((XSObjectListImpl)fAnnotations).addXSObject(annotation); }
public void reset(){ fName = null; fTargetNamespace = null; fBaseType = null; fDerivedBy = XSConstants.DERIVATION_RESTRICTION; fFinal = XSConstants.DERIVATION_NONE; fBlock = XSConstants.DERIVATION_NONE; fMiscFlags = 0; // reset attribute group fAttrGrp.reset(); fContentType = CONTENTTYPE_EMPTY; fXSSimpleType = null; fParticle = null; fCMValidator = null; fUPACMValidator = null; if(fAnnotations != null) { // help out the garbage collector fAnnotations.clearXSObjectList(); } fAnnotations = null; if (fAssertions != null) { fAssertions.clear(); } fAssertions = null; fContext = null; }
public boolean contains(Object value) { return (value == null) ? containsNull() : containsObject(value); }
/** * Optional. Annotation. */ public XSObjectList getAnnotations() { return new XSObjectListImpl(fAnnotations, fNumAnnotations); }
private XSObjectListImpl getAssertsFromComplexType(XSComplexTypeDefinition complexTypeDef, XMLAttributes attributes) { XSObjectListImpl complexTypeAsserts = new XSObjectListImpl(); complexTypeAsserts.addXSObject((XSAssert) primaryAssertions.get(assertIdx)); complexTypeAsserts.addXSObject((XSAssert) simpleContentAsserts.get(assertIdx)); complexTypeAsserts.addXSObject((XSAssert) baseItemTypeAsserts.get(assertIdx)); int attrAssertCount = attrAsserts.getLength(); for (int attrAssertIdx = 0; attrAssertIdx < attrAssertCount; attrAssertIdx++) { complexTypeAsserts.addXSObject(attrAsserts.item(attrAssertIdx));
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; }
enumAnnotations = new XSObjectListImpl(); enumAnnotations.addXSObject(null); if (hasQName) enumNSDecls.addElement(nsDecls); DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) { enumAnnotations.addXSObject(enumAnnotations.getLength()-1,traverseAnnotationDecl(child, attrs, false, schemaDoc)); child = DOMUtil.getNextSiblingElement(child); String text = DOMUtil.getSyntheticAnnotation(content); if (text != null) { enumAnnotations.addXSObject(enumAnnotations.getLength()-1, traverseSyntheticAnnotation(content, text, attrs, false, schemaDoc)); patternAnnotations = new XSObjectListImpl(); patternAnnotations.addXSObject(traverseAnnotationDecl(child, attrs, false, schemaDoc)); child = DOMUtil.getNextSiblingElement(child); if (text != null) { if (patternAnnotations == null){ patternAnnotations = new XSObjectListImpl(); patternAnnotations.addXSObject(traverseSyntheticAnnotation(content, text, attrs, false, schemaDoc)); annotations = new XSObjectListImpl(); ((XSObjectListImpl)annotations).addXSObject(annotation);
public static Vector getAssertsFromSimpleType(XSSimpleTypeDefinition simplType) { Vector simpleTypeAsserts = new Vector(); XSObjectListImpl facetList = (XSObjectListImpl) simplType.getMultiValueFacets(); for (int facetIdx = 0; facetIdx < facetList.getLength(); facetIdx++) { XSMultiValueFacet facet = (XSMultiValueFacet) facetList.item(facetIdx); if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) { simpleTypeAsserts = facet.getAsserts(); } } return simpleTypeAsserts; } // getAssertsFromSimpleType
for (int i = fBase.patternAnnotations.getLength()-1; i >= 0; --i) { patternAnnotations.addXSObject(fBase.patternAnnotations.item(i));
public int size() { return getLength(); }
void saveInheritableAttributes(XSElementDecl currentElemDecl, XMLAttributes attributes) { if (currentElemDecl != null && currentElemDecl.fType instanceof XSComplexTypeDecl) { XSComplexTypeDecl complexTypeDecl = (XSComplexTypeDecl) currentElemDecl.fType; XSObjectListImpl attributeUses = (XSObjectListImpl) complexTypeDecl.getAttributeUses(); // iterate all the attribute declarations of the complex type, for the current element for (int attrUsesIndx = 0; attrUsesIndx < attributeUses.getLength(); attrUsesIndx++) { XSAttributeUse attrUse = (XSAttributeUse) attributeUses.get(attrUsesIndx); if (attrUse.getInheritable()) { // this is an inheritable attribute. copy into an global Vector list. XSAttributeDeclaration attrDecl = (XSAttributeDeclaration) attrUse.getAttrDeclaration(); Augmentations attrAugs = attributes.getAugmentations(attrDecl.getNamespace(), attrDecl.getName()); if (attrAugs != null) { (fXmlSchemaValidator.getInheritableAttrList()).add((AttributePSVI)attrAugs.getItem(Constants.ATTRIBUTE_PSVI)); } } } } } // saveInheritableAttributes
public Iterator iterator() { return listIterator0(0); }
/** * {particles} A list of particles */ public XSObjectList getParticles() { return new XSObjectListImpl(fParticles, fParticleCount); }
if (facetList.getLength() == 0 && simpleTypeDef.getItemType() != null) { for (int facetIdx = 0; facetIdx < facetList.getLength(); facetIdx++) { XSMultiValueFacet facet = (XSMultiValueFacet) facetList.item(facetIdx); if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) { if (simpleTypeAsserts == null) {
public ListIterator listIterator() { return listIterator0(0); }
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; } }
public XSObjectList getMemberTypeDefinitions() { if (memberTypes == null) { return XSObjectListImpl.EMPTY_LIST; } return new XSObjectListImpl(memberTypes, memberTypes.length); }
public ListIterator listIterator(int index) { if (index >= 0 && index < fLength) { return listIterator0(index); } throw new IndexOutOfBoundsException("Index: " + index); }
XSObjectListImpl resultComps = new XSObjectListImpl(); for (int i = 0, n = result.size(); i < n; ++i) { resultComps.addXSObject((XSObject)result.get(i));
/** * @see org.apache.xerces.xs.XSNamespaceItem#getAnnotations() */ public XSObjectList getAnnotations() { if (fNumAnnotations == 0) { return XSObjectListImpl.EMPTY_LIST; } return new XSObjectListImpl(fAnnotations, fNumAnnotations); }