org.restlet.ext.wadl
Class ResourceInfo

java.lang.Object
  extended by org.restlet.ext.wadl.DocumentedInfo
      extended by org.restlet.ext.wadl.ResourceInfo

public class ResourceInfo
extends DocumentedInfo

Describes a class of closely related resources.

Author:
Jerome Louvel

Constructor Summary
ResourceInfo()
          Constructor.
ResourceInfo(DocumentationInfo documentation)
          Constructor with a single documentation element.
ResourceInfo(java.util.List<DocumentationInfo> documentations)
          Constructor with a list of documentation elements.
ResourceInfo(java.lang.String documentation)
          Constructor with a single documentation element.
 
Method Summary
 java.util.List<ResourceInfo> getChildResources()
          Returns the list of child resources.
 java.lang.String getIdentifier()
          Returns the identifier for that element.
 java.util.List<MethodInfo> getMethods()
          Returns the list of supported methods.
 java.util.List<ParameterInfo> getParameters()
          Returns the list of parameters.
 java.lang.String getPath()
          Returns the URI template for the identifier of the resource.
 MediaType getQueryType()
          Returns the media type for the query component of the resource URI.
 java.util.List<Reference> getType()
          Returns the list of references to resource type elements.
 void setChildResources(java.util.List<ResourceInfo> resources)
          Sets the list of child resources.
 void setIdentifier(java.lang.String identifier)
          Sets the identifier for that element.
 void setMethods(java.util.List<MethodInfo> methods)
          Sets the list of supported methods.
 void setParameters(java.util.List<ParameterInfo> parameters)
          Sets the list of parameters.
 void setPath(java.lang.String path)
          Sets the URI template for the identifier of the resource.
 void setQueryType(MediaType queryType)
          Sets the media type for the query component of the resource URI.
 void setType(java.util.List<Reference> type)
          Sets the list of references to resource type elements.
 void updateNamespaces(java.util.Map<java.lang.String,java.lang.String> namespaces)
          Completes the given map of namespaces with the namespaces used in the documentation elements.
 void writeElement(XmlWriter writer)
          Writes the current object as an XML element using the given SAX writer.
 
Methods inherited from class org.restlet.ext.wadl.DocumentedInfo
getDocumentations, resolveNamespaces, setDocumentation, setDocumentation, setDocumentations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceInfo

public ResourceInfo()
Constructor.


ResourceInfo

public ResourceInfo(DocumentationInfo documentation)
Constructor with a single documentation element.

Parameters:
documentation - A single documentation element.

ResourceInfo

public ResourceInfo(java.util.List<DocumentationInfo> documentations)
Constructor with a list of documentation elements.

Parameters:
documentations - The list of documentation elements.

ResourceInfo

public ResourceInfo(java.lang.String documentation)
Constructor with a single documentation element.

Parameters:
documentation - A single documentation element.
Method Detail

getChildResources

public java.util.List<ResourceInfo> getChildResources()
Returns the list of child resources.

Returns:
The list of child resources.

getIdentifier

public java.lang.String getIdentifier()
Returns the identifier for that element.

Returns:
The identifier for that element.

getMethods

public java.util.List<MethodInfo> getMethods()
Returns the list of supported methods.

Returns:
The list of supported methods.

getParameters

public java.util.List<ParameterInfo> getParameters()
Returns the list of parameters.

Returns:
The list of parameters.

getPath

public java.lang.String getPath()
Returns the URI template for the identifier of the resource.

Returns:
The URI template for the identifier of the resource.

getQueryType

public MediaType getQueryType()
Returns the media type for the query component of the resource URI.

Returns:
The media type for the query component of the resource URI.

getType

public java.util.List<Reference> getType()
Returns the list of references to resource type elements.

Returns:
The list of references to resource type elements.

setChildResources

public void setChildResources(java.util.List<ResourceInfo> resources)
Sets the list of child resources.

Parameters:
resources - The list of child resources.

setIdentifier

public void setIdentifier(java.lang.String identifier)
Sets the identifier for that element.

Parameters:
identifier - The identifier for that element.

setMethods

public void setMethods(java.util.List<MethodInfo> methods)
Sets the list of supported methods.

Parameters:
methods - The list of supported methods.

setParameters

public void setParameters(java.util.List<ParameterInfo> parameters)
Sets the list of parameters.

Parameters:
parameters - The list of parameters.

setPath

public void setPath(java.lang.String path)
Sets the URI template for the identifier of the resource.

Parameters:
path - The URI template for the identifier of the resource.

setQueryType

public void setQueryType(MediaType queryType)
Sets the media type for the query component of the resource URI.

Parameters:
queryType - The media type for the query component of the resource URI.

setType

public void setType(java.util.List<Reference> type)
Sets the list of references to resource type elements.

Parameters:
type - The list of references to resource type elements.

updateNamespaces

public void updateNamespaces(java.util.Map<java.lang.String,java.lang.String> namespaces)
Description copied from class: DocumentedInfo
Completes the given map of namespaces with the namespaces used in the documentation elements. The key is the URI of the namespace and the value, the prefix.

Specified by:
updateNamespaces in class DocumentedInfo
Parameters:
namespaces - The given map of namespaces to complete.

writeElement

public void writeElement(XmlWriter writer)
                  throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
Throws:
org.xml.sax.SAXException


Copyright © 2005-2008 Noelios Technologies.