public AttributeEncodeExecutor( Object object, XSDAttributeDeclaration attribute, Document document, Logger logger) { this.object = object; this.attribute = attribute; this.document = document; this.logger = logger; encoding = document.createAttributeNS(attribute.getTargetNamespace(), attribute.getName()); }
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); } } }
@Override public boolean isIdentifiable(XSDComplexTypeDefinition typeDefinition) { List attributeUses = typeDefinition.getAttributeUses(); final String idAttName = getId().getLocalPart(); for (Iterator it = attributeUses.iterator(); it.hasNext(); ) { XSDAttributeUse use = (XSDAttributeUse) it.next(); XSDAttributeUseCategory useCategory = use.getUse(); XSDAttributeDeclaration idAtt = use.getAttributeDeclaration(); String targetNamespace = idAtt.getTargetNamespace(); String name = idAtt.getName(); if (getNameSpace().equals(targetNamespace) && idAttName.equals(name)) { if (XSDAttributeUseCategory.REQUIRED_LITERAL.equals(useCategory)) { return true; } } } return false; }
for (Iterator itr = attributes.iterator(); itr.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration)itr.next(); if (attribute.getName() == null) continue; if (!ns.equals(attribute.getTargetNamespace())) continue; stringBuffer.append(attribute.getName()); stringBuffer.append(TEXT_23); stringBuffer.append(ns); stringBuffer.append(TEXT_24); stringBuffer.append(attribute.getName()); stringBuffer.append(TEXT_25);
String msg = "Encode failed for " + attribute.getName() + ". Cause: " + t.getLocalizedMessage();
XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next(); if ( attribute.getAnonymousTypeDefinition() != null ) { attribute.getAnonymousTypeDefinition().setName( "_" + attribute.getName() ); anonymous.add( attribute.getAnonymousTypeDefinition() );
String local = attribute.getName();
XSDAttributeDeclaration ad = (XSDAttributeDeclaration) a.next(); if (Utilities.equals(ad.getTargetNamespace(), attribute.getTargetNamespace()) && Utilities.equals(ad.getName(), attribute.getName())) { type = ad.getTypeDefinition(); break; if ( "uom".equals( attribute.getName() ) ) { System.out.println();
getXmlAttributeType(), null, new NameImpl(null, "@" + att.getName()), 0, 1,
AttributeInstance att = new AttributeImpl(decl); att.setNamespace(decl.getTargetNamespace()); att.setName(decl.getName()); att.setText(attributes.getValue(i));
public String getName() { XSDAttributeDeclaration resolvedAttributeDeclaration = getResolvedXSDAttributeDeclaration(); String name = resolvedAttributeDeclaration.getName(); return (name == null) ? "" : name; //$NON-NLS-1$ }
public AttributeEncodeExecutor( Object object, XSDAttributeDeclaration attribute, Document document, Logger logger ) { this.object = object; this.attribute = attribute; this.document = document; this.logger = logger; encoding = document .createAttributeNS(attribute.getTargetNamespace(), attribute.getName()); }
public AttributeEncodeExecutor(Object object, XSDAttributeDeclaration attribute, Document document, Logger logger) { this.object = object; this.attribute = attribute; this.document = document; this.logger = logger; encoding = document.createAttributeNS(attribute.getTargetNamespace(), attribute.getName()); }
public AttributeEncodeExecutor(Object object, XSDAttributeDeclaration attribute, Document document, Logger logger) { this.object = object; this.attribute = attribute; this.document = document; this.logger = logger; encoding = document.createAttributeNS(attribute.getTargetNamespace(), attribute.getName()); }
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); } } }
@Override public String getText(Object object) { XSDAttributeDeclaration xsdAttributeDeclaration = ((XSDAttributeDeclaration)object); XSDAttributeDeclaration resolvedXSDAttributeDeclaration = xsdAttributeDeclaration.getResolvedAttributeDeclaration(); String result = resolvedXSDAttributeDeclaration.getName(); return result == null ? XSDEditPlugin.INSTANCE.getString("_UI_Absent_label") : result; } };
public String getText(Object element) { if (element instanceof XSDElementDeclaration) return ((XSDElementDeclaration) element).getName(); if (element instanceof XSDAttributeDeclaration ) return ((XSDAttributeDeclaration) element).getName(); return super.getText(element); } }