Examples of JAXBJavaType


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

    JAXBJavaType[] globalJavaTypes = pSchema.getJAXBJavaTypes();
   
    for (XSType currentType = pType;  currentType != null) {
      if (currentType instanceof JAXBType) {
        JAXBType jaxbType = (JAXBType) currentType;
        JAXBJavaType jaxbJavaType = jaxbType.getJAXBJavaType();
        if (jaxbJavaType == null) {
          return jaxbJavaType;
        }
      }
        for (int i = 0;  i < globalJavaTypes.length;  i++) {
View Full Code Here

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

                                          SchemaSG pSchema, XSType pType) throws SAXException {
    if (!pType.isSimple()) {
      throw new IllegalStateException("Expected a simple type");
    }

    JAXBJavaType javaType = findJavaType(pSchema, pType);
    SimpleTypeSGChain result;
    if (javaType == null  ||  javaType.getName() == null) {
        XSSimpleType simpleType = pType.getSimpleType();
        JavaQName runtimeType;
        if (simpleType.isAtomic()) {
          result = newGlobalAtomicTypeSG(pFactory, pSchema, pType);
            if (result == null) {
                if (!simpleType.isRestriction()) {
                    throw new SAXParseException("Atomic type must be either a builtin or a restriction of another atomic type",
                                                pType.getLocator());
                }
                TypeSG type = pSchema.getType(simpleType.getRestrictedType().getName());
                runtimeType = type.getSimpleTypeSG().getRuntimeType();
                result = newAtomicTypeRestriction(pController, pFactory, pSchema, pType);
            } else {
                SimpleTypeSG simpleTypeSG = new SimpleTypeSGImpl(result);
                simpleTypeSG.init();
              runtimeType = simpleTypeSG.getRuntimeType();
            }
            if (javaType == null) {
                JAXBJavaType[] globalJavaTypes = pSchema.getJAXBJavaTypes();
                for (int i = 0;  i < globalJavaTypes.length;  i++) {
                  if (runtimeType.equals(globalJavaTypes[i].getName())) {
                        javaType = globalJavaTypes[i];
                        break;
                    }
                }
            }
        } else if (simpleType.isList()) {
          result = new ListTypeSGImpl(pFactory, pSchema, pType, classContext, pController.getName());
        } else if (simpleType.isUnion()) {
            result = new UnionTypeSGImpl(pFactory, pSchema, pType, classContext, pController.getName());
        } else {
            throw new IllegalStateException("Simple type " + pType + " is neither of atomic, list, or union");
        }
    } else {
        result = newSimpleTypeSGByJavaType(javaType, pFactory, pSchema, pType);
    }

    if (javaType != null  &&
        (javaType.getParseMethod() != null  ||  javaType.getPrintMethod() != null)) {
      result = new ParsePrintSG(result, javaType);
    }
    return result;
  }
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.