org.inria.ns.reflex.processor
Class Bootstrap.PrimalCatalog

java.lang.Object
  extended by org.inria.ns.reflex.processor.Bootstrap.PrimalCatalog
All Implemented Interfaces:
Catalog, Localizable
Enclosing class:
Bootstrap

public static final class Bootstrap.PrimalCatalog
extends Object
implements Catalog

The PrimalCatalog is a hard-coded catalog that refers to all RefleX resources.

As this is a ready-to-use class, the engine doesn't have to unmarshal the catalog module during the bootstrap sequence ; thus, processes that don't use additional catalogs are ready faster than if the RefleX resources were defined in an XML catalog. Moreover, this catalog is backed by a hashmap for fast retrieval.

Author:
Philippe Poulard

Constructor Summary
Bootstrap.PrimalCatalog()
           
 
Method Summary
 XFile getLocation()
          This compiled catalog is not localized.
 boolean isLocalizable()
          Indicates that this instance is not localizable.
 Resource lookupResources(CatalogKey key)
          Looks for a resource.
 void setLocation(XFile location)
          This compiled catalog is not localized.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bootstrap.PrimalCatalog

public Bootstrap.PrimalCatalog()
Method Detail

lookupResources

public Resource lookupResources(CatalogKey key)
Looks for a resource.

Specified by:
lookupResources in interface Catalog
Parameters:
key - The key to retrieve.
Returns:
The resource.
See Also:
Catalog.lookupResources(CatalogKey)

getLocation

public XFile getLocation()
                  throws UnlocalizableException
This compiled catalog is not localized. It doesn't deliver relative alternate URIs.

Specified by:
getLocation in interface Localizable
Returns:
Nothing : throws an exception.
Throws:
UnlocalizableException - Always thrown.
See Also:
Localizable.getLocation()

setLocation

public void setLocation(XFile location)
                 throws UnlocalizableException
This compiled catalog is not localized. Setting a location is irrelevant.

Specified by:
setLocation in interface Localizable
Parameters:
location - The absolute URI of this component, as an XFile.
Throws:
UnlocalizableException - Always thrown.
See Also:
Localizable.setLocation(org.inria.ns.reflex.modules.io.XFile)

isLocalizable

public boolean isLocalizable()
Indicates that this instance is not localizable.

Specified by:
isLocalizable in interface Localizable
Returns:
false
See Also:
Localizable.isLocalizable()