|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object yarfraw.core.datamodel.Enclosure
public class Enclosure
This is only used by Rss 2.0.
Describes a media object that is attached to the item.
It has three required attributes. url says where the enclosure is located, length says how big it is in bytes, and type says what its type is, a standard MIME type.
The url must be an http url.
example: <enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
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 | |
---|---|
Enclosure()
|
|
Enclosure(String url,
String length,
String mimeType,
String value)
It has three required attributes. |
Method Summary | |
---|---|
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. |
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 |
getLength()
|
Long |
getLengthAsLong()
Parse length attribute into a Long and returns it. |
String |
getMimeType()
|
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 |
getUrl()
|
URI |
getUrlAsUri()
Parse field Url to a URI object and returns it. |
String |
getValue()
|
int |
hashCode()
|
Enclosure |
setLength(String length)
|
Enclosure |
setMimeType(String mimeType)
|
Enclosure |
setUrl(String url)
|
Enclosure |
setValue(String value)
|
String |
toString()
|
void |
validate(FeedFormat format)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String _base
protected String _lang
protected String _resource
protected String _about
protected Map<QName,String> _otherAttributes
protected List<Element> _otherElements
Constructor Detail |
---|
public Enclosure()
public Enclosure(String url, String length, String mimeType, String value)
URISyntaxException
Method Detail |
---|
public URI getUrlAsUri() throws URISyntaxException
URI
object and returns it.
URI
object.
URISyntaxException
public Long getLengthAsLong()
Long
and returns it.
public String getUrl()
public Enclosure setUrl(String url)
public String getLength()
public Enclosure setLength(String length)
public String getMimeType()
public Enclosure setMimeType(String mimeType)
public String getValue()
public Enclosure setValue(String value)
public void validate(FeedFormat format) throws ValidationException
ValidationException
public String getBase()
FeedFormat
will ignore this attribute.
public String getLang()
public Locale getLangAsLocale()
public String getResource()
FeedFormat
will ignore this attribute.
public String getAbout()
FeedFormat
will ignore this attribute.
public List<Element> getOtherElements()
public Element getElementByNS(String namespaceURI, String localName)
namespaceURI
- - namespaceURI of the element to be search forlocalName
- - localName of the element
public Element getElementByLocalName(String localName)
localName
- - localName of the element
public Map<QName,String> getOtherAttributes()
public String getAttributeValueByLocalName(String localName)
localName
- localName of the attribute
public String getAttributeValueByQName(QName name)
QName
.
name
- QName
of the attribute
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |