|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.DocumentFactory
public final class DocumentFactory
Deserializes the document.
Constructor Summary | |
---|---|
DocumentFactory()
Constructs the factory. |
Method Summary | |
---|---|
XMLAccess |
loadDocument(IPath resource)
Loads an XML from specified location and prepares it for editing. |
XMLAccess |
loadDocument(String url)
Loads an XML from specified location and prepares it for editing. |
XMLAccess |
loadDocument(URL url)
Loads an XML from specified location and prepares it for editing. |
XMLAccess |
newDocument(Document doc,
URLDir root,
String fileName)
Initializes an XMLAccess instance from given DOM document. |
XMLAccess |
newDocument(URLDir root,
String fileName)
Creates XMLAccess instance with empty document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentFactory()
Method Detail |
---|
public XMLAccess loadDocument(IPath resource) throws SAXException, IOException, DocumentException
Loads an XML from specified location and prepares it for editing. The steps that has to be taken (in this order) to load document properly:
These steps should be taken to load document properly:
XMLAccess
instance.XMLAccess.loadLocalSchema()
function.XMLAccess.loadGlobalSchemas()
to ensure that for
each namespace there is schema loaded.XMLAccess.validate()
to validate the document.
Selector
to select transformers for all
namespaces.XMLAccess.openView()
function.XMLAccess.getTransformedReader()
reader and display it.
resource
- the eclipse resource representing the xml file.
SAXException
- when error occurs during document deserialization
IOException
- when i/o error occurs
DocumentException
- when error occurs during document processingpublic XMLAccess loadDocument(String url) throws SAXException, IOException, DocumentException
url
- the URL address representing the location of the XML document.
SAXException
- when error occurs during document deserialization
IOException
- when i/o error occurs
DocumentException
- when error occurs during document processingpublic XMLAccess loadDocument(URL url) throws SAXException, IOException, DocumentException
url
- the URL address representing the location of the XML document.
SAXException
- when error occurs during document deserialization
IOException
- when i/o error occurs
DocumentException
- when error occurs during document processingpublic XMLAccess newDocument(Document doc, URLDir root, String fileName) throws DocumentException
XMLAccess
instance from given DOM document.
doc
- document to initialize.root
- URL pointing to the directory where the document is located.fileName
- the name of the document file, including the extension.
DocumentException
- when error occurs during document processingpublic XMLAccess newDocument(URLDir root, String fileName) throws DocumentException
XMLAccess
instance with empty document.
root
- URL pointing to the directory where the document is located.fileName
- the name of the document file, including the extension.
DocumentException
- when error occurs during document processing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |