Examples of fromString()


Examples of com.thoughtworks.xstream.converters.SingleValueConverter.fromString()

                // we need a converter that produces a string representation only
                final SingleValueConverter converter = mapper.getConverterFromAttribute(classDefiningField, attrName,
                    field.getType());
                Class<?> type = field.getType();
                if (converter != null) {
                    final Object value = converter.fromString(reader.getAttribute(attrAlias));
                    if (type.isPrimitive()) {
                        type = Primitives.box(type);
                    }
                    if (value != null && !type.isAssignableFrom(value.getClass())) {
                        throw new ConversionException("Cannot convert type "
View Full Code Here

Examples of com.thoughtworks.xstream.converters.SingleValueConverter.fromString()

        final Class<?> type = getMapper().realClass(key.substring(0, idx));
        final Converter converter = getConverterLookup().lookupConverterForType(type);
        if (converter instanceof SingleValueConverter) {
            final SingleValueConverter svConverter = (SingleValueConverter)converter;
            @SuppressWarnings("unchecked")
            final K k = (K)svConverter.fromString(key.substring(idx + 1));
            return k;
        } else {
            throw new StreamException("No SingleValueConverter for type " + type.getName() + " available");
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.basic.DateConverter.fromString()

        List<Future> futures = new ArrayList<Future>();
        for(int i=0;i<10;i++) {
            futures.add(es.submit(new Callable<Object>() {
                public Object call() throws Exception {
                    for( int i=0; i<10000; i++ )
                        dc.fromString("2008-08-26 15:40:14.568 GMT-03:00");
                    return null;
                }
            }));
        }
View Full Code Here

Examples of de.netseeker.ejoe.ConnectionHeader.fromString()

        // shall we act as server side and answer to the handshake request?
        else
        {
            receiverHeader = new ConnectionHeader( channel, host, header.isClient() );
            // the HTTP header must contain the eight header bits in the requested URI
            receiverHeader.fromString( ((HttpRequestParser) parser).getUri() );

            // does the http header overwrite the compression setting?
            receiverHeader.setCompression( header.hasCompression() && parser.hasCompression() );

            // does the http header overwrite the setting for using a persistent connection?
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Bundle.fromString()

            ContentType.valueOf(Integer.parseInt(vals[1])),
            (bundleId = Integer.parseInt(vals[2])), Timestamp
                .valueOf(vals[3]));
        String data = record.getDataExport();
        bundle = new Bundle();
        bundle.fromString(data);
      }
    } catch (NullPointerException e) {
      goToList = true;
      errors.add("Invalid history request format.");
    } catch (NumberFormatException e) {
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Collection.fromString()

            ContentType.valueOf(Integer.parseInt(vals[1])),
            (collectionId = Integer.parseInt(vals[2])), Timestamp
                .valueOf(vals[3]));
        String data = record.getDataExport();
        collection = new Collection();
        collection.fromString(data);
      }
    } catch (NullPointerException e) {
      goToList = true;
      errors.add("Invalid history request format.");
    } catch (NumberFormatException e) {
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Community.fromString()

            ContentType.valueOf(Integer.parseInt(vals[1])),
            (communityId = Integer.parseInt(vals[2])), Timestamp
                .valueOf(vals[3]));
        String data = record.getDataExport();
        community = new Community();
        community.fromString(data);
      }
    } catch (NullPointerException e) {
      goToList = true;
      errors.add("Invalid history request format.");
    } catch (NumberFormatException e) {
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Item.fromString()

              ContentType.valueOf(Integer.parseInt(vals[1])),
              (itemId = Integer.parseInt(vals[2])), Timestamp
                  .valueOf(vals[3]));
          String data = record.getDataExport();
          item = new Item();
          item.fromString(data);
        }
      } catch (NullPointerException e) {
        goToList = true;
        errors.add("Invalid history request format.");
      } catch (NumberFormatException e) {
View Full Code Here

Examples of edu.uga.galileo.voci.bo.MetadataElement.fromString()

                .parseInt(vals[0]), ContentType.valueOf(Integer
                .parseInt(vals[1])), metadataId, Timestamp
                .valueOf(vals[2]));
            String data = record.getDataExport();
            elem = new MetadataElement();
            elem.fromString(data);
            request.setAttribute("isDirty", "t");
          } catch (NullPointerException e) {
            errors.add("Invalid history request format.");
          } catch (NumberFormatException e) {
            errors.add("Invalid history request format.");
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Project.fromString()

              ContentType.valueOf(Integer.parseInt(vals[1])),
              Integer.parseInt(vals[2]), Timestamp
                  .valueOf(vals[3]));
          String data = record.getDataExport();
          project = new Project();
          project.fromString(data);
          request.setAttribute("isDirty", "t");
        } catch (NullPointerException e) {
          errors.add("Invalid history request format.");
        } catch (NumberFormatException e) {
          errors.add("Invalid history request format.");
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.