Examples of convert()


Examples of net.arnx.jsonic.JSON.convert()

    Map<String, Object> baseMap = new LinkedHashMap<String, Object>();
    for (Field field : Config.class.getFields()) {
      baseMap.put(field.getName(), map.get(field.getName()));
    }
   
    Config base = (Config)json.convert(baseMap, Config.class);
    for (Map.Entry entry : (Set<Map.Entry>)map.entrySet()) {
      if (!baseMap.containsKey(entry.getKey()) && entry.getValue() instanceof Map) {
        Map valueMap = (Map)entry.getValue();
        for (Map.Entry<String, Object> baseEntry : baseMap.entrySet()) {
          if (valueMap.get(baseEntry.getKey()) == null) {
View Full Code Here

Examples of net.canarymod.converter.CanaryToVanilla.convert()

        if (parameters.length > 1) {
            world = parameters[1];
        }

        if (!converter.convert(world)) {
            caller.notice("Failed to convert to vanilla.");
        }
        else {
            caller.message(Colors.YELLOW + "Succeed to convert to vanilla; result is in the vanilla/ folder.");
        }
View Full Code Here

Examples of net.fp.rp.search.plugins.IDataExtractor.convert()

                    logger.debug(
                        "Best extractor for handling the information is :" +
                        extractor.getClass().getName());

                    try {
                        extractor.convert(addInfo);
                    } catch (RpException e) {
                        //no exception to be thrown -> continue the add
                        logger.debug("Error in extract the data " +
                            e.getMessage(), e);
                    }
View Full Code Here

Examples of net.sf.isolation.conversion.IsoConverter.convert()

      log.warn("(Step 2) Not Configured {0} -> ${1}",
          sourceType.getName(), targetType.getName());
      throw new IsoConversionNotSupportedException(sourceType.getName()
          + "->" + targetType.getName());
    } else {
      return converter.convert(targetType, value);
    }
  }

  public <T> T convert(Object value, Class<T> targetType)
      throws IsoConversionException {
View Full Code Here

Examples of net.sf.myway.gps.garmin.mapping.converters.Converter.convert()

        LOG.error("no converter for " + fieldType);
        continue;
      }
      if (fieldData != null)
        pos =
          conv.convert(buffer, pos, fieldData,
            fieldLength == null ? 0 : Integer.parseInt(fieldLength));
    }
    return sizeVal == null ? pos : offset + Integer.parseInt(sizeVal);
  }
View Full Code Here

Examples of net.sf.saxon.expr.JPConverter.convert()

            value = tdv.add(DayTimeDurationValue.fromMicroseconds(ts.getNanos() / 1000));
          }
          return (AtomicValue)value;
        }
    JPConverter converter = JPConverter.allocate(value.getClass(), null);
    return (AtomicValue)converter.convert(value, null);
  }
 
  static void convertValue(Writer writer, XMLEventWriter eventWriter, XMLEventFactory eventFactory, Object object) throws IOException,
      FactoryConfigurationError, XMLStreamException,
      TransformerException {
View Full Code Here

Examples of net.sf.saxon.value.AtomicValue.convert()

                            " to " + actualItemType + " using 'eq'");
                    de.setErrorCode("XPTY0004");
                    throw de;
                } else if (keydef.isConvertUntypedToOther() &&
                        actualItemType.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) {
                    item = item.convert(soughtItemType, true, xc).asAtomic();
                } else if (keydef.isConvertUntypedToOther() &&
                        soughtItemType.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) {
                    // index the item as is
                } else {
                    // simply ignore this key value
View Full Code Here

Examples of net.sf.saxon.value.DateTimeValue.convert()

        final int targetType = getItemType(th).getPrimitiveType();
        switch (targetType) {
            case StandardNames.XS_DATE_TIME:
                return dt;
            case StandardNames.XS_DATE:
                return dt.convert(BuiltInAtomicType.DATE, true, context).asAtomic();
            case StandardNames.XS_TIME:
                return dt.convert(BuiltInAtomicType.TIME, true, context).asAtomic();
            case StandardNames.XS_DAY_TIME_DURATION:
            case StandardNames.XS_DURATION:
                return dt.getComponent(Component.TIMEZONE);
View Full Code Here

Examples of net.sf.saxon.value.NumericValue.convert()

                        DynamicError e = new DynamicError("The numbers to be formatted must be positive");
                        e.setXPathContext(context);
                        e.setErrorCode("XT0980");
                        throw e;
                    }
                    long i = ((NumericValue) num.convert(Type.INTEGER, context)).longValue();
                    if (i < 1) {
                        DynamicError e = new DynamicError("The numbers to be formatted must be positive");
                        e.setXPathContext(context);
                        e.setErrorCode("XT0980");
                        throw e;
View Full Code Here

Examples of net.sourceforge.stripes.validation.BooleanTypeConverter.convert()

     */
    public void setMultiple(String multiple) {
        boolean isMultiple = "multiple".equalsIgnoreCase(multiple) || "".equals(multiple);
        if (!isMultiple) {
            BooleanTypeConverter converter = new BooleanTypeConverter();
            isMultiple = converter.convert(multiple, Boolean.class, null);
        }

        if (isMultiple) {
            set("multiple", "multiple");
        }
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.