Examples of convert()


Examples of com.youtube.vitess.vtgate.FieldType.convert()

      Iterator<Field> fieldsIter = fields.iterator();
      for (Object col : cols) {
        byte[] val = col != null ? (byte[]) col : null;
        Field field = fieldsIter.next();
        FieldType ft = field.getType();
        cells.add(new Cell(field.getName(), ft.convert(val), ft.javaType));
      }
      rowList.add(new Row(cells));
    }
    return rowList;
  }
View Full Code Here

Examples of commonj.sdo.helper.DataHelper.convert()

    private void set(Property lastProperty, DataObject lastDataObject, int numInLastProperty, Object value, boolean convertValue) {
        if (numInLastProperty == -1) {
            if (lastDataObject != null) {
                if(convertValue){
                  DataHelper dataHelper = ((SDODataObject)lastDataObject).getType().getHelperContext().getDataHelper();
                  value = dataHelper.convert(lastProperty, value);
                }
                lastDataObject.set(lastProperty, value);
            } else {
                throw new IllegalArgumentException("lastDataObject is null");
            }
View Full Code Here

Examples of cookxml.core.interfaces.Converter.convert()

      if (value instanceof String)
      {
        Class targetClass = m_field.getType ();
        Converter converter = decodeEngine.getCookXml ().getTagLibrary ().getConverter (ns, targetClass);
        if (converter != null)
          value = converter.convert ((String)value, decodeEngine);
      }

      m_field.set (obj, value);
      if (!m_access)
      {
View Full Code Here

Examples of cx.fbn.nevernote.evernote.EnmlConverter.convert()

  public void updateNoteContent(String guid, String content) {
    logger.log(logger.HIGH, "Entering ListManager.updateNoteContent");
   
    // Actually save the content
    EnmlConverter enml = new EnmlConverter(logger);
    String newContent = enml.convert(guid, content);
    String fixedContent = enml.fixEnXMLCrap(newContent);
    if (fixedContent != null) {
      conn.getNoteTable().updateNoteContent(guid, fixedContent);
      logger.log(logger.EXTREME, "Saving new note resources");
      List<Resource> oldResources = conn.getNoteTable().noteResourceTable.getNoteResources(guid, false);
View Full Code Here

Examples of de.ddb.conversion.BinaryConverter.convert()

            // if (logger.isDebugEnabled()) {
            // logger.debug("main() - finished conversion. output = " + output);
            // }
            Converter mab2Mabxml = ctx.addConverter(new MabToMabxmlConverter());
            ConversionParameters params = new ConversionParameters();
            mab2Mabxml.convert(c.convert(in, params),
                    out);
            if (logger.isDebugEnabled()) {
                logger.debug("main() - finished conversion.");
            }
        } finally {
View Full Code Here

Examples of de.ddb.conversion.Converter.convert()

    InputStream in = new FileInputStream("test" + File.separator + "input" + File.separator + file);
    OutputStream out = new FileOutputStream("test" + File.separator + "output" + File.separator + file + ".out");
    ConversionParameters params = new ConversionParameters();
    params.setSourceCharset("x-PICA");
    params.setTargetCharset("UTF-8");
    converter.convert(in, out, params);
  }
}
View Full Code Here

Examples of de.ddb.conversion.converters.mab.MabToMabxmlConverter.convert()

              context.getFormat(ConversionContextFactory.DOCFORMATNAME_MAB2));
      c.getConverterContext()
          .setTargetFormat(
              context.getFormat(ConversionContextFactory.DOCFORMATNAME_MABXML1));
      context.addConverter(c);
      c.convert(MabToMabxml.in, MabToMabxml.out, params);
      MabToMabxml.LOGGER.info("Done.");
    } catch (final ClassNotFoundException e) {
      System.out.println("Error: " + e);
      MabToMabxml.LOGGER.error("main(String[])", e);
    } finally {
View Full Code Here

Examples of de.ddb.conversion.converters.mab.MabxmlToMabConverter.convert()

            c.getConverterContext().setTargetEncoding(outputEncoding);
            c.getConverterContext().setSourceFormat(context.getFormat(ConversionContextFactory.DOCFORMATNAME_MABXML1));
            c.getConverterContext().setTargetFormat(context.getFormat(ConversionContextFactory.DOCFORMATNAME_MAB2));
            context.addConverter(c);
            ConversionParameters params = new ConversionParameters();
            InputStream convertedIn = c.convert(in, params);
            if (outputEncoding.equals("x-MAB")
                    || outputEncoding.equals("x-PICA")) {
                /*
                 * No normalization for x-PICA and x-MAB, since they
                 * NFD-normalize their input anyway
View Full Code Here

Examples of de.java2html.converter.JavaSource2HTMLConverter.convert()

      StringWriter writer = new StringWriter();
      writer.append(HTML_START);
      try {
         JavaSourceConversionOptions options = JavaSourceConversionOptions.getDefault();
         options.setShowLineNumbers(true);
        converter.convert(jsource, options, writer);
      } catch (IOException e) {
        //
      }
      StringMediaResource mr = new StringMediaResource();
      mr.setContentType(TEXT_HTML_CHARSET_UTF_8);
View Full Code Here

Examples of dk.brics.relaxng.converter.RestrRelaxNG2XMLGraph.convert()

    if (u.endsWith(".xsd")) {
      XMLSchema2RestrRelaxNG xsd2rrng = new XMLSchema2RestrRelaxNG(datatypes);
      if (extend)
        rrng2xg.extend(rngparser.parse(xsd2rrng.convert(url), url));
      else
        xg = rrng2xg.convert(rngparser.parse(xsd2rrng.convert(url), url));
      Map<String,String> m1 = xsd2rrng.getNameMap();
      Map<String,String> m2 = rngparser.getTopLevelNewNames();
      Map<String,SequenceNode> m3 = rrng2xg.getDefineNodes();
      for (Map.Entry<String,String> e : m1.entrySet())
        types.put(e.getKey(), m3.get(m2.get(e.getValue())));
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.