org.w3c.tools.offline.browse
Class ResourceLister

java.lang.Object
  extended by org.w3c.tools.offline.browse.ResourceLister

public class ResourceLister
extends java.lang.Object

The resource lister class. It acts on resources independently, and perform action on resources and frames as isolated entities.


Field Summary
protected static org.apache.oro.text.regex.Perl5Compiler pcompiler
           
protected static org.apache.oro.text.regex.Perl5Matcher pmatcher
           
protected static org.apache.oro.text.perl.Perl5Util putil
           
protected static org.apache.oro.text.regex.Pattern srPattern
          the search and replace pattern.
 
Constructor Summary
ResourceLister()
          The resource lister initializer.
 
Method Summary
 java.lang.String attributeToString(Attribute ad, java.lang.Object value)
          Format into an attribute=value string.
 AttributeHolder[] getFramesFromHolder(AttributeHolder ah)
          Get frames of an attribute holder.
 java.lang.String getIdentFromHolder(AttributeHolder ah)
          Search for identifier in an attribute holder.
 java.lang.Integer getKeyFromHolder(AttributeHolder ah)
          Search for key value in an attribute holder.
 java.lang.String getRepositoryFromHolder(AttributeHolder ah)
          Search for repository in an attribute holder.
 void performAction(java.lang.String action, AttributeHolder ah, int deep)
          Perform an action on an attribute holder.
 void performActionOnFrames(java.lang.String action, AttributeHolder ah, int deep)
          Perform an action on frames of an attribute holder.
 void printAttributeHolder(AttributeHolder ah)
          Print all attributes of an AttributeHolder.
 void printFrames(AttributeHolder ah)
          Print the frames associated to a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pmatcher

protected static org.apache.oro.text.regex.Perl5Matcher pmatcher

pcompiler

protected static org.apache.oro.text.regex.Perl5Compiler pcompiler

putil

protected static org.apache.oro.text.perl.Perl5Util putil

srPattern

protected static org.apache.oro.text.regex.Pattern srPattern
the search and replace pattern.

Constructor Detail

ResourceLister

public ResourceLister()
The resource lister initializer.

Method Detail

printAttributeHolder

public void printAttributeHolder(AttributeHolder ah)
Print all attributes of an AttributeHolder.

Parameters:
ah - an AttributeHolder.

attributeToString

public java.lang.String attributeToString(Attribute ad,
                                          java.lang.Object value)
Format into an attribute=value string.

Parameters:
ad - an Attribute
value - its value.
Returns:
the attribute=value string.

printFrames

public void printFrames(AttributeHolder ah)
Print the frames associated to a resource.

Parameters:
ah - an AttributeHolder

getKeyFromHolder

public java.lang.Integer getKeyFromHolder(AttributeHolder ah)
Search for key value in an attribute holder.

Parameters:
ah - the AttributeHolder
Returns:
the key value or null if not found.

getIdentFromHolder

public java.lang.String getIdentFromHolder(AttributeHolder ah)
Search for identifier in an attribute holder.

Parameters:
ah - the AttributeHolder
Returns:
the identifier.

getRepositoryFromHolder

public java.lang.String getRepositoryFromHolder(AttributeHolder ah)
Search for repository in an attribute holder.

Parameters:
ah - the AttributeHolder
Returns:
the repository name.

getFramesFromHolder

public AttributeHolder[] getFramesFromHolder(AttributeHolder ah)
Get frames of an attribute holder.

Parameters:
ah - the AttributeHolder
Returns:
an array with frames.

performActionOnFrames

public void performActionOnFrames(java.lang.String action,
                                  AttributeHolder ah,
                                  int deep)
Perform an action on frames of an attribute holder.

Parameters:
action - the action to perform
ah - the AttributeHolder
int - the resource depth wrt the entire action target.

performAction

public void performAction(java.lang.String action,
                          AttributeHolder ah,
                          int deep)
Perform an action on an attribute holder.

Parameters:
action - the action to perform
ah - the AttributeHolder
int - the resource depth wrt the entire action target.