protected <T> T getValue( String name, Class<T> type, InboundVariable data, Map<String, String> tokens, InboundContext inctx) throws MarshallException { final T value; final String valueString = tokens.get(name); if (valueString != null) { final String[] split = ParseUtil.splitInbound(valueString); final String splitValue = split[LocalUtil.INBOUND_INDEX_VALUE]; final String splitType = split[LocalUtil.INBOUND_INDEX_TYPE]; final InboundVariable nested = new InboundVariable( data.getLookup(), null, splitType, splitValue); @SuppressWarnings("unchecked") final T valueDraft = (T) getConverterManager().convertInbound(type, nested, inctx, null); value = valueDraft; } else { value = null; } return value; }
@Override protected Object convertInbound( @SuppressWarnings({ "rawtypes" }) Class paramType, InboundVariable data, Map<String, String> tokens, InboundContext inctx, String value) throws MarshallException { final String coordinatesString = tokens.get("coordinates"); //$NON-NLS-1$ final String[] split = ParseUtil.splitInbound(coordinatesString); final String splitValue = split[LocalUtil.INBOUND_INDEX_VALUE]; final String splitType = split[LocalUtil.INBOUND_INDEX_TYPE]; final InboundVariable nested = new InboundVariable( data.getLookup(), null, splitType, splitValue); @SuppressWarnings("unchecked") final C coordinates = (C) getConverterManager().convertInbound( getCoordinatesType(), nested, inctx, null); return createGeometry(coordinates); }
@Override protected Object convertInbound( @SuppressWarnings({ "rawtypes" }) Class paramType, InboundVariable data, Map<String, String> tokens, InboundContext inctx, String value) throws MarshallException { final String coordinatesString = tokens.get("coordinates"); //$NON-NLS-1$ final String[] split = ParseUtil.splitInbound(coordinatesString); final String splitValue = split[LocalUtil.INBOUND_INDEX_VALUE]; final String splitType = split[LocalUtil.INBOUND_INDEX_TYPE]; final InboundVariable nested = new InboundVariable( data.getLookup(), null, splitType, splitValue); @SuppressWarnings("unchecked") final C coordinates = (C) getConverterManager().convertInbound( getCoordinatesType(), nested, inctx, null); return createGeometry(coordinates); }
String splitType = split[LocalUtil.INBOUND_INDEX_TYPE]; InboundVariable nested = new InboundVariable(data.getLookup(), null, splitType, splitValue);