Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.TypedValue


          continue;
        }
       
        jm.addIf(firstInNamespace, JavaSource.getQuoted(attr.getName().getLocalName()), ".equals(", pLocalName, ")");
        firstInNamespace = false;
        TypedValue v = createSimpleTypeConversion(jm, myAttributes[i].getTypeSG(), pValue, "@" + myAttributes[i].getName());
        attr.getPropertySG().setValue(jm, result, v, null);
        jm.addLine("return;");
      }
      if (!firstInNamespace) {
        jm.addEndIf();
View Full Code Here


    if (causingParseConversionEvent) {
      f = pJm.newJavaField(runtimeType);
      pJm.addTry();
    }
    Object s = new Object[]{"(", StringSG.STRING_TYPE, ") ", pValue};
    TypedValue result = new TypedValueImpl(pType.getSimpleTypeSG().getCastFromString(pJm, s, "getHandler()"),
                            pType.getSimpleTypeSG().getRuntimeType());
    if (causingParseConversionEvent) {
      pJm.addLine(f, " = ", result, ";");
      result = f;
      DirectAccessible e = pJm.addCatch(Exception.class);
View Full Code Here

    JavaMethod result = super.newEndElementMethod();
    JavaQName elementInterface = ctSG.getClassContext().getXMLInterfaceName();
    LocalJavaField element = result.newJavaField(elementInterface);
    element.addLine("(", elementInterface, ") result");
    SimpleContentSG scSG = ctSG.getSimpleContentSG();
    TypedValue tv = createSimpleTypeConversion(result, scSG.getContentTypeSG(),
                           getParamResult(), scSG.getPropertySG().getPropertyName());
    scSG.getPropertySG().addValue(result, element, tv, null);
    return result;
  }
View Full Code Here

        };
      }
      pJm.addIf(uriCondition, "  &&  ", JavaSource.getQuoted(name.getLocalName()),
          ".equals(", getParamLocalName(), ")");
      JavaQName type;
      TypedValue v = getParamResult();
      if (childType.isComplex()) {
        type = childType.getComplexTypeSG().getClassContext().getXMLInterfaceName();
      } else {
        v = createSimpleTypeConversion(pJm, childType, v, oSG.getName().toString());
        type = null;
View Full Code Here

        };
      }
      pJm.addIf(uriCondition, "  &&  ", JavaSource.getQuoted(name.getLocalName()),
          ".equals(", getParamLocalName(), ")");
      JavaQName type;
      TypedValue v = getParamResult();
      if (childType.isComplex()) {
        type = childType.getComplexTypeSG().getClassContext().getXMLInterfaceName();
      } else {
        v = createSimpleTypeConversion(pJm, childType, v, oSG.getName().toString());
        type = null;
View Full Code Here

    boolean causingParseConversionEvent = pType.getSimpleTypeSG().isCausingParseConversionEvent();
    if (causingParseConversionEvent) {
      pJm.addTry();
    }
    Object s = new Object[]{"(", StringSG.STRING_TYPE, ") ", pValue};
    TypedValue result = new TypedValueImpl(pType.getSimpleTypeSG().getCastFromString(pJm, s, "getHandler()"),
                            pType.getSimpleTypeSG().getRuntimeType());
    pPropertySG.addValue(pJm, pElement, result, null);
    if (causingParseConversionEvent) {
      DirectAccessible e = pJm.addCatch(Exception.class);
      pJm.addLine("getHandler().parseConversionEvent(",
View Full Code Here

        };
      }
      pJm.addIf(uriCondition, "  &&  ", JavaSource.getQuoted(name.getLocalName()),
          ".equals(", getParamLocalName(), ")");
      JavaQName type;
      TypedValue v = getParamResult();
      if (childType.isComplex()) {
        type = childType.getComplexTypeSG().getClassContext().getXMLInterfaceName();
        if (isMixed) {
          pJm.addLine(pElement, ".getContent().add(", v, ");");
        } else {
View Full Code Here

        };
      }
      pJm.addIf(uriCondition, "  &&  ", JavaSource.getQuoted(name.getLocalName()),
          ".equals(", getParamLocalName(), ")");
      JavaQName type;
      TypedValue v = getParamResult();
      if (childType.isComplex()) {
        type = childType.getComplexTypeSG().getClassContext().getXMLInterfaceName();
      } else {
        Object s = new Object[]{"(", String.class, ") ", v};
        v = new TypedValueImpl(childType.getSimpleTypeSG().getCastFromString(pJm, s, "getHandler()"),
View Full Code Here

    LocalJavaField element = result.newJavaField(elementInterface);
    element.addLine("(", elementInterface, ") result");
    SimpleContentSG scSG = ctSG.getSimpleContentSG();
    Object v = getParamResult();
    v = new Object[]{"(", String.class, ") ", v};
    TypedValue tv = scSG.getContentTypeSG().getSimpleTypeSG().getCastFromString(result, v, "getHandler()");
    scSG.getPropertySG().addValue(result, element, tv, null);
    return result;
  }
View Full Code Here

  public JavaQName getRuntimeType(SimpleTypeSG pController) {
    return pController.isNullable() ? getObjectRuntimeType(pController) : getPrimitiveRuntimeType(pController);
  }

  public TypedValue getCastFromString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, Object pData) throws SAXException {
    TypedValue v = super.getCastFromString(pController, pMethod, pValue, pData);
    if (pController.isNullable()) {
    JavaQName objectType = getObjectRuntimeType(pController);
    v = new TypedValueImpl(new Object[]{"new ", objectType, "(", v, ")"},
                     objectType);
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.TypedValue

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.