Examples of convert()


Examples of com.jmex.model.converters.FormatConverter.convert()

    }
    FormatConverter converter = new ObjToJme();
    converter.setProperty("mtllib", url); //tell the converter where to find mtl files
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
   
    converter.convert(url.openStream(), outStream);
   
    URL newFile = new URL(url.toString().replaceAll(".obj", ".jme"));
   
    FileOutputStream fileStream = new FileOutputStream(newFile.toString());
    outStream.writeTo(fileStream);
View Full Code Here

Examples of com.jmex.model.converters.MaxToJme.convert()

    private void load3DS() {
        MaxToJme converter = new MaxToJme();
        URL objFile = getClass().getResource("/models/test01.3ds");
        ByteArrayOutputStream BO = new ByteArrayOutputStream();
        try {
            converter.convert(objFile.openStream(), BO);
            Node obj = (Node) BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
            obj.setName("OBJ");
            n = obj;
            rootNode.attachChild(obj);
        } catch (IOException e) {
View Full Code Here

Examples of com.jmex.model.converters.ObjToJme.convert()

    }
    FormatConverter converter = new ObjToJme();
    converter.setProperty("mtllib", url); //tell the converter where to find mtl files
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
   
    converter.convert(url.openStream(), outStream);
   
    URL newFile = new URL(url.toString().replaceAll(".obj", ".jme"));
   
    FileOutputStream fileStream = new FileOutputStream(newFile.toString());
    outStream.writeTo(fileStream);
View Full Code Here

Examples of com.liferay.markdown.converter.MarkdownConverter.convert()

      br.close();

      MarkdownConverter converter = MarkdownConverterFactoryUtil.create();

      String html = converter.convert(sb.toString());

    BufferedWriter out =
      new BufferedWriter(new FileWriter(htmlFile));

    out.append(html);
View Full Code Here

Examples of com.liferay.portal.util.WebCacheable.convert()

    try {
      WebCacheable wc =
        new TranslationConverter(translationId, fromText);

      Translation translation = (Translation)wc.convert("");

      toText = translation.getToText();

      if ((toText != null) &&  (toText.indexOf("Babel") != -1)) {
        Logger.info(this, "Please manually check for errors.");
View Full Code Here

Examples of com.liferay.portlet.translator.util.TranslationConverter.convert()

    try {
      WebCacheable wc =
        new TranslationConverter(translationId, fromText);

      Translation translation = (Translation)wc.convert("");

      toText = translation.getToText();

      if ((toText != null) &&  (toText.indexOf("Babel") != -1)) {
        Logger.info(this, "Please manually check for errors.");
View Full Code Here

Examples of com.log4ic.utils.convert.office.OfficeConverter.convert()

    public static void main(String[] args) throws Exception {
        DocViewer.initialize();
        OfficeConverter converter = new OfficeConverter();
        try {
            converter.convert("/home/icode/Desktop/b.txt", "/home/icode/Desktop/b.pdf");
        } catch (IOException e) {
            e.printStackTrace();
        }

        DocViewer.destroy();
View Full Code Here

Examples of com.log4ic.utils.convert.pdf.PDFConverter.convert()

    @Override
    public void run() {
        File in = this.getInFile();
        PDFConverter converter = new PDFConverter();
        try {
            converter.convert(in, this.getOutputPath(), splitPage, false);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
View Full Code Here

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

    final Trade trade = target.getTrade();
    final HolidaySource holidaySource = OpenGammaExecutionContext.getHolidaySource(context);
    final ConventionBundleSource conventionSource = OpenGammaExecutionContext.getConventionBundleSource(context);
    final RegionSource regionSource = OpenGammaExecutionContext.getRegionSource(context);
    BondTradeConverter visitor = new BondTradeConverter(new BondSecurityConverter(holidaySource, conventionSource, regionSource));
    final BondFixedTransactionDefinition definition = visitor.convert(trade);
    BondFixedTransaction derivative = definition.toDerivative(date, riskFreeCurveName, creditCurveName);
    return CALCULATOR.presentValueFromCleanPrice(derivative, data, price);
  }

}
View Full Code Here

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

          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());
        return Collections.singleton(new ComputedValue(spec, price));
      }
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.