org.restlet.ext.wadl
Class GrammarsInfo

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

public class GrammarsInfo
extends DocumentedInfo

Describes the grammars used by representation descriptions. This is especially useful to formally describe XML representations using XML Schema or Relax NG standards.

Author:
Jerome Louvel

Constructor Summary
GrammarsInfo()
          Constructor.
GrammarsInfo(DocumentationInfo documentation)
          Constructor with a single documentation element.
GrammarsInfo(java.util.List<DocumentationInfo> documentations)
          Constructor with a list of documentation elements.
GrammarsInfo(java.lang.String documentation)
          Constructor with a single documentation element.
 
Method Summary
 java.util.List<IncludeInfo> getIncludes()
          Returns the list of include elements.
 void setIncludes(java.util.List<IncludeInfo> includes)
          Sets the list of include 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

GrammarsInfo

public GrammarsInfo()
Constructor.


GrammarsInfo

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

Parameters:
documentation - A single documentation element.

GrammarsInfo

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

Parameters:
documentations - The list of documentation elements.

GrammarsInfo

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

Parameters:
documentation - A single documentation element.
Method Detail

getIncludes

public java.util.List<IncludeInfo> getIncludes()
Returns the list of include elements.

Returns:
The list of include elements.

setIncludes

public void setIncludes(java.util.List<IncludeInfo> includes)
Sets the list of include elements.

Parameters:
includes - The list of include 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.