Examples of convert()


Examples of com.opengamma.financial.analytics.conversion.FutureTradeConverter.convert()

        final Security security = trade.getSecurity();
        final InstrumentDefinition<?> definition;
        if (security instanceof IRFutureOptionSecurity) {
          definition = optionTradeToTxnDefnConverter.convert(trade)
        } else {
          definition = futureTradeConverter.convert(trade)
        }
        final HistoricalTimeSeriesBundle timeSeries = HistoricalTimeSeriesFunctionUtils.getHistoricalTimeSeriesInputs(executionContext, inputs);
        final InstrumentDerivative derivative = definitionConverter.convert(security, definition, now, timeSeries);
        final Double price = derivative.accept(s_priceVisitor);
        final ValueSpecification spec = new ValueSpecification(MARGIN_PRICE, target.toSpecification(), desiredValue.getConstraints().copy().get());
View Full Code Here

Examples of com.opengamma.financial.analytics.conversion.InterestRateFutureOptionTradeConverter.convert()

        final ValueRequirement desiredValue = Iterables.getOnlyElement(desiredValues);
        final Trade trade = target.getTrade();
        final Security security = trade.getSecurity();
        final InstrumentDefinition<?> definition;
        if (security instanceof IRFutureOptionSecurity) {
          definition = optionTradeToTxnDefnConverter.convert(trade)
        } else {
          definition = futureTradeConverter.convert(trade)
        }
        final HistoricalTimeSeriesBundle timeSeries = HistoricalTimeSeriesFunctionUtils.getHistoricalTimeSeriesInputs(executionContext, inputs);
        final InstrumentDerivative derivative = definitionConverter.convert(security, definition, now, timeSeries);
View Full Code Here

Examples of com.philip.journal.home.service.util.BeanToMapConverter.convert()

        final long locEntryId = parseId(this.entryId);
        try {
            final Entry entry = getServiceProxy().getEntryDetail(locEntryId);
            final BeanToMapConverter entryConverter = getResponseHandler().getConverterFactoryMap().get(
                    Constant.BeanConverter.ENTRY_TO_JSON);
            final Map<String, Object> converted = entryConverter.convert(entry);
            converted.put("branchId", "b-" + entry.getBranch().getBranchId());
            getResponseHandler().respondSuccess(getHttpServletResponse(), converted, DATA);
        } catch (final JournalException e) {
            getLogger().debug(e.getMessage(), e);
            getResponseHandler().respondFail(getHttpServletResponse(), e.getMessage());
View Full Code Here

Examples of com.projectlibre.core.pm.exchange.ProjectConverter.convert()

  protected void importOptions() throws Exception{
    ProjectConverter converter=ProjectConverter.getInstance();
    CalendarOption openprojOptions=CalendarOption.getInstance();
    CalendarOptions options=plProject.getCalendarOptions();
    converter.convert("openproj", ProjectConverter.Type.OPTIONS, false, openprojOptions, options, state);
  }

  private void importProjectFields() {
    OpenprojProjectConverter openprojConverter=new OpenprojProjectConverter();
    openprojConverter.to(project, plProject, state);
View Full Code Here

Examples of com.rop.request.RopRequestMessageConverter.convert()

                "  <streets>\n" +
                "    <street no=\"001\" name=\"street1\"/>\n" +
                "    <street no=\"002\" name=\"street2\"/>\n" +
                "  </streets>\n" +
                "</address>";
        Object destObj = converter.convert(addressStr, strTypeDescriptor, addrTypeDescriptor);
        assertTrue(destObj instanceof Addresss);
        Addresss addresss = (Addresss) destObj;
        assertEquals(addresss.getZoneCode(), "001");
        assertEquals(addresss.getDoorCode(), "002");
        assertEquals(addresss.getStreets().size(), 2);
View Full Code Here

Examples of com.salesforce.dataloader.dyna.DateConverter.convert()


        for (SObject acct : returnedAccounts) {

            String dateString = (String)acct.getField(dateField);
            Calendar calFromString = (Calendar) converter.convert(null, dateString);

            assertEquals("Day field does not match", targetDate, calFromString.get(Calendar.DAY_OF_MONTH));
        }
    }
View Full Code Here

Examples of com.scriptographer.ai.Color.convert()

        Color fromColor = (Color) javaObject;
        Color toColor = fromColor.convert(type);
        if (toColor != null) {
                  Scriptable scriptable = Context.toObject(toColor, start);
                  scriptable.put(name, start, value);
                  toColor = toColor.convert(fromColor.getClass());
                  fromColor.set(toColor);
        }
      }
    }
  }
View Full Code Here

Examples of com.softwaremill.common.cdi.autofactory.extension.parameter.converter.ConstructorToParameterValuesConverter.convert()

        boolean constructorInjection = isConstructorInjection(soleCreatedTypeConstructor);

        MethodParameterIndexer methodParameterIndexer = new MethodParameterIndexer(soleFactoryMethod);
        ConstructorToParameterValuesConverter converter = getConverter(soleCreatedTypeConstructor,
                methodParameterIndexer, constructorInjection);
        ParameterValue[] createdTypeConstructorParameterValues = converter.convert();

        // We cannot use BeanManager.createInjectionTarget as this adds the injection target to validation
        InjectionTarget<T> injectionTarget = createInjectionTargetWithoutValidation();

        return new AutoFactoryBean<T>(beanManager, factoryClass,
View Full Code Here

Examples of com.subhajit.diagram.classdiagrams.impl.ClassRenderingStrategy.convert()

                        new NodeConversionStrategy<ClassMetaData, String[]>() {
                          public String[] convert(
                              ClassMetaData input) {
                            try {
                              Graph<String[]> temp = new Graph<String[]>();
                              strategy
                                  .convert(
                                      temp,
                                      urlClassLoader,
                                      input
                                          .getClassName());
View Full Code Here

Examples of com.sun.grizzly.util.buf.B2CConverter.convert()

                log.severe("Invalid URI encoding; using HTTP default");
                connector.setURIEncoding(null);
            }
            if (conv != null) {
                try {
                    conv.convert(bc, cc, cc.getBuffer().length - cc.getEnd());
                    uri.setChars(cc.getBuffer(), cc.getStart(),
                            cc.getLength());
                    return;
                } catch (IOException e) {
                    log.severe("Invalid URI character encoding; trying ascii");
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.