@Override public String getValueUri(StringValue value) { return this.uriPrefix + value.getString() + this.uriPostfix; }
/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */ public static String toString(StringValue o) { return "\"" + o.getString().replace("\"", "\\\"") + "\""; }
/** * Returns a hash code for the given object. * * @see java.lang.Object#hashCode() * @param o * the object to create a hash for * @return the hash code of the object */ public static int hashCode(StringValue o) { return o.getString().hashCode(); }
/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */ public static String toString(StringValue o) { return "\"" + o.getString().replace("\"", "\\\"") + "\""; }
/** * Returns a hash code for the given object. * * @see java.lang.Object#hashCode() * @param o * the object to create a hash for * @return the hash code of the object */ public static int hashCode(StringValue o) { return o.getString().hashCode(); }
/** * Returns true if the parameters are two {@link StringValue} objects with * exactly the same data. It does not matter if they are different * implementations of the interface as long as their content is the same. * * @param o1 * the first object to compare * @param o2 * the second object to compare * @return true if both objects are equal */ public static boolean equalsStringValue(StringValue o1, Object o2) { if (o2 == null) { return false; } if (o2 == o1) { return true; } return o2 instanceof StringValue && o1.getString().equals(((StringValue) o2).getString()); }
@Override public String getValueUri(StringValue value) { return "http://rdf.freebase.com/ns/" + value.getString().substring(1).replace('/', '.'); }
/** * Returns true if the parameters are two {@link StringValue} objects with * exactly the same data. It does not matter if they are different * implementations of the interface as long as their content is the same. * * @param o1 * the first object to compare * @param o2 * the second object to compare * @return true if both objects are equal */ public static boolean equalsStringValue(StringValue o1, Object o2) { if (o2 == null) { return false; } if (o2 == o1) { return true; } return o2 instanceof StringValue && o1.getString().equals(((StringValue) o2).getString()); }
/** * Copies a {@link StringValue}. * * @param object * object to copy * @return copied object */ public StringValue copy(StringValue object) { return dataObjectFactory.getStringValue(object.getString()); }
/** * Copies a {@link StringValue}. * * @param object * object to copy * @return copied object */ public StringValue copy(StringValue object) { return dataObjectFactory.getStringValue(object.getString()); }
@Override public WikidataValue visit(StringValue value) { return WikidataValue.forString(value.getString()); }
@Override public WikidataValue visit(StringValue value) { return WikidataValue.forString(value.getString()); }
break; case DatatypeIdValue.DT_COMMONS_MEDIA: valueUriString = getCommonsUrl(value.getString()); break; case DatatypeIdValue.DT_URL: valueUriString = value.getString(); break; default: return this.rdfWriter.getLiteral(value.getString()); } else { this.rdfConversionBuffer.addObjectProperty(propertyIdValue);
case DatatypeIdValue.DT_COMMONS_MEDIA: if (simple) { valueUriString = getCommonsFileUrl(value.getString()); valueUriString = value.getString(); case DatatypeIdValue.DT_TABULAR_DATA: if (simple) { valueUriString = getCommonsDataUrl(value.getString()); if (simple) { this.rdfConversionBuffer.addDatatypeProperty(propertyIdValue); return this.rdfWriter.getLiteral(value.getString()); } else { return null; // or blank node
Value value = s.getMainSnak().getValue(); if (value instanceof StringValue) { imageFile = ((StringValue) value).getString(); break;
if (statement.getMainSnak() instanceof ValueSnak && statement.getValue() instanceof StringValue) { String uriPattern = ((StringValue) statement.getValue()).getString(); if (this.uriPatterns.containsKey(entry.getKey())) { logger.info("Found multiple URI patterns for property "
out.print(csvEscape(itemDocument.findLabel("de"))); out.print(","); out.print(csvEscape(stringValue.getString())); out.print(","); SiteLink enwiki = itemDocument.getSiteLinks().get("enwiki");
out.print(csvEscape(itemDocument.findLabel("de"))); out.print(","); out.print(csvEscape(stringValue.getString())); out.print(","); SiteLink enwiki = itemDocument.getSiteLinks().get("enwiki");
.getValue(); if (value instanceof StringValue) { imageFile = ((StringValue) value).getString(); break;
continue; String urlPattern = ((StringValue) v).getString(); boolean foundGacUrl = false; if (pr.urlPattern == null) {