@Override public int hashCode() { return name.hashCode(); } }
/** * @param integer */ public void setQuality(XSInteger integer) { setQuality(integer.asPrimitiveInt()); }
public boolean isFetchable() { if (value.isCached()) { return true; } if (value instanceof StreamableItem) { StreamableItem sitem = (StreamableItem)value; return (sitem.isFetchable()); } return (false); }
@Override public String asString() { if (value == null) value = String.format("@%s %s,%s", radius, center.getLatitude(), center.getLongitude()); return value; }
/** * Convenience method to construct an {@link XdmDuration} value. * * @param serializedString * A {@link String} representation of the duration (ie P2Y3M141DT12H46M12.34S). * @return An instance of {@link XdmDuration}. */ public static XdmDuration newDuration(String serializedString) { return new Duration(serializedString); }
public void writeTo(OutputStream outputStream) throws IOException { value.writeTo(outputStream); }
public boolean isCached() { return value.isCached(); }
public ValueType getValueType() { return value.getValueType(); } }
public ItemType getItemType() { return value.getItemType(); }
public InputStream asInputStream() { return value.asInputStream(); }
/** * Construct a duration object initialized from the given string in the format of a serialized * xs:duration item. Examples: P2Y3M141DT12H46M12.34S, -P92M, -P32M2DT0.2S. * * @param duration * An xs:duration value as defined by <a * href="http://www.w3.org/TR/xmlschema-2/#duration>XML Schema Part 2: Datatypes</a> * @throws IllegalArgumentException * If the given string is not a valid duration value. */ public Duration(String duration) { parseDuration(duration); }
public String asString() { return value.asString(); }
public Reader asReader() { return value.asReader(); }
public KeyValueWriter(Configuration conf, String host) { super(conf, host); String keyDataType = conf.get(OUTPUT_KEY_TYPE, "xs:string"); keyType = ValueType.valueOf(keyDataType); String valueDataType = conf.get(OUTPUT_VALUE_TYPE, "xs:string"); valueType = ValueType.valueOf(valueDataType); statement = conf.get(OUTPUT_QUERY); queryLanguage = conf.get(OUTPUT_QUERY_LANGUAGE); }
public static String asStringConcatenation(XdmSequence<?> sequence, String separator) { StringBuffer sb = new StringBuffer(512); String[] strings = sequence.asStrings(); for (int i = 0; i < strings.length; i++) { if (i != 0) { sb.append(separator); } sb.append(strings[i]); } return sb.substring(0); }
public AbstractDurationItem(ItemType type, String value) { super(type, value); this.value = new Duration(value); }
public void writeTo(Writer writer) throws IOException { value.writeTo(writer); }
public void cache() { if (!value.isCached()) { asString(); } }