Examples of XSAttributeUse


Examples of org.apache.xerces.xs.XSAttributeUse

            appendComplexTypeDefinition(buf, jxstype);

         XSObjectList list = jxstype.getAttributeUses();
         for (int i = 0; i < list.getLength(); i++)
         {
            XSAttributeUse use = (XSAttributeUse)list.item(i);
            XSAttributeDeclaration decl = use.getAttrDeclaration();
            buf.append(write(decl));
         }

         if (baseType != null)
         {
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

   private void addAttributeMappings(XSObjectList attributes, JavaXmlTypeMapping jxtm)
   {
      for (int i = 0; i < attributes.getLength(); i++)
      {
         XSAttributeUse obj = (XSAttributeUse)attributes.item(i);
         XSAttributeDeclaration att = obj.getAttrDeclaration();
         XSSimpleTypeDefinition simple = att.getTypeDefinition();
         addJavaXMLTypeMap(simple, "none", "", "", jxtm.getJavaWsdlMapping(), true);
         VariableMapping vm = new VariableMapping(jxtm);
         String name = att.getName();
         vm.setXmlAttributeName(name);
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

      if (xsobjlist != null)
      {
         int len = xsobjlist.getLength();
         for (int i = 0; i < len; i++)
         {
            XSAttributeUse obj = (XSAttributeUse)xsobjlist.item(i);
            XSAttributeDeclaration att = obj.getAttrDeclaration();
            XSSimpleTypeDefinition xstype = att.getTypeDefinition();
            QName qn = SchemaUtils.handleSimpleType(xstype);
            boolean primitive = obj.getRequired();
            VAR v = createVAR(qn, att.getName(), pkgname, primitive);
            if (vars == null)
               vars = new ArrayList();
            vars.add(v);
         }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

         log.trace(typeName + " attributes " + attrs.getLength());

      boolean hasOnlyIdAttrs = true;
      for(int i = 0; i < attrs.getLength(); ++i)
      {
         XSAttributeUse attr = (XSAttributeUse)attrs.item(i);
         AttributeBinding attrBinding = bindAttributes(ctx, binding, attr);
         if(hasOnlyIdAttrs && !Constants.QNAME_ID.equals(attrBinding.getType().getQName()))
         {
            hasOnlyIdAttrs = false;
         }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

        }
    }

    private void onVisitAttributes(XSObjectList attributeUsesList, XSObject parent) {
        for (int i = 0; i < attributeUsesList.getLength(); ++i) {
            XSAttributeUse xsAttribute = (XSAttributeUse) attributeUsesList.item(i);
            // attribute declaration contains interesting properties of the
            // attribute
            XSAttributeDeclaration xsAttributeType = xsAttribute.getAttrDeclaration();

            XsModelWalker.logger.debug("--> Attribute [{" + xsAttributeType.getNamespace() + "}:" + xsAttributeType.getName() + "]");

            executeWorker(xsAttributeType, parent);
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

            appendComplexTypeDefinition(buf, jxstype);

         XSObjectList list = jxstype.getAttributeUses();
         for (int i = 0; i < list.getLength(); i++)
         {
            XSAttributeUse use = (XSAttributeUse)list.item(i);
            XSAttributeDeclaration decl = use.getAttrDeclaration();
            buf.append(write(decl));
         }

         if (baseType != null)
         {
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

            sendElementEvent("psv:attributeUses");
        }
        else {
            sendIndentedElement("psv:attributeUses");
            for (int i = 0; i < uses.getLength(); i++) {
                XSAttributeUse use = (XSAttributeUse)uses.item(i);
                sendIndentedElement("psv:attributeUse");
                sendElementEvent("psv:required", String.valueOf(use.getRequired()));
                processPSVIAttributeDeclarationOrRef(use.getAttrDeclaration());
                processPSVIValueConstraint(use.getConstraintType(), use.getConstraintValue());
                sendUnIndentedElement("psv:attributeUse");
            }
            sendUnIndentedElement("psv:attributeUses");
        }
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

        XSObjectList attrUseS = fromAttrGrp.getAttributeUses();
        XSAttributeUseImpl  duplicateAttrUse =  null, oneAttrUse = null;
        int attrCount = attrUseS.getLength();
        for (int i=0; i<attrCount; i++) {
            oneAttrUse = (XSAttributeUseImpl)attrUseS.item(i);
            XSAttributeUse existingAttrUse = toAttrGrp.getAttributeUse(oneAttrUse.fAttrDecl.getNamespace(),
                    oneAttrUse.fAttrDecl.getName());
            if (existingAttrUse == null) {
               
                String idName = toAttrGrp.addAttributeUse(oneAttrUse);
                if (idName != null) {
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

          parseXSModelGroup(tagInfo, tagList, (XSModelGroup) term);
        }
      }
      XSObjectList attrs = ((XSComplexTypeDefinition) type).getAttributeUses();
      for (int i = 0; i < attrs.getLength(); i++) {
        XSAttributeUse attrUse = (XSAttributeUse) attrs.item(i);
        XSAttributeDeclaration attr = attrUse.getAttrDeclaration();
        AttributeInfo attrInfo = new AttributeInfo(attr.getName(), true, AttributeInfo.NONE, attrUse.getRequired());
        tagInfo.addAttributeInfo(attrInfo);
      }

    }
  }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

      XSObjectList baseAttributeUses = (baseType != null) ? baseType.getAttributeUses() : null;

      for (int i = 0; i < attributeUses.getLength(); ++i)
      {
         XSAttributeUse attr = (XSAttributeUse)attributeUses.item(i);
        
         if (!contains(baseAttributeUses, attr))
         {
            XSAttributeDeclaration attrDecl = attr.getAttrDeclaration();
            String sName = attrDecl.getName();
            PrimitiveMessagePart part = new PrimitiveMessagePart(sName);

            if (!addPart(parent, part))
            {
               if (s_logger.isWarnEnabled())
               {
                  s_logger.warn("Ignoring duplicate XSD attribute definition \"" + attr.getName() +
                     "\" in element type \"" + def.getName() + "\"");
               }

               continue;
            }

            part.setParent(parent);

            if (attr.getRequired())
            {
               part.setMinCount(1);
            }

            part.setMaxCount(1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.