org.jvoicexml.interpreter
Class JVoiceXmlApplication

java.lang.Object
  extended by org.jvoicexml.interpreter.JVoiceXmlApplication
All Implemented Interfaces:
Application

public final class JVoiceXmlApplication
extends Object
implements Application

Implementation of the Application.

Since:
0.5.5
Version:
$Revision: 2129 $
Author:
Dirk Schnelle-Walka
See Also:
Application

Constructor Summary
JVoiceXmlApplication(ScopeObserver scopeObserver)
          Creates a new object.
 
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 base, URI uri)
          Converts the given URI into a hierarchical URI.
 void setRootDocument(VoiceXmlDocument document)
          Sets the new root document.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JVoiceXmlApplication

public JVoiceXmlApplication(ScopeObserver scopeObserver)
Creates a new object.

Parameters:
scopeObserver - the scope observer.
Method Detail

addDocument

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

Specified by:
addDocument in interface Application
Parameters:
uri - the URI of the document.
doc - the document to add.
Throws:
BadFetchError - error in the document.

setRootDocument

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

Specified by:
setRootDocument in interface Application
Parameters:
document - the new root document.
Throws:
BadFetchError - error in the document.

getApplication

public URI getApplication()
Retrieves the URI of the application.

Specified by:
getApplication in interface Application
Returns:
URI of the application.

getXmlBase

public URI getXmlBase()
Retrieves the base URI.

Specified by:
getXmlBase in interface Application
Returns:
the base URI.

getCurrentDocument

public VoiceXmlDocument getCurrentDocument()
Retrieves the current document.

Specified by:
getCurrentDocument in interface Application
Returns:
the current document.

resolve

public 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.

Specified by:
resolve in interface Application
Parameters:
uri - the URI to resolve.
Returns:
Hierarchical URI.

resolve

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

Specified by:
resolve in interface Application
Parameters:
base - the base URI.
uri - the URI to resolve.
Returns:
Hierarchical URI.

isLoaded

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

Specified by:
isLoaded in interface Application
Parameters:
uri - the URI to check.
Returns:
true if the document is loaded.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2005-2010JVoiceXML group.