Class w3c.jigsaw.indexer.IndexerResource
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.indexer.IndexerResource

java.lang.Object
   |
   +----w3c.jigsaw.resources.AttributeHolder
           |
           +----w3c.jigsaw.resources.Resource
                   |
                   +----w3c.jigsaw.indexer.IndexerResource

public class IndexerResource
extends Resource
implements ResourceShadower
Indexer resource have some shared properties. This class implements an Indexer Resource, wich hav the following properties:

Variable Index

 o ATTR_CLASS
Attribute index - The class for this directory.
 o target_attributes
The set of attributes for our target class.
 o target_values
The default attribute values we hold for to be created reosurces.

Constructor Index

 o IndexerResource()

Method Index

 o definesTargetAttribute(int)
ResourceShadower implementation - Do we shadow this attribute.
 o definesTargetAttribute(String)
ResourceShadower implementation - Do we shadow this attribute.
 o getDefaultTargetClass()
Get the default target class.
 o getTargetAttributes()
Get our target class attributes.
 o getTargetClass()
Get the target class for this directory.
 o getTargetResource()
ResourceShadower implementation - Get our target resource.
 o getTargetValue(int, Object)
ResourceShadower implementation - Get target default attribute value.
 o getTargetValue(String, Object)
ResourceShadower implementation - Get a shadowed attribute value
 o initialize(Object[])
Initialize a resource indexer instance.
 o pickle(DataOutputStream)
Pickling an Extension is a little tricky.
 o setTargetValue(int, Object)
ResourceShadower implementation - Set target default attribute value.
 o setTargetValue(String, Object)
ResourceShadower implementation - Set target default attribute value.
 o unpickleInstance(DataInputStream, Hashtable)
Unpickle myself.

Variables

 o ATTR_CLASS
  protected static int ATTR_CLASS
Attribute index - The class for this directory.
 o target_attributes
  protected Attribute target_attributes[]
The set of attributes for our target class.
 o target_values
  protected Object target_values[]
The default attribute values we hold for to be created reosurces.

Constructors

 o IndexerResource
  public IndexerResource()

Methods

 o getTargetClass
  public Class getTargetClass()
Get the target class for this directory.
 o getDefaultTargetClass
  public abstract Class getDefaultTargetClass()
Get the default target class.
 o getTargetResource
  public Resource getTargetResource()
ResourceShadower implementation - Get our target resource. We don't really have a target resource here.
 o getTargetAttributes
  public Attribute[] getTargetAttributes()
Get our target class attributes.
 o getTargetValue
  public Object getTargetValue(int idx,
                               Object def)
ResourceShadower implementation - Get target default attribute value.
Parameters:
idx - The name of the target attribute we want a value for.
def - The default value (if we don't define it ourselve).
Returns:
Our proposed target attribute value, or the default provided value if we don't define it.
 o getTargetValue
  public Object getTargetValue(String name,
                               Object def)
ResourceShadower implementation - Get a shadowed attribute value
Parameters:
name - The name of the attribute.
def - The default value to return if undef.
Returns:
The attribute value or the provided default value.
 o setTargetValue
  public void setTargetValue(String name,
                             Object def)
ResourceShadower implementation - Set target default attribute value.
Parameters:
name - The name of the attribute to set.
value - Its Object value.
 o setTargetValue
  public void setTargetValue(int idx,
                             Object def)
ResourceShadower implementation - Set target default attribute value.
Parameters:
idx - The index of the attribute to set.
value - Its new Object value.
 o definesTargetAttribute
  public boolean definesTargetAttribute(int idx)
ResourceShadower implementation - Do we shadow this attribute.
Parameters:
idx - The index of the target attribute.
Returns:
A boolean true
 o definesTargetAttribute
  public boolean definesTargetAttribute(String name)
ResourceShadower implementation - Do we shadow this attribute.
Parameters:
name - The name of the target attribute.
Returns:
A boolean true
 o pickle
  public void pickle(DataOutputStream out) throws IOException
Pickling an Extension is a little tricky.
Parameters:
out - The output stream to picle to.
Overrides:
pickle in class AttributeHolder
 o unpickleInstance
  public AttributeHolder unpickleInstance(DataInputStream in,
                                          Hashtable defs) throws IOException
Unpickle myself.
Parameters:
in - The input stream to unpickle from.
defs - The proposed set of default attributes.
Overrides:
unpickleInstance in class AttributeHolder
 o initialize
  public void initialize(Object values[])
Initialize a resource indexer instance.
Parameters:
values - The proposed default attribute values.
Overrides:
initialize in class AttributeHolder

All Packages  Class Hierarchy  This Package  Previous  Next  Index