Package com.yahoo.search.result
Class StructuredData
java.lang.Object
com.yahoo.search.result.StructuredData
- All Implemented Interfaces:
com.yahoo.data.access.Inspectable,JsonProducer,XmlProducer
public class StructuredData
extends Object
implements com.yahoo.data.access.Inspectable, JsonProducer, XmlProducer
A wrapper for structured data representing feature values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.yahoo.data.access.Inspectorinspect()toJson()Convenience method equivalent to writeJson(new StringBuilder()).toString()toString()writeJson(StringBuilder target) Append the JSON representation of this object's data to a StringBuilder.writeXML(StringBuilder target) Append the XML representation of this object's data to a StringBuilder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.yahoo.data.XmlProducer
toXML
-
Constructor Details
-
StructuredData
public StructuredData(com.yahoo.data.access.Inspector value)
-
-
Method Details
-
inspect
public com.yahoo.data.access.Inspector inspect()- Specified by:
inspectin interfacecom.yahoo.data.access.Inspectable
-
toString
-
writeXML
Description copied from interface:XmlProducerAppend the XML representation of this object's data to a StringBuilder.- Specified by:
writeXMLin interfaceXmlProducer- Parameters:
target- the StringBuilder to append to.- Returns:
- the target passed in is also returned (to allow chaining).
-
toJson
Description copied from interface:JsonProducerConvenience method equivalent to writeJson(new StringBuilder()).toString()- Specified by:
toJsonin interfaceJsonProducer- Returns:
- a String containing JSON representation of this object's data
-
writeJson
Description copied from interface:JsonProducerAppend the JSON representation of this object's data to a StringBuilder.- Specified by:
writeJsonin interfaceJsonProducer- Parameters:
target- the StringBuilder to append to- Returns:
- the target passed in is also returned (to allow chaining)
-