Convert data content for all resource paths matched by the path selector

@param converter content converter
@param selector  path selection

@return builder
968074
public TreeBuilder<T> convert(ContentConverter<T> converter, PathSelector selector) {
        return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, selector));
    }
796139
protected <T> void addConverter(Class<T> type, Converter<T> converter) {
        storage.put(type, converter);
    }
508273
public <FT> void registerConverter(Class<FT> clazz, Converter<FT, ?> converter) {
		converterMap.put(clazz, converter);
	}
181282
public <T> Message build(MessageBodyConverter<T> converter) {
        if (StringUtils.isBlank(this.topic)) {
            throw new IllegalArgumentException("Blank topic");
        }
        if (this.body == null && this.payload == null) {
            throw new IllegalArgumentException("Empty payload");
        }
        byte[] payload = this.payload;
        if (payload == null && converter != null) {
            try {
                payload = converter.toByteArray((T) this.body);
            }
            catch (MetaClientException e) {
                throw new IllegalStateException("Convert message body failed.", e);
            }
        }

        if (payload == null) {
            throw new IllegalArgumentException("Empty payload");
        }
        return new Message(this.topic, payload, this.attribute);
    }
232436
public static function toXPath($selector)
    {
        if (isset(self::$compiled[$selector])){
            return self::$compiled[$selector];
        }

        // Select DOMText
        if ($selector === 'text') {
            return '//text()';
        }

        // Select DOMComment
        if ($selector === 'comment') {
            return '//comment()';
        }

        if (!class_exists('Symfony\\Component\\CssSelector\\CssSelectorConverter')) {
            throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).');
        }

        $converter = new CssSelectorConverter(true);

        $xPathQuery = $converter->toXPath($selector);
        self::$compiled[$selector] = $xPathQuery;

        return $xPathQuery;
    }
436349
static Converter getSelectItemsValueConverter(Iterator<SelectItem> iterator, FacesContext facesContext)
    {
        // Attention!
        // This code is duplicated in jsfapi component package.
        // If you change something here please do the same in the other class!
        
        Converter converter = null;
        while (converter == null && iterator.hasNext())
        {
            SelectItem item = iterator.next();
            if (item instanceof SelectItemGroup)
            {
                Iterator<SelectItem> groupIterator = Arrays.asList(
                        ((SelectItemGroup) item).getSelectItems()).iterator();
                converter = getSelectItemsValueConverter(groupIterator, facesContext);
            }
            else
            {
                Class<?> selectItemsType = item.getValue().getClass();
                
                // optimization: no conversion for String values
                if (String.class.equals(selectItemsType))
                {
                    return null;
                }
                
                try
                {
                    converter = facesContext.getApplication().createConverter(selectItemsType);
                }
                catch (FacesException e)
                {
                    // nothing - try again
                }
            }
        }
        return converter;
    }
1340155
public static JsonElementConverter getConvertor(String fieldName, String fieldType, JsonObject schemaNode,
      WorkUnitState state, boolean nullable)
      throws UnsupportedDateTypeException {
    if (!schemaNode.has(COLUMN_NAME_KEY)) {
      schemaNode.addProperty(COLUMN_NAME_KEY, fieldName);
    }
    if (!schemaNode.has(DATA_TYPE_KEY)) {
      schemaNode.add(DATA_TYPE_KEY, new JsonObject());
    }
    JsonObject dataType = schemaNode.get(DATA_TYPE_KEY).getAsJsonObject();
    if (!dataType.has(TYPE_KEY)) {
      dataType.addProperty(TYPE_KEY, fieldType);
    }
    if (!schemaNode.has(IS_NULLABLE_KEY)) {
      schemaNode.addProperty(IS_NULLABLE_KEY, nullable);
    }
    JsonSchema schema = new JsonSchema(schemaNode);
    return getConvertor(schema, null, state);
  }
1317471
protected Converter createConverter(FaceletContext ctx) throws FacesException, ELException, FaceletException
    {
        return ctx.getFacesContext().getApplication().createConverter(NumberConverter.CONVERTER_ID);
    }
354119
public ConfigOptionBuilder setStringConverter( StringConverter converter ) {
        co.setConverter( converter );
        co.setHasArgument( true );
        return this;
    }
1054858
public static String applyFromPath(String path) throws ConverterException {		
		String xml = converters.get(0).convertFromPath(path, false);						
		xml = applyFromSecond(xml);
		if (conversionDone()) {
			return converters.get(converters.size()-1).changeVersion(xml);
		} else {
			return xml;
		}
	}
657889
public FacesConfigConverterType<FacesConfigType<T>> getOrCreateConverter()
   {
      List<Node> nodeList = childNode.get("converter");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigConverterTypeImpl<FacesConfigType<T>>(this, "converter", childNode, nodeList.get(0));
      }
      return createConverter();
   }
655707
public static <A, B, C, D> Converter<Example<A, B>, Example<C, D>> converter(
      Converter<A, C> inputConverter, Converter<B, D> outputConverter) {
    return new ExampleConverter<A, B, C, D>(inputConverter, outputConverter);
  }
828803
function renameSelector(selector, sourcePath, opts, mappings) {
  return selector.map(function(selector){
    return parser(function(sels) {
      sels.map(function(sel) {
        renameNodes(sel.nodes, sourcePath, opts, mappings);
      })
    }).process(selector).result
  });
}
54621
public TreeBuilder<T> convert(ContentConverter<T> converter, PathSelector pathSelector,
            ResourceSelector<T> resourceSelector) {
        return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, pathSelector, resourceSelector));
    }
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
414820
public ConversionHandler load(ConversionAnalyzer analyzer){
		this.methodDefined = analyzer.getMethod();
		this.membership = analyzer.getMembership();
		this.configClass = membership == Membership.DESTINATION?destinationClass:sourceClass;
		this.configurationType = analyzer.getConfigurationType();
		return this;
	}
1251592
public String serialize(final Object obj, final Collection<Converter<?>> converters) {
        final DelegatingConverter delegatingConverter = new DelegatingConverter();

        if (converters != null) {
            for (final Converter<?> converter : converters) {
                delegatingConverter.addConverter(converter);
            }
        }

        delegatingConverter.addConverter(new ConfigurationItemConverter());
        delegatingConverter.addConverter(getResourceConverter());
        delegatingConverter.addConverter(new StandardTypeConverter(_configuration, delegatingConverter));

        delegatingConverter.initializeAll(_injectionManager);

        return delegatingConverter.toString(obj);
    }