public class ExternalReferenceGrammarDocument extends java.lang.Object implements GrammarDocument
| Constructor and Description |
|---|
ExternalReferenceGrammarDocument(java.net.URI source) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(GrammarDocument obj)
Checks if this grammar document is equal to the given grammar document.
|
boolean |
equals(java.lang.Object obj) |
byte[] |
getBuffer()
Retrieves the document's byte array.
|
java.lang.String |
getDocument()
Retrieves the document as a string.
|
org.jvoicexml.xml.srgs.GrammarType |
getMediaType()
Returns the declared media type of the grammar.
|
org.jvoicexml.xml.srgs.ModeType |
getModeType()
Returns the mode type of the grammar.
|
java.lang.String |
getTextContent()
Retrieves the document as a string.
|
java.net.URI |
getURI()
Retrieves the URI of the source grammar.
|
int |
hashCode() |
boolean |
isAscii()
Checks if the underlying document is an ASCII document.
|
boolean |
isCacheable()
Checks, if this grammar document can be cached or should be retrieved
anew.
|
void |
setMediaType(org.jvoicexml.xml.srgs.GrammarType gramamrType)
Sets the media type of this document.
|
void |
setModeType(org.jvoicexml.xml.srgs.ModeType modeType)
Sets the mode type.
|
void |
setURI(java.net.URI source)
Sets the URI of this grammar document.
|
java.lang.String |
toString() |
public ExternalReferenceGrammarDocument(java.net.URI source)
public boolean isCacheable()
isCacheable in interface GrammarDocumenttrue if this grammar document can be cached.public void setURI(java.net.URI source)
setURI in interface GrammarDocumentsource - the new URIpublic java.net.URI getURI()
getURI in interface GrammarDocumentpublic void setMediaType(org.jvoicexml.xml.srgs.GrammarType gramamrType)
setMediaType in interface GrammarDocumentgramamrType - the new media type.public org.jvoicexml.xml.srgs.GrammarType getMediaType()
getMediaType in interface GrammarDocumentpublic void setModeType(org.jvoicexml.xml.srgs.ModeType modeType)
setModeType in interface GrammarDocumentmodeType - the mode typepublic org.jvoicexml.xml.srgs.ModeType getModeType()
getModeType in interface GrammarDocumentpublic boolean isAscii()
isAscii in interface GrammarDocumenttrue if the document is an ASCII document.public java.lang.String getDocument()
getDocument in interface GrammarDocumentpublic java.lang.String getTextContent()
GrammarDocument.getDocument()
this method returns the text content of a node if it was loaded from a
Grammar node of a
VoiceXmlNode.getTextContent in interface GrammarDocumentpublic byte[] getBuffer()
GrammarDocument.isAscii() return false, otherwise the contents of
the string based buffer is returned via String.getBytes().getBuffer in interface GrammarDocumentpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean equals(GrammarDocument obj)
equals in interface GrammarDocumentobj - the grammar document to compare with.true if the grammar documents are equal.public java.lang.String toString()
toString in class java.lang.Object