|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.common.categories.Categories
public class Categories
The Atom Publishing Protocol introduces the notion of a "Category Document" and the app:categories element. These are used to provide a listing of atom:Category elements that may be used with the members of an Atom Publishing Protocol collection.
Constructor Summary | |
---|---|
Categories()
Constructor |
|
Categories(List<AtomCategory> categories)
Constructor |
Method Summary | |
---|---|
Categories |
addCategory(AtomCategory category)
Add an atom:Category to the listing |
AtomCategory |
addCategory(String term)
Create and add an atom:Category to the listing |
AtomCategory |
addCategory(String scheme,
String term,
String label)
Create an add an atom:Category to the listing |
boolean |
contains(String term)
Returns true if this app:categories listing contains a Category with the specified term |
boolean |
contains(String term,
String scheme)
Returns true if this app:categories listing contains a Category with the specified term and scheme |
List<AtomCategory> |
getCategories()
Lists the complete set of categories |
List<AtomCategory> |
getCategories(String scheme)
Lists the complete set of categories that use the specified scheme |
Class<?> |
getHandlingClass()
Get Categories Document handling Resource class |
Object |
getHandlingInstance()
Get handling Bean for Categories Document |
String |
getHref()
When contained within an app:collection element, the app:categories element can have an href attribute whose value MUST point to an Atompub Categories Document. |
String |
getScheme()
The app:categories element may specify a default scheme attribute for listed atom:Category elements that do not have their own scheme attribute. |
javax.ws.rs.core.MultivaluedMap<String,String> |
getTemplateParameters()
Get Uri Template Variables |
boolean |
isFixed()
If an app:categories element is marked as fixed, then the set of atom:Category elements is considered to be a closed set. |
boolean |
isOutOfLine()
Returns true if the href attribute is set |
void |
setCategories(List<AtomCategory> categories)
Set a list of categories |
Categories |
setFixed(boolean fixed)
Sets whether or not this is a fixed listing of categories. |
void |
setHref(Class<?> handlingClass,
javax.ws.rs.core.MultivaluedMap<String,String> templateParams)
Set Resource class that will generate Categories Document |
void |
setHref(Object handlingInstance,
javax.ws.rs.core.MultivaluedMap<String,String> templateParams)
Set Resource that will generate Categories Document |
Categories |
setHref(String href)
Sets the value of the href attribute. |
Categories |
setScheme(String scheme)
Sets the default scheme for this listing of categories |
void |
setTemplateParameters(javax.ws.rs.core.MultivaluedMap<String,String> templateParams)
Set Uri Template Variables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Categories(List<AtomCategory> categories)
categories
- public Categories()
categories
- Method Detail |
---|
public String getHref()
public Categories setHref(String href)
href
- The location of an Atompub Categories Documentpublic void setHref(Class<?> handlingClass, javax.ws.rs.core.MultivaluedMap<String,String> templateParams)
handlingClass
- Resource ClasstemplateParams
- Map of URI variable names and their valuespublic void setHref(Object handlingInstance, javax.ws.rs.core.MultivaluedMap<String,String> templateParams)
handlingInstance
- Resource instancetemplateParams
- Map of URI variable names and their valuespublic boolean isFixed()
public Categories setFixed(boolean fixed)
fixed
- True if the app:categories listing is fixedpublic String getScheme()
public Categories setScheme(String scheme)
scheme
- The default scheme used for this listing of categoriespublic List<AtomCategory> getCategories()
public List<AtomCategory> getCategories(String scheme)
scheme
- The String of an atom:Category scheme
public Categories addCategory(AtomCategory category)
Category
- The atom:Category to add to the listingpublic AtomCategory addCategory(String term)
term
- The string term
public AtomCategory addCategory(String scheme, String term, String label)
scheme
- The scheme String for the newly created Categoryterm
- The string termlabel
- The human readable label for the Category
public boolean contains(String term)
term
- The term to look for
public boolean contains(String term, String scheme)
term
- The term to look forscheme
- The String scheme
public boolean isOutOfLine()
public Class<?> getHandlingClass()
public void setCategories(List<AtomCategory> categories)
categories
- public Object getHandlingInstance()
public javax.ws.rs.core.MultivaluedMap<String,String> getTemplateParameters()
public void setTemplateParameters(javax.ws.rs.core.MultivaluedMap<String,String> templateParams)
templateParams
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |