Examples of JAXBClass


Examples of org.apache.ws.jaxme.xs.jaxb.JAXBClass

      schemaBindings = jaxbClassOwner.getJAXBSchemaBindings();
    }
   
    String packageName = getPackageName(pSchemaSG, schemaBindings, locator, pQName);
    String className = null, implementationName = null;
    JAXBClass jaxbClass = (jaxbClassOwner == null) ? null : jaxbClassOwner.getJAXBClass();
    if (jaxbClass != null) {
      className = jaxbClass.getName();
      implementationName = jaxbClass.getImplClass();
    }
   
    if (className == null) {
      String prefix = null, suffix = null;
      className = getClassNameFromLocalName(locator, pQName.getLocalName(), pSchemaSG);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBClass

    if (pJAXBClassOwner instanceof JAXBClassOwner) {
      jaxbClassOwner = (JAXBClassOwner) pJAXBClassOwner;
    }

    String className = null, implementationName = null;
    JAXBClass jaxbClass = (jaxbClassOwner == null) ? null : jaxbClassOwner.getJAXBClass();
    if (jaxbClass != null) {
      className = jaxbClass.getName();
      implementationName = jaxbClass.getImplClass();
    }

    if (className == null) {
      String prefix = null, suffix = null;
      className = getClassNameFromLocalName(pJAXBClassOwner.getLocator(), pName, pSchemaSG);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBClass

      InputSource isource = new InputSource(new StringReader(schemaSource));
      isource.setSystemId("testClass1.xsd");
      JAXBSchema schema = (JAXBSchema) parser.parse(isource);
      JAXBType a = (JAXBType) schema.getType(new XsQName((String) null, "a"));
      assertNotNull(a);
      JAXBClass jaxbClass = a.getJAXBClass();
      assertNotNull(jaxbClass);
      assertEquals("b", jaxbClass.getName());
      assertEquals("com.b.c", jaxbClass.getImplClass());
      XSParticle p1 = assertComplexContent(assertComplexType(a));
      XSGroup group = assertGroup(p1);
      XSParticle[] particles = group.getParticles();
      assertEquals(2, particles.length);
      JAXBElement f = (JAXBElement) assertElement(particles[1]);
      jaxbClass = f.getJAXBClass();
      assertNotNull(jaxbClass);
      assertEquals("x", jaxbClass.getName());
      assertNull(jaxbClass.getImplClass());


      JAXBElement g = (JAXBElement) schema.getElement(new XsQName((String) null, "g"));
      assertNotNull(g);
      assertNull(g.getJAXBClass());

      JAXBGroup m = (JAXBGroup) schema.getGroup(new XsQName((String) null, "m"));
      jaxbClass = m.getJAXBClass();
      assertNotNull(jaxbClass);
      assertEquals("k", jaxbClass.getName());
      assertEquals("com.b.i", jaxbClass.getImplClass());
    }

    {
      final String schemaSource =
        "<?xml version='1.0'?>\n" +
        "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'" +
        "           xmlns:jaxb='" + JAXBParser.JAXB_SCHEMA_URI + "'>\n" +
        "  <xs:complexType name='d'>\n" +
        "    <xs:sequence>\n" +
        "      <xs:element name='e'>\n" +
        "        <xs:complexType name='a'>\n" +
        "          <xs:annotation>\n" +
        "            <xs:appinfo>\n" +
        "              <jaxb:class name='b'/>\n" +
        "            </xs:appinfo>\n" +
        "          </xs:annotation>\n" +
        "          <xs:sequence>\n" +
        "            <xs:element name='x' type='xs:int'/>\n" +
        "          </xs:sequence>\n" +
        "          <xs:attribute name='y' type='xs:string'/>\n" +
        "        </xs:complexType>\n" +
        "      </xs:element>\n" +
        "      <xs:element name='f' type='xs:string'>\n" +
        "        <xs:annotation>\n" +
        "          <xs:appinfo>\n" +
        "            <jaxb:class name='x'/>\n" +
        "          </xs:appinfo>\n" +
        "        </xs:annotation>\n" +
        "      </xs:element>\n" +
        "      <xs:element name='g' type='xs:string'/>\n" +
        "    </xs:sequence>\n" +
        "  </xs:complexType>\n" +
        "</xs:schema>";
 
      JAXBParser parser = newJAXBParser();
      InputSource isource = new InputSource(new StringReader(schemaSource));
      isource.setSystemId("testJAXBClass2.xsd");
      JAXBSchema schema = (JAXBSchema) parser.parse(isource);
      JAXBType d = (JAXBType) schema.getType(new XsQName((String) null, "d"));
      assertNotNull(d);
      XSGroup dGroup = assertGroup(assertComplexContent(assertComplexType(d)));
      assertSequence(dGroup);
      XSParticle[] particles = dGroup.getParticles();
      assertEquals(3, particles.length);
      JAXBElement e = (JAXBElement) assertElement(particles[0]);
      JAXBType a = (JAXBType) e.getType();
      JAXBClass jaxbClass = a.getJAXBClass();
      assertNotNull(jaxbClass);
      assertEquals("b", jaxbClass.getName());
      assertNull(jaxbClass.getImplClass());

      JAXBElement f = (JAXBElement) assertElement(particles[1]);
      assertEquals(new XsQName((String) null, "f"), f.getName());
      assertNotNull(f);
      jaxbClass = f.getJAXBClass();
      assertNotNull(jaxbClass);
      assertEquals("x", jaxbClass.getName());
      assertNull(jaxbClass.getImplClass());

      JAXBElement g = (JAXBElement) assertElement(particles[2]);
      assertEquals(new XsQName((String) null, "g"), g.getName());
      assertNotNull(g);
      assertNull(g.getJAXBClass());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBClass

    if (packageName == null) {
      packageName = getPackageNameFromURI(locator, pQName.getNamespaceURI());
    }
   
    String className = null, implementationName = null;
    JAXBClass jaxbClass = (jaxbClassOwner == null) ? null : jaxbClassOwner.getJAXBClass();
    if (jaxbClass != null) {
      className = jaxbClass.getName();
      implementationName = jaxbClass.getImplClass();
    }
   
    if (className == null) {
      String prefix = null, suffix = null;
      className = getClassNameFromLocalName(locator, pQName.getLocalName(), pSchemaSG);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.jaxb.JAXBClass

      schemaBindings = jaxbClassOwner.getJAXBSchemaBindings();
    }
   
    String packageName = getPackageName(pSchemaSG, schemaBindings, locator, pQName);
    String className = null, implementationName = null;
    JAXBClass jaxbClass = (jaxbClassOwner == null) ? null : jaxbClassOwner.getJAXBClass();
    if (jaxbClass != null) {
      className = jaxbClass.getName();
      implementationName = jaxbClass.getImplClass();
      if (className != null) {
        pQName = new XsQName(pQName.getNamespaceURI(), className);
      }
    }
    setName(pQName);
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.