|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.syndication.feed.module.mediarss.types.Restriction
public class Restriction
<media:restriction>
Allows restrictions to be placed on the aggregator rendering the media in the feed. Currently, restrictions are based on distributor (uri) and country codes. This element is purely informational and no obligation can be assumed or implied. Only one <media:restriction> element of the same type can be applied to a media object - all others will be ignored. Entities in this element should be space separated. To allow the producer to explicitly declare his/her intentions, two literals are reserved: 'all', 'none'. These literals can only be used once. This element has 1 required attribute, and 1 optional attribute (with strict requirements for its exclusion).
<media:restriction relationship="allow" type="country">au us</media:restriction>
relationship indicates the type of relationship that the restriction represents (allow | deny). In the example above, the media object should only be syndicated in Australia and the United States. It is a required attribute.
Note: If the "allow" element is empty and the type is relationship is "allow", it is assumed that the empty list means "allow nobody" and the media should not be syndicated.
A more explicit method would be:
<media:restriction relationship="allow" type="country">au us</media:restriction>
type specifies the type of restriction (country | uri) that the media can be syndicated. It is an optional attribute; however can only be excluded when using one of the literal values "all" or "none".
"country" allows restrictions to be placed based on country code. [ISO 3166]
"uri" allows restrictions based on URI. Examples: urn:apple, http://images.google.com, urn:yahoo, etc.
Nested Class Summary | |
---|---|
static class |
Restriction.Relationship
Indicates the action of the relationship |
static class |
Restriction.Type
Indicated the type of the relationship |
Constructor Summary | |
---|---|
Restriction(Restriction.Relationship relationship,
Restriction.Type type,
java.lang.String value)
Creates a new instance of Restriction |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
Restriction.Relationship |
getRelationship()
|
Restriction.Type |
getType()
|
java.lang.String |
getValue()
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Restriction(Restriction.Relationship relationship, Restriction.Type type, java.lang.String value)
relationship
- a Restriction.Relationship objecttype
- A Restriction.Type objectvalue
- a value for the restriction.Method Detail |
---|
public Restriction.Relationship getRelationship()
public Restriction.Type getType()
public java.lang.String getValue()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |