yarfraw.core.datamodel
Class TextInput

java.lang.Object
  extended by yarfraw.core.datamodel.TextInput
All Implemented Interfaces:
Serializable

public class TextInput
extends Object

<TextInput> element of Rss 1.0 and Rss 2.0. This is ignored by Atom 1.0

  • Rss 2.0 - A channel may optionally contain a sub-element, which contains four required sub-elements.
    <title> -- The label of the Submit button in the text input area.
    <description> -- Explains the text input area.
    <name> -- The name of the text object in the text input area.
    <link> -- The URI of the CGI script that processes text input requests.
    The purpose of the element is something of a mystery. You can use it to specify a search engine box. Or to allow a reader to provide feedback. Most aggregators ignore it.
  • Rss 1.0 - The textinput element affords a method for submitting form data to an arbitrary URL -- usually located at the parent website. The form processor at the receiving end only is assumed to handle the HTTP GET method. The field is typically used as a search box or subscription form -- among others. While this is of some use when RSS documents are rendered as channels (see MNN) and accompanied by human readable title and description, the ambiguity in automatic determination of meaning of this overloaded element renders it otherwise not particularly useful. RSS 1.0 therefore suggests either deprecation or augmentation with some form of resource discovery of this element in future versions while maintaining it for backward compatibility with RSS 0.9. {textinput_uri} must be unique with respect to any other rdf:about attributes in the RSS document and is a URI which identifies the textinput. {textinput_uri} should be identical to the value of the sub-element of the <textinput> element, if possible.
  • Author:
    jliang
    See Also:
    Serialized Form

    Field Summary
    protected  String _about
               
    protected  String _base
               
    protected  String _lang
               
    protected  Map<QName,String> _otherAttributes
               
    protected  List<Element> _otherElements
               
    protected  String _resource
               
     
    Constructor Summary
    TextInput()
               
    TextInput(String title, String description, String name, String link)
              A channel may optionally contain a sub-element, which contains four required sub-elements.
    <title> -- The label of the Submit button in the text input area.
    <description> -- Explains the text input area.
    <name> -- The name of the text object in the text input area.
    <link> -- The URI of the CGI script that processes text input requests.
    The purpose of the element is something of a mystery.
     
    Method Summary
     TextInput addOtherAttributes(QName namespace, String attribute)
              Add an attribute that is not in the RSS 2.0 specs.
     TextInput addOtherElement(Element element)
              Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.
     TextInput addOtherElement(String xmlString)
              Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.
     boolean equals(Object other)
               
     String getAbout()
              This maps to the required 'about' attribute that present of all second level elements (channel, image, item, and textinput).
     String getAttributeValueByLocalName(String localName)
              Search for attributes that are not in the spec by its local name.
     String getAttributeValueByQName(QName name)
              Search for attributes that are not in the spec by its QName.
     String getBase()
              This maps to the 'base' attribute that is common in all Atom 1.0 elements.
     String getDescription()
              Explains the text input area.
     Element getElementByLocalName(String localName)
              Search through the other element list and return the FIRST element that matches the input localName.
     Element getElementByNS(String namespaceURI, String localName)
              Search through the other element list and return the first element that matches both input the namespaceURI and the localName.
     String getLang()
              The language attribute indicates the language that is used by the enclosed element.
     Locale getLangAsLocale()
              The language attribute indicates the language that is used by the enclosed element.
     String getLink()
              The URI of the CGI script that processes text input requests.
     String getName()
              The name of the text object in the text input area.
     Map<QName,String> getOtherAttributes()
              Any other attribute that is not in the RSS specs.
     List<Element> getOtherElements()
              Other additional elements that are not in the Rss specs.
     String getResource()
              This maps to the optional 'resource' attribute that present in some Rss 1.0 elements.
     String getTitle()
              The label of the Submit button in the text input area.
     int hashCode()
               
     TextInput setAbout(String about)
              Rss 1.0 only
     TextInput setDescription(String description)
              Explains the text input area.
     TextInput setLink(String link)
              The URI of the CGI script that processes text input requests.
     TextInput setName(String name)
              The name of the text object in the text input area.
     TextInput setOtherAttributes(Map<QName,String> otherAttributes)
              Any other attribute that is not in the RSS 2.0 specs.
     TextInput setOtherElements(List<Element> otherElements)
              Other additional elements that are not in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.
     TextInput setResource(String resource)
              Rss 1.0 only
     TextInput setTitle(String title)
              The label of the Submit button in the text input area.
     String toString()
               
     void validate(FeedFormat format)
               
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
     

    Field Detail

    _base

    protected String _base

    _lang

    protected String _lang

    _resource

    protected String _resource

    _about

    protected String _about

    _otherAttributes

    protected Map<QName,String> _otherAttributes

    _otherElements

    protected List<Element> _otherElements
    Constructor Detail

    TextInput

    public TextInput()

    TextInput

    public TextInput(String title,
                     String description,
                     String name,
                     String link)
    A channel may optionally contain a sub-element, which contains four required sub-elements.
    <title> -- The label of the Submit button in the text input area.
    <description> -- Explains the text input area.
    <name> -- The name of the text object in the text input area.
    <link> -- The URI of the CGI script that processes text input requests.
    The purpose of the element is something of a mystery. You can use it to specify a search engine box. Or to allow a reader to provide feedback. Most aggregators ignore it.

    Throws:
    URISyntaxException - if link is an invalid URI
    Method Detail

    getTitle

    public String getTitle()
    The label of the Submit button in the text input area.


    setTitle

    public TextInput setTitle(String title)
    The label of the Submit button in the text input area.


    getDescription

    public String getDescription()
    Explains the text input area.


    setDescription

    public TextInput setDescription(String description)
    Explains the text input area.


    getName

    public String getName()
    The name of the text object in the text input area.


    setName

    public TextInput setName(String name)
    The name of the text object in the text input area.


    getLink

    public String getLink()
    The URI of the CGI script that processes text input requests.


    setLink

    public TextInput setLink(String link)
    The URI of the CGI script that processes text input requests.


    setResource

    public TextInput setResource(String resource)
    Rss 1.0 only

    Parameters:
    resource -
    Returns:

    setAbout

    public TextInput setAbout(String about)
    Rss 1.0 only

    Parameters:
    about -
    Returns:

    setOtherAttributes

    public TextInput setOtherAttributes(Map<QName,String> otherAttributes)
    Any other attribute that is not in the RSS 2.0 specs.


    addOtherAttributes

    public TextInput addOtherAttributes(QName namespace,
                                        String attribute)
    Add an attribute that is not in the RSS 2.0 specs.


    setOtherElements

    public TextInput setOtherElements(List<Element> otherElements)
    Other additional elements that are not in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.


    addOtherElement

    public TextInput addOtherElement(Element element)
    Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.

    Parameters:
    element - - any element

    addOtherElement

    public TextInput addOtherElement(String xmlString)
                              throws SAXException,
                                     IOException,
                                     ParserConfigurationException
    Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.

    Parameters:
    xmlString - - any element
    Throws:
    ParserConfigurationException
    IOException
    SAXException

    validate

    public void validate(FeedFormat format)
                  throws ValidationException
    Throws:
    ValidationException

    getBase

    public String getBase()
    This maps to the 'base' attribute that is common in all Atom 1.0 elements. Other FeedFormat will ignore this attribute.

    Returns:
    - attribute value.

    getLang

    public String getLang()
    The language attribute indicates the language that is used by the enclosed element.

    Returns:
    - attribute value.

    getLangAsLocale

    public Locale getLangAsLocale()
    The language attribute indicates the language that is used by the enclosed element.

    Returns:
    - a new Locale Object by parsing the lang attribute.

    getResource

    public String getResource()
    This maps to the optional 'resource' attribute that present in some Rss 1.0 elements. Other FeedFormat will ignore this attribute.

    Returns:
    - attribute value.

    getAbout

    public String getAbout()
    This maps to the required 'about' attribute that present of all second level elements (channel, image, item, and textinput). Other FeedFormat will ignore this attribute.

    Returns:
    - attribute value.

    getOtherElements

    public List<Element> getOtherElements()
    Other additional elements that are not in the Rss specs.


    getElementByNS

    public Element getElementByNS(String namespaceURI,
                                  String localName)
    Search through the other element list and return the first element that matches both input the namespaceURI and the localName.

    Parameters:
    namespaceURI - - namespaceURI of the element to be search for
    localName - - localName of the element
    Returns:
    - null if no matching element is found, the matching element otherwise.

    getElementByLocalName

    public Element getElementByLocalName(String localName)
    Search through the other element list and return the FIRST element that matches the input localName.

    Parameters:
    localName - - localName of the element
    Returns:
    - null if no matching element is found, the matching element otherwise.

    getOtherAttributes

    public Map<QName,String> getOtherAttributes()
    Any other attribute that is not in the RSS specs.


    getAttributeValueByLocalName

    public String getAttributeValueByLocalName(String localName)
    Search for attributes that are not in the spec by its local name.

    Parameters:
    localName - localName of the attribute
    Returns:
    null if attribute is not found, the value of the attribute otherwise

    getAttributeValueByQName

    public String getAttributeValueByQName(QName name)
    Search for attributes that are not in the spec by its QName.

    Parameters:
    name - QName of the attribute
    Returns:
    null if attribute is not found, the value of the attribute otherwise

    toString

    public String toString()
    Overrides:
    toString in class Object

    equals

    public boolean equals(Object other)
    Overrides:
    equals in class Object

    hashCode

    public int hashCode()
    Overrides:
    hashCode in class Object


    Copyright © 2008. All Rights Reserved.