|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.wisc.trace.urcsdk.client.resources.AbstractResource
public abstract class AbstractResource
AbstractResource is the abstract implementation of
IResource that all of the SDK resource types extend from.
It provides the common functionality that all resources require and
would be tedious to re-implement for every resource type.
| Field Summary | |
|---|---|
protected ElementRef |
elementRef
|
protected java.lang.String |
operationRef
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
properties
|
protected java.lang.Object |
value
|
protected java.lang.String |
valueRef
|
| Fields inherited from interface edu.wisc.trace.urcsdk.client.resources.IResource |
|---|
EMPTY_RESOURCE |
| Constructor Summary | |
|---|---|
AbstractResource()
|
|
AbstractResource(java.lang.Object value,
ElementRef elementRef,
java.lang.String valueRef,
java.lang.String operationRef,
Constants.ResourceRole role,
java.util.List<java.lang.String> langs)
Creates a new instance of AbtractResource. |
|
| Method Summary | |
|---|---|
void |
addProperty(java.lang.String name,
java.util.List<java.lang.Object> list)
Adds a property to this Resource. |
void |
addProperty(java.lang.String name,
java.lang.Object value)
Adds a property to this Resource. |
boolean |
equals(IResource r)
Returns true if this and the given Resource are the same. |
ElementRef |
getElementRef()
|
java.lang.String |
getFormat()
Return the DCMI format property of resource (MIME type). |
java.util.List<java.lang.String> |
getLangs()
Returns a List of language contexts. |
java.lang.String |
getOperationRef()
|
java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
getPropertiesMap()
Returns a Map of properties for this resource. |
java.lang.Object |
getProperty(java.lang.String property)
Returns the value of the property with the given name. |
Constants.ResourceRole |
getRole()
Returns the role associated with this Resource |
Constants.ResourceType |
getType()
Returns the type of the resource. |
java.lang.Object |
getValue()
Returns the value of this Resource |
java.lang.String |
getValueRef()
|
abstract java.lang.String |
toString()
String representation of this Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Object value
protected java.util.Map<java.lang.String,java.util.List<java.lang.Object>> properties
protected ElementRef elementRef
protected java.lang.String valueRef
protected java.lang.String operationRef
| Constructor Detail |
|---|
public AbstractResource()
public AbstractResource(java.lang.Object value,
ElementRef elementRef,
java.lang.String valueRef,
java.lang.String operationRef,
Constants.ResourceRole role,
java.util.List<java.lang.String> langs)
AbtractResource.
value - The value of the resource.elementRef - The element reference of the resource.valueRef - The value reference of the resource.operationRef - The operation reference of the resource.role - The role of the resource.langs - A List of languages contexts.| Method Detail |
|---|
public void addProperty(java.lang.String name,
java.lang.Object value)
Resource.
name - The name of the new Property.value - The value of the new Property.
public void addProperty(java.lang.String name,
java.util.List<java.lang.Object> list)
Resource.
name - The name of the property.list - A List of values for this property.public java.lang.Object getValue()
IResourceResource
getValue in interface IResourceIResource.getValue()public java.lang.String getFormat()
IResource
getFormat in interface IResourceIResource.getFormat()public Constants.ResourceType getType()
getType in interface IResourceIResource.getType()public ElementRef getElementRef()
getElementRef in interface IResourceIResource.getElementRef()public java.lang.String getValueRef()
getValueRef in interface IResourceIResource.getValueRef()public java.lang.String getOperationRef()
getOperationRef in interface IResourceString representing the operator reference for the socket element for this resource.public java.util.List<java.lang.String> getLangs()
List of language contexts.
getLangs in interface IResourceList of languages for this Resourcepublic Constants.ResourceRole getRole()
Resource
getRole in interface IResourceResourceRole for this Resourcepublic boolean equals(IResource r)
equals in interface IResourcepublic java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getPropertiesMap()
Map of properties for this resource.
getPropertiesMap in interface IResourceMap of Properties of this Resourcepublic java.lang.Object getProperty(java.lang.String property)
getProperty in interface IResourceproperty - The property for which the value is needed
public abstract java.lang.String toString()
IResource
toString in interface IResourcetoString in class java.lang.ObjectString value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||