Examples of convertToString()


Examples of cgl.shindig.layoutmanager.data.LayoutColumnJSONSerializer.convertToString()

    public long getSize(LayoutColumn layoutColumn, Class<?> type,
            Type genericType, Annotation[] annotations, MediaType mediaType) {
        LayoutColumnJSONSerializer serializer = new LayoutColumnJSONSerializer();
        try {
            if (jsonRep == null)
                jsonRep = serializer.convertToString(layoutColumn);
            return jsonRep.getBytes("utf-8").length;
        } catch(Exception ex) {
            return -1;
        }
    }
View Full Code Here

Examples of cgl.shindig.layoutmanager.data.LayoutGadgetJSONSerializer.convertToString()

    public long getSize(LayoutGadget layoutGadget, Class<?> type,
            Type genericType, Annotation[] annotations, MediaType mediaType) {
        LayoutGadgetJSONSerializer serializer = new LayoutGadgetJSONSerializer();
        try {
            if (jsonRep == null)
                jsonRep = serializer.convertToString(layoutGadget);
            return jsonRep.getBytes("utf-8").length;
        } catch(Exception ex) {
            return -1;
        }
    }
View Full Code Here

Examples of cgl.shindig.layoutmanager.data.LayoutJSONSerializer.convertToString()

    public long getSize(Layout layout, Class<?> type,
            Type genericType, Annotation[] annotations, MediaType mediaType) {
        LayoutJSONSerializer serializer = new LayoutJSONSerializer();
        try {
            if (jsonRep == null)
                jsonRep = serializer.convertToString(layout);
            return jsonRep.getBytes("utf-8").length;
        } catch(Exception ex) {
            return -1;
        }
    }
View Full Code Here

Examples of cgl.shindig.layoutmanager.data.LayoutSuiteJSONSerializer.convertToString()

            Type genericType, Annotation[] annotations, MediaType mediaType) {
        logger.info("LayoutSuiteJSONWriter:getSize...");
        LayoutSuiteJSONSerializer serializer = new LayoutSuiteJSONSerializer();
        try {
            if (jsonRep == null)
                jsonRep = serializer.convertToString(layoutSuite);
            return jsonRep.getBytes("utf-8").length;
        } catch(Exception ex) {
            return -1;
        }
    }
View Full Code Here

Examples of cgl.shindig.layoutmanager.data.LayoutTabJSONSerializer.convertToString()

    public long getSize(LayoutTab layoutTab, Class<?> type,
            Type genericType, Annotation[] annotations, MediaType mediaType) {
        LayoutTabJSONSerializer serializer = new LayoutTabJSONSerializer();
        try {
            if (jsonRep == null)
                jsonRep = serializer.convertToString(layoutTab);
            return jsonRep.getBytes("utf-8").length;
        } catch(Exception ex) {
            return -1;
        }
    }
View Full Code Here

Examples of com.alvazan.orm.api.z8spi.conv.Converters.BaseConverter.convertToString()

   
    Class clazz = data.getClass();
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type clazz="+clazz+" is not supported at this time");
    return converter.convertToString(data);
  }
 
  @SuppressWarnings("unchecked")
  public static <T> T convertFromString(Class<T> clazz, String data) {
    if(data == null)
View Full Code Here

Examples of com.jclark.xsl.expr.Variant.convertToString()

            ((ResultFragmentVariant)value).append(result);
        }
        else if (value.isNodeSet()) {
            copyNodes(context, value.convertToNodeSet(), result);
        } else {
            result.characters(value.convertToString());
        }
    }

    /**
     *
 
View Full Code Here

Examples of com.wakaleo.gameoflife.domain.GridWriter.convertToString()

        String expectedPrintedGrid = "..." + NEW_LINE +
                "..." + NEW_LINE +
                "..." + NEW_LINE + "";

        GridWriter gridWriter = new GridWriter();
        String printedGrid = gridWriter.convertToString(gridContents);
        assertThat(printedGrid, is(expectedPrintedGrid));
    }

    @Test
    public void shouldBeAbleToReadAStringGridContainingLiveAndDeadCells() {
View Full Code Here

Examples of org.apache.cocoon.forms.datatype.Datatype.convertToString()

            Datatype datatype = ((MultiValueField)widget).getDatatype();
            Object[] values = (Object[])widget.getValue();
            if (values != null)
                for (int i = 0; i < values.length; i++) {
                    start(ITEM, attr);
                    data(datatype.convertToString(values[i], this.locale));
                    end(ITEM);
                }
        } else if (widget instanceof DataWidget) {
            Datatype datatype = ((DataWidget)widget).getDatatype();
            if (widget.getValue() != null)
View Full Code Here

Examples of org.apache.cocoon.forms.datatype.convertor.Convertor.convertToString()

        contentHandler.startElement(FormsConstants.INSTANCE_NS, VALUES_EL, FormsConstants.INSTANCE_PREFIX_COLON + VALUES_EL, XMLUtils.EMPTY_ATTRIBUTES);
        Convertor convertor = definition.getDatatype().getConvertor();
        if (values != null) {
            for (int i = 0; i < values.length; i++) {
                contentHandler.startElement(FormsConstants.INSTANCE_NS, VALUE_EL, FormsConstants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
                String value = convertor.convertToString(values[i], locale, null);
                contentHandler.characters(value.toCharArray(), 0, value.length());
                contentHandler.endElement(FormsConstants.INSTANCE_NS, VALUE_EL, FormsConstants.INSTANCE_PREFIX_COLON + VALUE_EL);
            }
        } else if (enteredValues != null) {
            for (int i = 0; i < enteredValues.length; i++) {
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.