@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( "{" ).append( type.toString() ).append( "}" ); sb.append( value.toString() ); return sb.toString(); } }
/** * @param writer * @param singleValue * @param elementName * @throws XMLStreamException */ protected static void exportSingleValueType( XMLStreamWriter writer, SingleValue<?> singleValue, String elementName ) throws XMLStreamException { if ( singleValue != null ) { String type = ( singleValue.type == ValueType.Void ) ? ValueType.String.toString() : singleValue.type.toString(); writeElement( writer, WCS_100_NS, elementName, singleValue.value.toString(), WCS_100_NS, WCS_100_PRE, "type", type, true ); } }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( "{" ).append( min.type.toString() ).append( "}" ); sb.append( closure.begin ).append( min.value.toString() ).append( "/" ).append( max.value.toString() ).append( closure.end ); if ( spacing != null ) { sb.append( "/" ).append( spacing.toString() ); } return sb.toString(); }
/** * Get the interval defined by the given String. * * @param interval * @return */ private static Interval<?, ?> parseInterval( String interval, ValueType type ) { Interval<?, ?> result = null; String[] split = interval.split( "/" ); if ( split.length == 2 || split.length == 3 ) { // should be min/max/res String min = split[0]; String max = split[1]; String res = null; if ( split.length == 3 ) { res = split[2]; } SingleValue<?> spacing = res == null ? null : SingleValue.createFromString( ValueType.Void.name(), res ); result = Interval.createFromStrings( type.toString(), min, max, Closure.closed, null, false, spacing ); } else { LOG.warn( "Given intervall: " + interval + " has not enough values, maybe a default value is ment?" ); } return result; }
if ( min.type != sv.type ) { if ( min.type == ValueType.Void ) { tmpInter = Interval.createFromStrings( sv.type.toString(), tmpInter.getMin().value.toString(), tmpInter.getMax().value.toString(), tmpInter.getSpacing() ); } else if ( sv.type == ValueType.Void ) { sv = SingleValue.createFromString( min.type.toString(), sv.value.toString() ); } else { continue;