org.apache.wink.common.model.app
Class AppCategories

java.lang.Object
  extended by org.apache.wink.common.model.app.AppCategories

public class AppCategories
extends java.lang.Object

The "app:categories" Element Per RFC5023

 The "app:categories" Element
 
    The root of a Category Document is the "app:categories" element.  An
    app:categories element can contain zero or more atom:category
    elements from the Atom Syndication Format [RFC4287] namespace
    ("http://www.w3.org/2005/Atom").
 
    An atom:category child element that has no "scheme" attribute
    inherits the attribute from its app:categories parent.  An atom:
    category child element with an existing "scheme" attribute does not
    inherit the "scheme" value of its app:categories parent element.
 
    atomCategory =
        element atom:category {
           atomCommonAttributes,
           attribute term { text },
           attribute scheme { atomURI }?,
           attribute label { text }?,
           undefinedContent
        }
 
    appInlineCategories =
        element app:categories {
            attribute fixed { "yes" | "no" }?,
            attribute scheme { atomURI }?,
            (atomCategory*,
            undefinedContent)
        }
 
    appOutOfLineCategories =
        element app:categories {
            attribute href { atomURI },
            undefinedContent
        }
 
    appCategories = appInlineCategories | appOutOfLineCategories
 
 o Attributes of "app:categories"
 
    The app:categories element can contain a "fixed" attribute, with a
    value of either "yes" or "no", indicating whether the list of
    categories is a fixed or an open set.  The absence of the "fixed"
    attribute is equivalent to the presence of a "fixed" attribute with a
    value of "no".
 
    Alternatively, the app:categories element MAY contain an "href"
    attribute, whose value MUST be an IRI reference identifying a
    Category Document.  If the "href" attribute is provided, the app:
    categories element MUST be empty and MUST NOT have the "fixed" or
    "scheme" attributes.
 


Field Summary
protected  java.util.List<AtomCategory> category
           
protected  AppYesNo fixed
           
protected  java.lang.String href
           
protected  java.lang.String scheme
           
 
Constructor Summary
AppCategories()
           
 
Method Summary
 void checkValidity()
           
 java.util.List<AtomCategory> getCategory()
          Gets the value of the category property.
 AppYesNo getFixed()
          Gets the value of the fixed property.
 java.lang.String getHref()
          Gets the value of the href property.
static javax.xml.bind.Marshaller getMarshaller()
           
 java.lang.String getScheme()
          Gets the value of the scheme property.
static javax.xml.bind.Unmarshaller getUnmarshaller()
           
 boolean isFixedSet()
           
 boolean isInline()
           
 void setFixed(AppYesNo value)
          Sets the value of the fixed property.
 void setHref(java.lang.String value)
          Sets the value of the href property.
 void setScheme(java.lang.String value)
          Sets the value of the scheme property.
static AppCategories unmarshal(java.io.Reader reader)
          Convenience method for creating an AppCategories from xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

category

protected java.util.List<AtomCategory> category

fixed

protected AppYesNo fixed

scheme

protected java.lang.String scheme

href

protected java.lang.String href
Constructor Detail

AppCategories

public AppCategories()
Method Detail

getMarshaller

public static javax.xml.bind.Marshaller getMarshaller()

getUnmarshaller

public static javax.xml.bind.Unmarshaller getUnmarshaller()

unmarshal

public static AppCategories unmarshal(java.io.Reader reader)
Convenience method for creating an AppCategories from xml

Parameters:
reader - input reader
Returns:
AppCategories instance from the input

getCategory

public java.util.List<AtomCategory> getCategory()
Gets the value of the category property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the category property.

For example, to add a new item, do as follows:

 getCategory().add(newItem);
 

Objects of the following type(s) are allowed in the list AtomCategory


getFixed

public AppYesNo getFixed()
Gets the value of the fixed property.

Returns:
possible object is AppYesNo

setFixed

public void setFixed(AppYesNo value)
Sets the value of the fixed property.

Parameters:
value - allowed object is AppYesNo

isFixedSet

public boolean isFixedSet()

getScheme

public java.lang.String getScheme()
Gets the value of the scheme property.

Returns:
possible object is String

setScheme

public void setScheme(java.lang.String value)
Sets the value of the scheme property.

Parameters:
value - allowed object is String

getHref

public java.lang.String getHref()
Gets the value of the href property.

Returns:
possible object is String

setHref

public void setHref(java.lang.String value)
Sets the value of the href property.

Parameters:
value - allowed object is String

isInline

public boolean isInline()

checkValidity

public void checkValidity()


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.