edu.wisc.trace.urcsdk.client.resources
Class ResourceDirectory

java.lang.Object
  extended by edu.wisc.trace.urcsdk.client.resources.ResourceDirectory

public class ResourceDirectory
extends java.lang.Object

ResourceDirectory is the programmatic version of the XML <ResourceDirectory> element. It provides access to the collection of resource sheets and child resource directories.

Version:
$Revision: 1.21 $
Author:
Andrew Martin, Trace R&D Center Created on: Sep 2, 2004

Constructor Summary
ResourceDirectory()
          Creates a new ResourceDirectory instance.
ResourceDirectory(TargetDirectory parent, org.w3c.dom.Element rootElement)
          Creates a new ResourceDirectory instance.
 
Method Summary
 boolean addResourceSheet(ResourceSheet rs)
          Adds a ResourceSheet to the resource directory.
 java.net.URI getBaseURI()
          Returns the base URI of the resource directory.
 java.util.List<ResourceDirectory> getResourceDirectories()
          Returns a List of the resource directories.
 ResourceServiceDescription getResourceServiceDescription()
          Returns the resource service description associated with this ResourceDirectory
 java.util.List<ResourceSheet> getResourceSheets()
          Returns the resource sheets in this resource directory.
 java.util.List<UiidDescription> getUIIDDescriptions()
          Returns the list of UIID descriptions in this resource directory.
 void parse()
          Parses the XML to create the resource directory.
 void parseMatchingResourceSheets(java.util.List<java.lang.String> parsedRSKeys, java.util.Map<java.lang.String,java.util.List<IResource>> resourceMap, java.lang.String rsKey, java.lang.String domain, java.lang.String language, java.lang.String format, java.lang.String role, java.lang.String type)
          Iterate through ResourceSheets contained within this ResourceDirectory and parse any that do no explicitly define a hard key different than the ones specified.
 java.lang.String toString()
          The String representation of this ResourceDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceDirectory

public ResourceDirectory()
Creates a new ResourceDirectory instance.


ResourceDirectory

public ResourceDirectory(TargetDirectory parent,
                         org.w3c.dom.Element rootElement)
                  throws UrcException
Creates a new ResourceDirectory instance.

Parameters:
parent - a TargetPropertiesSheet value
rootElement - an Element value
Throws:
UrcException - if an error occurs
Method Detail

addResourceSheet

public boolean addResourceSheet(ResourceSheet rs)
Adds a ResourceSheet to the resource directory.

Parameters:
rs - a ResourceSheet value
Returns:
a boolean value

getBaseURI

public java.net.URI getBaseURI()
Returns the base URI of the resource directory.

Returns:
an URI value

getResourceDirectories

public java.util.List<ResourceDirectory> getResourceDirectories()
Returns a List of the resource directories.

Returns:
a List of ResourceDirectory objects

getResourceServiceDescription

public ResourceServiceDescription getResourceServiceDescription()
Returns the resource service description associated with this ResourceDirectory

Returns:
a ResourceServiceDescription value

getResourceSheets

public java.util.List<ResourceSheet> getResourceSheets()
Returns the resource sheets in this resource directory.

Returns:
a List of ResourceSheet objects.

getUIIDDescriptions

public java.util.List<UiidDescription> getUIIDDescriptions()
Returns the list of UIID descriptions in this resource directory.

Returns:
a List of UiidDescription objects

parse

public void parse()
           throws UrcException
Parses the XML to create the resource directory.

Throws:
UrcException - if an error occurs

toString

public java.lang.String toString()
The String representation of this ResourceDirectory

Overrides:
toString in class java.lang.Object
Returns:
a String value

parseMatchingResourceSheets

public void parseMatchingResourceSheets(java.util.List<java.lang.String> parsedRSKeys,
                                        java.util.Map<java.lang.String,java.util.List<IResource>> resourceMap,
                                        java.lang.String rsKey,
                                        java.lang.String domain,
                                        java.lang.String language,
                                        java.lang.String format,
                                        java.lang.String role,
                                        java.lang.String type)
Iterate through ResourceSheets contained within this ResourceDirectory and parse any that do no explicitly define a hard key different than the ones specified.

Parameters:
domain -
type -
role -
format -
language -


Copyright © 2006 Trace R&D Center, University of Wisconsin-Madison. All Rights Reserved.