Class ToString
java.lang.Object
org.wikidata.wdtk.datamodel.helpers.ToString
Static class for computing a toString of arbitrary data objects using only
their Stringerfaces. This can be used to implement the toString() method of
arbitrary Stringerface implementations. More efficient solutions might exist
if the object that implements an Stringerface is of a specific known type,
but the methods here could always be used as a fallback or default.
The methods here are only meant for human consumption. Generic methods for
serializing certain data values in well-defined string formats are found in
DataFormatter
instead.
- Author:
- Markus Kroetzsch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
getCalendarString
(String calendarModel) Returns a human-readable string representation of a reference to a calendar model that is used for a time value.protected static String
getGlobeString
(String globeIri) Returns a human-readable string representation of a reference to a globe on which coordinates may be present.protected static String
getTimePrecisionString
(byte precision) Returns a human-readable string representation of a reference to a precision that is used for a time value.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.static String
Returns a human-readable string representation of the given object.protected static String
protected static String
Returns a human-readable string representation of the givenTermedDocument
.
-
Constructor Details
-
ToString
public ToString()
-
-
Method Details
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
toStringForStatementDocument
-
toStringForTermedDocument
Returns a human-readable string representation of the givenTermedDocument
.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-
getGlobeString
Returns a human-readable string representation of a reference to a globe on which coordinates may be present. Known globes (such as Earth) are replaced by their common English names.- Parameters:
globeIri
- the globe item's IRI- Returns:
- a string representation of the globe
-
getCalendarString
Returns a human-readable string representation of a reference to a calendar model that is used for a time value. Known calendars (such as proleptic Gregorian calendar) are replaced by short English names. The term "proleptic" is omitted.- Parameters:
calendarModel
- the calendar model item's IRI- Returns:
- a string representation of the calendar model
-
getTimePrecisionString
Returns a human-readable string representation of a reference to a precision that is used for a time value.- Parameters:
precision
- the numeric precision- Returns:
- a string representation of the precision
-
toString
Returns a human-readable string representation of the given object.- Parameters:
o
- the object to represent as string- Returns:
- a string representation of the object
- See Also:
-