Package org.codehaus.enunciate.contract.jaxb

Examples of org.codehaus.enunciate.contract.jaxb.Element


  }

  @Override
  public String convert(Accessor accessor) throws TemplateModelException {
    if (accessor.isCollectionType() && accessor instanceof Element) {
      Element element = (Element) accessor;
      //@XmlElementRefs and @XmlElements can't
      if (element instanceof ElementRef && ((ElementRef) element).isElementRefs()) {
        return "com.google.gwt.core.client.JsArray";
      }
      else if (element.getAnnotation(XmlElements.class) != null) {
        return "com.google.gwt.core.client.JsArray";
      }
    }
    return super.convert(accessor);
  }
View Full Code Here


    TypeDeclaration decl = getDeclaration("org.codehaus.enunciate.samples.anotherschema.BeanWithPropertyAdaptedBySubclass");
    ComplexTypeDefinition ct = new ComplexTypeDefinition((ClassDeclaration) decl);
    EnunciateFreemarkerModel model = new EnunciateFreemarkerModel();
    FreemarkerModel.set(model);
    model.add(ct);
    Element el = ct.getElements().first();
    assertEquals(KnownXmlType.LONG.getQname(), el.getBaseType().getQname());
//    assertEquals("org.codehaus.enunciate.samples.anotherschema.BeanTwo", ((DeclaredType) el.getAdapterType().getAdaptedType()).getDeclaration().getQualifiedName());
  }
View Full Code Here

    TypeDeclaration decl = getDeclaration("org.codehaus.enunciate.samples.schema.BeanWithAdaptedIfaceAccessor");
    ComplexTypeDefinition ct = new ComplexTypeDefinition((ClassDeclaration) decl);
    EnunciateFreemarkerModel model = new EnunciateFreemarkerModel();
    FreemarkerModel.set(model);
    model.add(ct);
    Element el = ct.getElements().first();
    assertEquals(new QName("urn:adaptediface", "adaptediface"), el.getBaseType().getQname());
//    assertEquals("org.codehaus.enunciate.samples.anotherschema.BeanTwo", ((DeclaredType) el.getAdapterType().getAdaptedType()).getDeclaration().getQualifiedName());
  }
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.contract.jaxb.Element

Copyright © 2018 www.massapicom. 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.