|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.feedparser.locate.FeedReference
public class FeedReference
A FeedReference is used within the RSS/Atom location facility to pass back metadata for feed discoveries.
Right now we pass back the URL to the feeds as the `resource' parameter. The media type (application/rss+xml, application/atom+xml, etc) as the type param (which is optional). We also pass back the `title' back if its specified within autodiscovery. This will be null if another discovery method is used.
Its important to realize that the media type is only given if we're 100% certain of the value. If we have to use probe discovery or link discovery it might not be possible to obtain the media type without antoher network request (via HTTP headers).
Note that internally (within the ProbeLocator) we don't use absolute resource URLs but use relative ones and use the media type as the default media type.
Field Summary | |
---|---|
static String |
ATOM_MEDIA_TYPE
|
int |
method
The method of discovery... |
static int |
METHOD_AUTO_DISCOVERY
|
static int |
METHOD_LINK_DISCOVERY
|
static int |
METHOD_PROBE_DISCOVERY
|
String |
resource
The network addressable resource forfor this feed. |
static String |
RSS_MEDIA_TYPE
|
protected Pattern |
schemePattern
|
String |
title
The title of the reference. |
String |
type
The media type of this feed. |
static String |
XML_MEDIA_TYPE
|
Constructor Summary | |
---|---|
FeedReference(String resource,
String type)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
boolean |
isRelative()
Determines if the resource given by this FeedReference is relative. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ATOM_MEDIA_TYPE
public static final String RSS_MEDIA_TYPE
public static final String XML_MEDIA_TYPE
public static int METHOD_AUTO_DISCOVERY
public static int METHOD_PROBE_DISCOVERY
public static int METHOD_LINK_DISCOVERY
public String resource
public String type
public String title
public int method
protected Pattern schemePattern
Constructor Detail |
---|
public FeedReference(String resource, String type)
Method Detail |
---|
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public boolean isRelative()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |