protected void buildAttriubuteIndex() { attributeIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext(); ) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next(); QName qName = new QName(attribute.getTargetNamespace(), attribute.getName()); attributeIndex.put(qName, attribute); } } }
List attributes = schema.getAttributeDeclarations(); for (Iterator itr = attributes.iterator(); itr.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration)itr.next();
List attributes = schema.getAttributeDeclarations();
for ( Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext(); ) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next(); if ( attribute.getAnonymousTypeDefinition() != null ) {
if (type == null) { for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) { XSDAttributeDeclaration ad = (XSDAttributeDeclaration) a.next(); if (Utilities.equals(ad.getTargetNamespace(), attribute.getTargetNamespace())
if (type == null) { for (XSDAttributeDeclaration ad : schema.getAttributeDeclarations()) { if (Utilities.equals(ad.getTargetNamespace(), attribute.getTargetNamespace())
protected void buildAttriubuteIndex() { attributeIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next(); QName qName = new QName(attribute.getTargetNamespace(), attribute.getName()); attributeIndex.put(qName, attribute); } } }
protected void buildAttriubuteIndex() { attributeIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next(); QName qName = new QName(attribute.getTargetNamespace(), attribute.getName()); attributeIndex.put(qName, attribute); } } }
protected void buildAttriubuteIndex() { attributeIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a .next(); QName qName = new QName(attribute.getTargetNamespace(), attribute.getName()); attributeIndex.put(qName, attribute); } } }
protected XSDAttributeDeclaration setGlobalAttributeReference(XSDSchema xsdSchema) { List list = xsdSchema.getAttributeDeclarations(); XSDAttributeDeclaration referencedAttribute = null; boolean isUserDefined = false; for (Iterator i = list.iterator(); i.hasNext(); ) { Object obj = i.next(); if (obj instanceof XSDAttributeDeclaration) { XSDAttributeDeclaration attr = (XSDAttributeDeclaration) obj; if (!XSDConstants.SCHEMA_INSTANCE_URI_2001.equals(attr.getTargetNamespace())) { referencedAttribute = attr; isUserDefined = true; break; } } } if (!isUserDefined) { referencedAttribute = createGlobalXSDAttributeDeclaration(xsdSchema); Text textNode = xsdSchema.getDocument().createTextNode("\n"); //$NON-NLS-1$ xsdSchema.getElement().appendChild(textNode); xsdSchema.getContents().add(referencedAttribute); } return referencedAttribute; }
public java.util.List getGlobalAttributes() { Vector items = new Vector(); if (xsdSchema != null) { updateExternalImportGlobals(); if (xsdSchema.getAttributeDeclarations() != null) { Iterator i = xsdSchema.getAttributeDeclarations().iterator(); while (i.hasNext()) { XSDAttributeDeclaration attributeDeclaration = (XSDAttributeDeclaration) i.next(); if (attributeDeclaration.getTargetNamespace() == null || (attributeDeclaration.getTargetNamespace() != null && !attributeDeclaration.getTargetNamespace().equals(XSDConstants.SCHEMA_INSTANCE_URI_2001))) { String name = attributeDeclaration.getQName(xsdSchema); if (name != null) { items.add(name); } } } } // items = addExternalImportedAttributes(items); items = (Vector) sortList(items); } return items; }
List attributes = xsdSchema.getAttributeDeclarations(); String targetNamespace = xsdSchema.getTargetNamespace();
protected XSDAttributeDeclaration createGlobalXSDAttributeDeclaration(XSDSchema xsdSchema) { ensureSchemaElement(xsdSchema); XSDAttributeDeclaration attribute = XSDFactory.eINSTANCE.createXSDAttributeDeclaration(); attribute.setTypeDefinition(xsdSchema.getSchemaForSchema().resolveSimpleTypeDefinition("string")); //$NON-NLS-1$ attribute.setName(XSDCommonUIUtils.createUniqueElementName("NewAttribute", xsdSchema.getAttributeDeclarations())); //$NON-NLS-1$ Text textNode = xsdSchema.getDocument().createTextNode("\n"); //$NON-NLS-1$ xsdSchema.getElement().appendChild(textNode); xsdSchema.getContents().add(attribute); return attribute; }
public void visitSchema(XSDSchema schema) for (Iterator iterator = schema.getAttributeDeclarations().iterator(); iterator.hasNext();)
public List getAttributeList(XSDSchema xsdSchema, boolean showFromIncludes) for (Iterator iter = xsdSchema.getAttributeDeclarations().iterator(); iter.hasNext();)
public void visitSchema(XSDSchema schema) for (Iterator iterator = schema.getAttributeDeclarations().iterator(); iterator.hasNext();)
xsiSchemas.iterator().next().getAttributeDeclarations());
(XSDEditPlugin.INSTANCE.getString("_UI_Attributes_label"), XSDEditPlugin.INSTANCE.getImage("full/obj16/XSDAttributeDeclaration"), xsdSchema.getAttributeDeclarations())); children.add (new ChildItemProvider
public void propogateComponents(XSDSchema otherXSDSchema) { otherXSDSchema.getAnnotations().addAll(getAnnotations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getAttributeDeclarations(), getAttributeDeclarations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getAttributeGroupDefinitions(), getAttributeGroupDefinitions()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getElementDeclarations(), getElementDeclarations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getModelGroupDefinitions(), getModelGroupDefinitions()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getTypeDefinitions(), getTypeDefinitions()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getNotationDeclarations(), getNotationDeclarations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getIdentityConstraintDefinitions(), getIdentityConstraintDefinitions()); }
public void propogateComponents(XSDSchema otherXSDSchema) { otherXSDSchema.getAnnotations().addAll(getAnnotations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getAttributeDeclarations(), getAttributeDeclarations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getAttributeGroupDefinitions(), getAttributeGroupDefinitions()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getElementDeclarations(), getElementDeclarations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getModelGroupDefinitions(), getModelGroupDefinitions()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getTypeDefinitions(), getTypeDefinitions()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getNotationDeclarations(), getNotationDeclarations()); XSDNamedComponentImpl.mergeToSortedList (otherXSDSchema.getIdentityConstraintDefinitions(), getIdentityConstraintDefinitions()); }