org.w3c.mwi.mobileok.basic
Class ResourceContext

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.ResourceContext

public class ResourceContext
extends java.lang.Object

The ResourceType class is an extensible enumeration of the types of resources that may be handled by the Checker.

The base list defines:

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.

Version:
$Revision: 1.1 $
Author:
Francois Daoust

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

mokiName

private final java.lang.String mokiName
Name of the moki node that should be associated with the context.


sortOrder

private final int sortOrder
Sort order to sort collections of resources.


Primary

public static ResourceContext Primary
The initial resource that has been retrieved.


Stylesheet

public static ResourceContext Stylesheet
A stylesheet resource.


Image

public static ResourceContext Image
An Included image resource.


Object

public static ResourceContext Object
An Included object resource.


Linked

public static ResourceContext Linked
A Linked resource.

Constructor Detail

ResourceContext

protected ResourceContext(java.lang.String mokiName,
                          int sortOrder)
Default constructor.

Defined as protected so that it may only be used within derived classes.

Parameters:
mokiName - Name of the moki node that should be associated with the context
Method Detail

getMokiName

public final java.lang.String getMokiName()
Returns the name to use to represent the context within a moki representation of the containing resource.

Returns:
the moki name that should be used to create the node that is to contain the moki representation of the resource in the end.

getSortOrder

public final int getSortOrder()
Returns the sort order to use to sort collections of resources.

Returns:
sort order