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:
- They optionnaly handle a class (to be instanciated)
- They provide a default set of attributes for their non-existing target.
-
ATTR_CLASS
- Attribute index - The class for this directory.
-
target_attributes
- The set of attributes for our target class.
-
target_values
- The default attribute values we hold for to be created reosurces.
-
IndexerResource()
-
-
definesTargetAttribute(int)
- ResourceShadower implementation - Do we shadow this attribute.
-
definesTargetAttribute(String)
- ResourceShadower implementation - Do we shadow this attribute.
-
getDefaultTargetClass()
- Get the default target class.
-
getTargetAttributes()
- Get our target class attributes.
-
getTargetClass()
- Get the target class for this directory.
-
getTargetResource()
- ResourceShadower implementation - Get our target resource.
-
getTargetValue(int, Object)
- ResourceShadower implementation - Get target default attribute value.
-
getTargetValue(String, Object)
- ResourceShadower implementation - Get a shadowed attribute value
-
initialize(Object[])
- Initialize a resource indexer instance.
-
pickle(DataOutputStream)
- Pickling an Extension is a little tricky.
-
setTargetValue(int, Object)
- ResourceShadower implementation - Set target default attribute value.
-
setTargetValue(String, Object)
- ResourceShadower implementation - Set target default attribute value.
-
unpickleInstance(DataInputStream, Hashtable)
- Unpickle myself.
ATTR_CLASS
protected static int ATTR_CLASS
- Attribute index - The class for this directory.
target_attributes
protected Attribute target_attributes[]
- The set of attributes for our target class.
target_values
protected Object target_values[]
- The default attribute values we hold for to be created reosurces.
IndexerResource
public IndexerResource()
getTargetClass
public Class getTargetClass()
- Get the target class for this directory.
getDefaultTargetClass
public abstract Class getDefaultTargetClass()
- Get the default target class.
getTargetResource
public Resource getTargetResource()
- ResourceShadower implementation - Get our target resource.
We don't really have a target resource here.
getTargetAttributes
public Attribute[] getTargetAttributes()
- Get our target class attributes.
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.
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.
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.
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.
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
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
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
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
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