ecologylab.xml.library.yahoo
Class Result

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.xml.ElementState
          extended by ecologylab.xml.library.yahoo.Result
All Implemented Interfaces:
OptimizationTypes, XMLTranslationExceptionTypes

public class Result
extends ElementState

Result from a Yahoo Search. This implementation has fields for "web search" and "image search". I expect other fields will get added for other types of search.

Author:
andruid

Nested Class Summary
 
Nested classes/interfaces inherited from class ecologylab.xml.ElementState
ElementState.ClassToCollectionMap, ElementState.DeclarationStyle, ElementState.xml_attribute, ElementState.xml_class, ElementState.xml_classes, ElementState.xml_collection, ElementState.xml_leaf, ElementState.xml_map, ElementState.xml_nested, ElementState.xml_tag
 
Field Summary
 java.lang.String FileFormat
          For image search only.
 int FileSize
          Another field for image search only.
 int Height
           
 java.lang.String MimeType
          For web search only.
 java.lang.String NewsSource
          Specific to news search.
 ParsedURL RefererUrl
          For image search, this is the Container web page!
 java.lang.String Summary
           
 ThumbnailState Thumbnail
          Cool! For image search, direct access to their thumbnail image.
 java.lang.String Title
           
 ParsedURL Url
          For web search, the URL of the document.
 int Width
           
 
Fields inherited from class ecologylab.xml.ElementState
CDATA, ESTIMATE_CHARS_PER_FIELD, FLOATING_PRECISION_OFF, MARSHALLING_PARAMS, NORMAL, UTF16, UTF16_LE, UTF8, XML_FILE_HEADER
 
Fields inherited from interface ecologylab.xml.OptimizationTypes
BAD_FIELD, COLLECTION_ELEMENT, COLLECTION_SCALAR, IGNORED_ATTRIBUTE, IGNORED_ELEMENT, LEAF_NODE_VALUE, MAP_ELEMENT, MAP_SCALAR, NAME_SPACE_ATTRIBUTE, NAME_SPACE_LEAF_NODE, NAME_SPACE_MASK, NAME_SPACE_NESTED_ELEMENT, NAMESPACE_IGNORED_ELEMENT, NAMESPACE_TRIAL_ELEMENT, OTHER_NESTED_ELEMENT, REGULAR_ATTRIBUTE, REGULAR_NESTED_ELEMENT, ROOT, UNSET_TYPE, XMLNS_ATTRIBUTE, XMLNS_IGNORED
 
Fields inherited from interface ecologylab.xml.XMLTranslationExceptionTypes
FILE_NOT_FOUND, IO_EXCEPTION, NULL_PURL, UNKNOWN
 
Constructor Summary
Result()
           
 
Method Summary
protected  java.lang.String[] leafElementFieldNames()
          The array of Strings with the names of the leaf elements.
 
Methods inherited from class ecologylab.xml.ElementState
addNestedElement, addNestedElement, appendTextNodeString, buildDOM, buildDOM, buildDOM, buildDOM, buildDOM, buildDOMFromXMLCharSequence, buildDOMFromXMLString, checkAnnotation, convertNameStyles, createChildHook, fieldToXMLOptimizations, floatingPrecision, getCollection, getElementStateById, getMap, getNestedNameSpace, getTextNodeString, lookupNestedNameSpace, optimizations, parent, postTranslationProcessingHook, preTranslationProcessingHook, recycle, setDeclarationStyle, setFieldUsingTypeRegistry, setFloatingPrecision, setParent, setUseDOMForTranslateTo, translateFromXML, translateFromXML, translateFromXML, translateFromXML, translateFromXML, translateFromXMLCharSequence, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOMCharSequence, translateFromXMLDOMCharSequence, translateFromXMLRootNode, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateToDOM, translateToXML, translateToXML, translateToXML, translateToXML, writePrettyXML, writePrettyXML, writePrettyXML
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Title

public java.lang.String Title

Summary

public java.lang.String Summary

Url

public ParsedURL Url
For web search, the URL of the document. For image search, the URL of the image.


RefererUrl

public ParsedURL RefererUrl
For image search, this is the Container web page!


FileSize

public int FileSize
Another field for image search only. How useful! Lets us know if we want to work with the thumbnail or just download the whole image. Seems to be in bytes.


Width

public int Width

Height

public int Height

FileFormat

public java.lang.String FileFormat
For image search only. This seems to be the file suffix, though they use jpeg instead of jpg.


NewsSource

public java.lang.String NewsSource
Specific to news search.


MimeType

public java.lang.String MimeType
For web search only. Like file format, except its true mime type, like text/html. Very nice.


Thumbnail

public ThumbnailState Thumbnail
Cool! For image search, direct access to their thumbnail image.

Constructor Detail

Result

public Result()
Method Detail

leafElementFieldNames

protected java.lang.String[] leafElementFieldNames()
The array of Strings with the names of the leaf elements.

Overrides:
leafElementFieldNames in class ElementState
Returns: