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

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

public class ResourceUseContext
extends java.lang.Object

ResourceUseContext is the class representation of the <useContext> element within a resource description.

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

Constructor Summary
ResourceUseContext(org.w3c.dom.Element element)
          Creates a new ResourceUseContext instance.
 
Method Summary
 java.util.List<java.lang.String> getLanguageContexts()
          Returns a list of all languages supported by this resource.
 java.util.List<java.lang.String> getOpRefs()
          Returns the operationRef described in this use context.
 ElementRef getRef()
          getRef returns the ElementRef value of the socket element this resource is bound to.
 Constants.ResourceRole getRole()
          getRole returns the role of this resource in describing its bound socket element.
 java.util.List<java.lang.String> getValueRefs()
          Returns a list of the value references for this resource.
 boolean hasUserPreferences(UserPreferences uprefs)
          hasUserPreferences returns true if the specified user preferences match the metadata associated with this resource.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceUseContext

public ResourceUseContext(org.w3c.dom.Element element)
                   throws UrcException
Creates a new ResourceUseContext instance.

Parameters:
element - a DOM Element element.
Throws:
UrcException - if the use context can't be created properly.
Method Detail

getLanguageContexts

public java.util.List<java.lang.String> getLanguageContexts()
Returns a list of all languages supported by this resource.

Returns:
a List<String> collection.

getOpRefs

public java.util.List<java.lang.String> getOpRefs()
Returns the operationRef described in this use context.

Returns:
a String value

getRef

public ElementRef getRef()
getRef returns the ElementRef value of the socket element this resource is bound to.

Returns:
a ElementRef object

getRole

public Constants.ResourceRole getRole()
getRole returns the role of this resource in describing its bound socket element.

Returns:
a String value

getValueRefs

public java.util.List<java.lang.String> getValueRefs()
Returns a list of the value references for this resource.

Returns:
a list of strings in the form List<String>

hasUserPreferences

public boolean hasUserPreferences(UserPreferences uprefs)
hasUserPreferences returns true if the specified user preferences match the metadata associated with this resource.

Parameters:
uprefs - an UserPreferences value
Returns:
a boolean value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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