Examples of IConverter


Examples of org.apache.wicket.util.convert.IConverter

    // Get label for choice
    String label = "";

    if (objectClass != null && objectClass != String.class)
    {
      @SuppressWarnings("rawtypes")
      final IConverter converter = getConverter(objectClass);
      label = converter.convertToString(displayValue, getLocale());
    }
    else if (displayValue != null)
    {
      label = displayValue.toString();
    }
View Full Code Here

Examples of org.apache.wicket.util.convert.IConverter

  {
    Object value = PropertyResolver.getValue(variableName, model);

    if (value != null)
    {
      final IConverter converter = getConverter(value.getClass());
      if (converter != null)
      {
        return converter.convertToString(value, Session.get().getLocale());
      }
      else
      {
        return value.toString();
      }
View Full Code Here

Examples of org.apache.wicket.util.convert.IConverter

    Class<?> objectClass = displayValue == null ? null : displayValue.getClass();
    // Get label for choice
    String label = "";
    if (objectClass != null && objectClass != String.class)
    {
      @SuppressWarnings("rawtypes")
      IConverter converter = getConverter(objectClass);
      label = converter.convertToString(displayValue, getLocale());
    }
    else if (displayValue != null)
    {
      label = displayValue.toString();
    }
View Full Code Here

Examples of org.dspace.content.crosswalk.IConverter

            if (itemMetadata != null && itemMetadata.size() > 0)
            {
                for (String mdString : itemMetadata)
                {
                    String converterName = null;
                    IConverter converter = null;
                    Matcher converterMatcher = converterPattern.matcher(mdString);
                    if (converterMatcher.matches())
                    {
                        converterName = converterMatcher.group(1);
                        converter = (IConverter) PluginManager.getNamedPlugin(
                                IConverter.class, converterName);
                        if (converter == null)
                        {
                            log.warn(LogManager.getHeader(null,
                                    "createMetadata",
                                    "no converter plugin found with name "
                                            + converterName + " for metadata "
                                            + mdString));
                        }
                    }

                    DCValue[] dcValues;
                    if (converterName != null)
                    {
                        dcValues = item.getMetadata(mdString.replaceAll("\\("
                                + converterName + "\\)", ""));
                    }
                    else
                    {
                        dcValues = item.getMetadata(mdString);
                    }

                    try
                    {
                    for (DCValue dcValue : dcValues)
                    {
                            if (!MetadataExposure.isHidden(((HarvestedItemInfo) nativeItem).context,
                                                          dcValue.schema, dcValue.element, dcValue.qualifier))
                            {
                        String value;
                        if (converter != null)
                        {
                            value = converter.makeConversion(dcValue.value);
                        }
                        else
                        {
                            value = dcValue.value;
                        }
View Full Code Here

Examples of org.eclipse.core.databinding.conversion.IConverter

    myBindingContext.bindValue(CustomSWTObservables.observeSelection(mySortRadioGroup), BeansObservables.observeValue(myDisplayGroup, DisplayGroup.SORT_ORDER),
        null, null);

    UpdateValueStrategy fetchSpecEmpty = new UpdateValueStrategy();
    fetchSpecEmpty.setConverter(new IConverter() {
      public Object convert(final Object fromObject) {
        boolean result = fromObject != null && ((List<?>) fromObject).size() > 0;
        if (!myHasDetailButton.getSelection()) {
          return result;
        }
View Full Code Here

Examples of org.jamesii.core.model.symbolic.convert.IConverter

  }

  @Override
  public IDocument<?> getAsDocument(Class<? extends IDocument<?>> targetFormat) {
    try {
      IConverter converter = getConverter(targetFormat);
      return converter.toDocument(this);
    } catch (Exception e) {
      SimSystem.report(e);
    }
    return null;
  }
View Full Code Here

Examples of org.mmisw.watchdog.conversion.IConverter

    String inputContents = _getInputContents(inputUrl);
   
    File workspaceDir = _prepareWorkspace(workspace);
   
    namespace = _prepareNamespace(namespace);
    IConverter creator = _prepareCreator(impl);
   
    Map<String, String> props = _convert(creator, inputContents, namespace);
   
    _reportProps(props);
   
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.