|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfi.hut.tml.xsmiles.XSmilesXMLDocument
The XMLdocument is an object that can retrieve and parse a XML document when given the URL of the document as an argument in the constructor. The document can then be accessed through the DOM-interface that it provides. The document also saves the original source of the document, so that the source can be given to any component that is interested of it (for example the SourceViewMLFC)
| Field Summary | |
protected ECMAScripter |
currentScripter
|
protected java.lang.String |
currentStylesheetTitle
|
protected org.w3c.dom.Document |
destXMLDoc
|
protected BrowserWindow |
m_browser
|
protected XSLTEngine |
m_engine
|
protected XLink |
m_link
|
protected XMLParser |
m_parser
|
protected java.io.InputStream |
m_stream
|
protected MLFC |
mlfc
|
protected java.lang.String |
parserClass
|
protected java.lang.String |
preferredTitle
|
protected org.w3c.dom.Document |
sourceXMLDoc
|
protected java.net.URL |
sourceXMLURL
|
protected java.util.Vector |
stylesheetTitles
|
protected boolean |
trueDocument
|
protected org.w3c.dom.Document |
XSLDoc
|
protected java.lang.String |
xslProcessor
|
protected java.net.URL |
XSLURL
|
| Fields inherited from interface fi.hut.tml.xsmiles.mlfc.general.MediaQueryEvaluator |
MEDIA_TYPES |
| Constructor Summary | |
XSmilesXMLDocument(BrowserWindow browser,
org.w3c.dom.Document doc)
Another alternative constructor |
|
XSmilesXMLDocument(BrowserWindow browser,
java.io.InputStream stream)
This constructor is used for the docs gotten via sockets etc. |
|
XSmilesXMLDocument(BrowserWindow browser,
java.io.InputStream stream,
XLink link)
This constructor is used by the Browser when it requests a new XMLdocument. |
|
XSmilesXMLDocument(BrowserWindow browser,
java.lang.String s)
An alternative constructor, where the source can be given as a string. |
|
XSmilesXMLDocument(BrowserWindow browser,
XLink link)
This constructor is used by the Browser when it requests a new XMLdocument. |
|
| Method Summary | |
void |
acquireToken()
Used for locking/unlocking the document for mutex-reasons. |
protected org.w3c.dom.Document |
createDomFromString(java.lang.String source)
|
void |
deactivate()
|
boolean |
evalMediaQuery(java.lang.String media)
Public method accessible from MLFCs and used above in findXSL(). |
protected org.w3c.dom.Document |
fetchAndSetDOM(java.net.URL sourceURL)
This method is alternative for fetchXMLDOM(). |
protected org.w3c.dom.Document |
fetchXMLDOM(java.io.InputStream stream)
|
protected org.w3c.dom.Document |
fetchXMLDOM(java.io.InputStream stream,
java.net.URL sourceURL)
|
protected org.w3c.dom.Document |
fetchXMLDOM(java.net.URL sourceURL)
|
protected XSmilesPI |
findXSL(org.w3c.dom.Document doc)
This method gets the first processing instruction from doc, which contains the target 'xml-stylesheet'. |
static java.lang.String |
getAttribute(java.lang.String data,
java.lang.String att)
return an xml attribute from a data String |
BrowserWindow |
getBrowser()
|
java.lang.String |
getCurrentStylesheetTitle()
If the current stylesheet does not exist, then "" is returned. |
org.w3c.dom.Document |
getDocument()
Accessor method. |
ECMAScripter |
getECMAScripter()
|
XLink |
getLink()
Accessor method. |
java.lang.String |
getMLName()
Accessor method. |
java.util.Enumeration |
getSourceEnumeration()
Accessor method. |
java.lang.String |
getSourceText(org.w3c.dom.Document doc)
Accessor method. |
java.lang.String |
getSourceText(org.w3c.dom.Document doc,
boolean prettyPrinting)
|
java.util.Vector |
getSourceVector()
Accessor method. |
java.util.Vector |
getStylesheetTitles()
|
org.w3c.dom.Document |
getXMLDocument()
Accessor method. |
java.net.URL |
getXMLURL()
Accessor method |
java.util.Vector |
getXMLVector()
Accessor method. |
org.w3c.dom.Document |
getXSLDocument()
Accessor method. |
java.net.URL |
getXSLURL()
Accessor method |
java.util.Vector |
getXSLVector()
Accessor method. |
void |
init(BrowserWindow browser)
|
void |
init(BrowserWindow browser,
java.lang.String s)
|
org.w3c.dom.Document |
insertSourceIntoEditor(org.w3c.dom.Document d,
XSmilesPI pi)
|
boolean |
isTrueDocument()
|
protected org.w3c.dom.Document |
processStyleSheet(org.w3c.dom.Document xml_dom,
java.net.URL xsl_url,
java.net.URL xml_url)
|
void |
releaseToken()
Used for locking/unlocking the document for mutex-reasons. |
void |
retrieveDocument()
This is the method that performs all the actual work of the XMLDocument. |
void |
setPreferredStylesheetTitle(java.lang.String title)
|
protected java.util.Vector |
sourceStringToVector(java.lang.String sourcestring)
|
void |
transformDocument()
Just transform existing document again |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected MLFC mlfc
protected XLink m_link
protected java.io.InputStream m_stream
protected XMLParser m_parser
protected XSLTEngine m_engine
protected BrowserWindow m_browser
protected java.net.URL XSLURL
protected java.net.URL sourceXMLURL
protected java.lang.String currentStylesheetTitle
protected java.lang.String preferredTitle
protected org.w3c.dom.Document sourceXMLDoc
protected org.w3c.dom.Document XSLDoc
protected org.w3c.dom.Document destXMLDoc
protected java.lang.String xslProcessor
protected java.lang.String parserClass
protected java.util.Vector stylesheetTitles
protected boolean trueDocument
protected ECMAScripter currentScripter
| Constructor Detail |
public XSmilesXMLDocument(BrowserWindow browser,
XLink link)
public XSmilesXMLDocument(BrowserWindow browser,
java.io.InputStream stream)
public XSmilesXMLDocument(BrowserWindow browser,
java.io.InputStream stream,
XLink link)
public XSmilesXMLDocument(BrowserWindow browser,
java.lang.String s)
public XSmilesXMLDocument(BrowserWindow browser,
org.w3c.dom.Document doc)
browser - The BrowserWindowdoc - The Document| Method Detail |
public void init(BrowserWindow browser)
public void init(BrowserWindow browser,
java.lang.String s)
public void retrieveDocument()
throws java.lang.Exception
retrieveDocument in interface XMLDocumentjava.lang.Exception
public void transformDocument()
throws java.lang.Exception
TransformerException, - if something went wrong.
java.lang.Exception
public org.w3c.dom.Document insertSourceIntoEditor(org.w3c.dom.Document d,
XSmilesPI pi)
pi - The processing instruction, which has been chosen to be used.public boolean isTrueDocument()
protected org.w3c.dom.Document fetchAndSetDOM(java.net.URL sourceURL)
throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document fetchXMLDOM(java.net.URL sourceURL)
throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document fetchXMLDOM(java.io.InputStream stream,
java.net.URL sourceURL)
throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document fetchXMLDOM(java.io.InputStream stream)
throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document processStyleSheet(org.w3c.dom.Document xml_dom,
java.net.URL xsl_url,
java.net.URL xml_url)
throws java.lang.Exception
java.lang.Exception
protected XSmilesPI findXSL(org.w3c.dom.Document doc)
throws java.lang.Exception
java.lang.Exceptionpublic boolean evalMediaQuery(java.lang.String media)
evalMediaQuery in interface XMLDocumentmedia - Media attribute string
public static java.lang.String getAttribute(java.lang.String data,
java.lang.String att)
data - The datastringatt - The attribute to look for
public java.util.Vector getStylesheetTitles()
getStylesheetTitles in interface XMLDocumentpublic java.lang.String getCurrentStylesheetTitle()
XMLDocument
getCurrentStylesheetTitle in interface XMLDocumentprotected java.util.Vector sourceStringToVector(java.lang.String sourcestring)
protected org.w3c.dom.Document createDomFromString(java.lang.String source)
public org.w3c.dom.Document getDocument()
getDocument in interface XMLDocumentpublic org.w3c.dom.Document getXMLDocument()
getXMLDocument in interface XMLDocumentpublic org.w3c.dom.Document getXSLDocument()
getXSLDocument in interface XMLDocumentpublic java.lang.String getMLName()
public void acquireToken()
public void releaseToken()
public java.lang.String getSourceText(org.w3c.dom.Document doc)
public java.lang.String getSourceText(org.w3c.dom.Document doc,
boolean prettyPrinting)
getSourceText in interface XMLDocumentdoc - the dom to convertprettyPrinting - prettyprinting
public java.util.Enumeration getSourceEnumeration()
public java.util.Vector getSourceVector()
getSourceVector in interface XMLDocumentpublic java.util.Vector getXMLVector()
getXMLVector in interface XMLDocumentpublic java.util.Vector getXSLVector()
getXSLVector in interface XMLDocumentpublic XLink getLink()
getLink in interface XMLDocumentpublic java.net.URL getXMLURL()
getXMLURL in interface XMLDocumentpublic java.net.URL getXSLURL()
getXSLURL in interface XMLDocumentpublic ECMAScripter getECMAScripter()
getECMAScripter in interface XMLDocumentpublic void setPreferredStylesheetTitle(java.lang.String title)
setPreferredStylesheetTitle in interface XMLDocumenttitle - Sets the preferred stylesheet title.public void deactivate()
deactivate in interface XMLDocumentpublic BrowserWindow getBrowser()
getBrowser in interface XMLDocument
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||