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 Details

    • StructuredData

      public StructuredData(com.yahoo.data.access.Inspector value)
  • Method Details

    • inspect

      public com.yahoo.data.access.Inspector inspect()
      Specified by:
      inspect in interface com.yahoo.data.access.Inspectable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeXML

      public StringBuilder writeXML(StringBuilder target)
      Description copied from interface: XmlProducer
      Append the XML representation of this object's data to a StringBuilder.
      Specified by:
      writeXML in interface XmlProducer
      Parameters:
      target - the StringBuilder to append to.
      Returns:
      the target passed in is also returned (to allow chaining).
    • toJson

      public String toJson()
      Description copied from interface: JsonProducer
      Convenience method equivalent to writeJson(new StringBuilder()).toString()
      Specified by:
      toJson in interface JsonProducer
      Returns:
      a String containing JSON representation of this object's data
    • writeJson

      public StringBuilder writeJson(StringBuilder target)
      Description copied from interface: JsonProducer
      Append the JSON representation of this object's data to a StringBuilder.
      Specified by:
      writeJson in interface JsonProducer
      Parameters:
      target - the StringBuilder to append to
      Returns:
      the target passed in is also returned (to allow chaining)