org.restlet.ext.wadl
Class RepresentationInfo

java.lang.Object
  extended by org.restlet.ext.wadl.DocumentedInfo
      extended by org.restlet.ext.wadl.RepresentationInfo
Direct Known Subclasses:
FaultInfo

public class RepresentationInfo
extends DocumentedInfo

Describres a variant representation for a target resource.

Author:
Jerome Louvel

Constructor Summary
RepresentationInfo()
          Constructor.
RepresentationInfo(DocumentationInfo documentation)
          Constructor with a single documentation element.
RepresentationInfo(java.util.List<DocumentationInfo> documentations)
          Constructor with a list of documentation elements.
RepresentationInfo(MediaType mediaType)
          Constructor with a media type.
RepresentationInfo(java.lang.String documentation)
          Constructor with a single documentation element.
RepresentationInfo(Variant variant)
          Constructor with a variant.
 
Method Summary
 java.lang.String getIdentifier()
          Returns the identifier for that element.
 MediaType getMediaType()
          Returns the media type of that element.
 java.util.List<ParameterInfo> getParameters()
          Returns the list of parameters.
 java.util.List<Reference> getProfiles()
          Returns the list of locations of one or more meta data profiles.
 java.util.List<Status> getStatuses()
          Returns the list of statuses associated with this response representation.
 java.lang.String getXmlElement()
          Returns the qualified name of the root element for this XML-based representation.
 void setIdentifier(java.lang.String identifier)
          Sets the identifier for that element.
 void setMediaType(MediaType mediaType)
          Sets the media type of that element.
 void setParameters(java.util.List<ParameterInfo> parameters)
          Sets the list of parameters.
 void setProfiles(java.util.List<Reference> profiles)
          Sets the list of locations of one or more meta data profiles.
 void setStatuses(java.util.List<Status> statuses)
          Sets the list of statuses associated with this response representation.
 void setXmlElement(java.lang.String xmlElement)
          Sets the qualified name of the root element for this XML-based representation.
 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

RepresentationInfo

public RepresentationInfo()
Constructor.


RepresentationInfo

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

Parameters:
documentation - A single documentation element.

RepresentationInfo

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

Parameters:
documentations - The list of documentation elements.

RepresentationInfo

public RepresentationInfo(MediaType mediaType)
Constructor with a media type.

Parameters:
mediaType - The media type of the representation.

RepresentationInfo

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

Parameters:
documentation - A single documentation element.

RepresentationInfo

public RepresentationInfo(Variant variant)
Constructor with a variant.

Parameters:
variant - The variant to describe.
Method Detail

getIdentifier

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

Returns:
The identifier for that element.

getMediaType

public MediaType getMediaType()
Returns the media type of that element.

Returns:
The media type of that element.

getParameters

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

Returns:
The list of parameters.

getProfiles

public java.util.List<Reference> getProfiles()
Returns the list of locations of one or more meta data profiles.

Returns:
The list of locations of one or more meta data profiles.

getStatuses

public java.util.List<Status> getStatuses()
Returns the list of statuses associated with this response representation.

Returns:
The list of statuses associated with this response representation.

getXmlElement

public java.lang.String getXmlElement()
Returns the qualified name of the root element for this XML-based representation.

Returns:
The qualified name of the root element for this XML-based representation.

setIdentifier

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

Parameters:
identifier - The identifier for that element.

setMediaType

public void setMediaType(MediaType mediaType)
Sets the media type of that element.

Parameters:
mediaType - The media type of that element.

setParameters

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

Parameters:
parameters - The list of parameters.

setProfiles

public void setProfiles(java.util.List<Reference> profiles)
Sets the list of locations of one or more meta data profiles.

Parameters:
profiles - The list of locations of one or more meta data profiles.

setStatuses

public void setStatuses(java.util.List<Status> statuses)
Sets the list of statuses associated with this response representation.

Parameters:
statuses - The list of statuses associated with this response representation.

setXmlElement

public void setXmlElement(java.lang.String xmlElement)
Sets the qualified name of the root element for this XML-based representation.

Parameters:
xmlElement - The qualified name of the root element for this XML-based representation.

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.