org.jvoicexml
Interface Application

All Known Implementing Classes:
JVoiceXmlApplication

public interface Application

An Application is a set of documents sharing the same application root document.

Whenever the user interacts with a document in an application, its application root document is also loaded. The application root document remains loaded while the user is transitioning between other documents in the same application, and it is unloaded when the user transitions to a document that is not in the application. While it is loaded, the application root document's variables are available to the other documents as application variables, and its grammars remain active for the duration of the application.

Since:
0.4
Version:
$LastChangedRevision: 2493 $
Author:
Dirk Schnelle-Walka

Method Summary
 void addDocument(URI uri, VoiceXmlDocument doc)
          Adds the given document to the application.
 URI getApplication()
          Retrieves the URI of the application.
 VoiceXmlDocument getCurrentDocument()
          Retrieves the current document.
 URI getXmlBase()
          Retrieves the base URI.
 boolean isLoaded(URI uri)
          Checks, if the document with the given uri is loaded.
 URI resolve(URI uri)
          Converts the given URI into a hierarchical URI.
 URI resolve(URI baseUri, URI uri)
          Converts the given URI into a hierarchical URI.
 void setRootDocument(VoiceXmlDocument document)
          Sets the new root document.
 

Method Detail

addDocument

void addDocument(URI uri,
                 VoiceXmlDocument doc)
                 throws BadFetchError
Adds the given document to the application.

Parameters:
uri - the URI of the document.
doc - the document to add.
Throws:
BadFetchError - error in the document.
Since:
0.6

getCurrentDocument

VoiceXmlDocument getCurrentDocument()
Retrieves the current document.

Returns:
the current document.
Since:
0.6

getApplication

URI getApplication()
Retrieves the URI of the application.

Returns:
URI of the application.
Since:
0.6

setRootDocument

void setRootDocument(VoiceXmlDocument document)
                     throws BadFetchError
Sets the new root document.

Parameters:
document - the new root document.
Throws:
BadFetchError - error in the document.

isLoaded

boolean isLoaded(URI uri)
Checks, if the document with the given uri is loaded.

Parameters:
uri - the URI to check.
Returns:
true if the document is loaded.

getXmlBase

URI getXmlBase()
Retrieves the base URI.

Returns:
the base URI.

resolve

URI resolve(URI uri)
Converts the given URI into a hierarchical URI. If the given URI is a relative URI, it is expanded using the application URI.

Parameters:
uri - the URI to resolve.
Returns:
Hierarchical URI.

resolve

URI resolve(URI baseUri,
            URI uri)
Converts the given URI into a hierarchical URI. If the given URI is a relative URI, it is expanded using the baseUri.

Parameters:
baseUri - the base URI.
uri - the URI to resolve.
Returns:
Hierarchical URI.


Copyright © 2005-2010JVoiceXML group.