|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.mwi.mobileok.basic.ResourceContext
public class ResourceContext
The ResourceType class is an extensible enumeration of the types of resources that may be handled by the Checker.
The base list defines:
Primary
: the initial resourceStylesheet
: a stylesheet associated with the initial
resource. Note the notion of stylesheet may include styles defined inlineImage
: a resource declared in tthat needs to be retrieved to render
the initial resource. In the case of mobileOK, matches the definition of an
Included Resource.Linked
: a resource that is linked to by the initial resource.
In the case of mobileOK, matches the definition of a
Linked Resource.The enumeration is implemented using a quasi-type-safe enumeration pattern. Anyone may derive the class and define new values, but that still needs to be done explicitely. Any code that uses the ResourceType enumeration should thus expect unknown values.
The reason why the enumeration is left extensible is that one may want to handle more types of resource, e.g. scripts.
Field Summary | |
---|---|
static ResourceContext |
Image
An Included image resource. |
static ResourceContext |
Linked
A Linked resource. |
private java.lang.String |
mokiName
Name of the moki node that should be associated with the context. |
static ResourceContext |
Object
An Included object resource. |
static ResourceContext |
Primary
The initial resource that has been retrieved. |
private int |
sortOrder
Sort order to sort collections of resources. |
static ResourceContext |
Stylesheet
A stylesheet resource. |
Constructor Summary | |
---|---|
protected |
ResourceContext(java.lang.String mokiName,
int sortOrder)
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
getMokiName()
Returns the name to use to represent the context within a moki representation of the containing resource. |
int |
getSortOrder()
Returns the sort order to use to sort collections of resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String mokiName
private final int sortOrder
public static ResourceContext Primary
public static ResourceContext Stylesheet
public static ResourceContext Image
public static ResourceContext Object
public static ResourceContext Linked
Constructor Detail |
---|
protected ResourceContext(java.lang.String mokiName, int sortOrder)
Defined as protected
so that it may only be used within
derived classes.
mokiName
- Name of the moki node that should be associated with
the contextMethod Detail |
---|
public final java.lang.String getMokiName()
public final int getSortOrder()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |