|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.XMLAccess
public final class XMLAccess
Provides access to the document. Accessible from out of document package. Class is not intended to be instantiated by clients.
Field Summary | |
---|---|
String |
fileName
The name of the document file, including the extension, without the path specifier. |
URL |
fileURL
The name of the document file, including the extension and full path. |
Method Summary | |
---|---|
void |
checkNode(Node node)
Checks the node if it is from our document. |
void |
checkPtr(DomPointer ptr)
Checks the pointer if it points into our document. |
void |
closeView(DocumentView view)
Unregisters the view. |
Set<String> |
getAllNamespaces()
Deprecated. |
Document |
getDocument()
Access to the XML document. |
DocumentModifyHelper |
getDocumentModifyHelper()
Returns clients Helper for modifying. |
URL |
getDocumentURL()
Returns full URI address of the document. |
String |
getEncoding()
Returns encoding, in which the document is serialized. |
EntityManager |
getEntityManager()
Returns entity manager for this document. |
String |
getFileName()
Returns the name of the document file, including the extension, without the path specifier. |
IDManager |
getIDManager()
Returns IDManager instance for this document. |
DocumentListeners |
getListeners()
Returns document listeners manager for this document. |
DocumentModifier |
getModifier()
Returns document modifier, which is used to transparently modify the document. |
NamespaceManager |
getNsManager()
Returns namespace manager for this document. |
URLDir |
getRoot()
Returns URL pointing to the directory where the document is located. |
DocumentSchema |
getSchema()
Document's content modifier helper. |
DocumentFragment |
getSource(Node mark)
Returns the nametree from the original document, that the emp:mark element points to. |
SplittedDocChangeCollector |
getSplittedChanges()
Returns object that collects changes in the splitted document. |
SplittedDocHolder |
getSplittedDoc()
Returns DomToSplitted instance for this document. |
UndoManager |
getUndoManager()
Returns instance of the undo manager for this document. |
boolean |
isOurNode(Node node)
Checks the node if it is from our document. |
void |
loadGlobalSchemas()
Loads global schemas for all namespaces, present in the document, for which no local schema was loaded. |
void |
openView(DocumentView view)
Opens new view on the document. |
void |
saveDocument(OutputStream out,
String encoding,
boolean prettyFormatting)
Serializes in-memory document to specified output stream. |
void |
serialize(OutputStream out)
Serializes transformed document "as-is", no emp:id removal is performed. |
void |
validate()
Validates this document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final String fileName
public final URL fileURL
Method Detail |
---|
public final SplittedDocChangeCollector getSplittedChanges()
null
.public void checkNode(Node node)
node
- node to check.
IllegalArgumentException
- if node is not from bound documentpublic void checkPtr(DomPointer ptr)
ptr
- pointer to check.
IllegalArgumentException
- if pointer is not from bound documentpublic boolean isOurNode(Node node)
node
- node to check.
public IDManager getIDManager()
IDManager
instance for this document.
IDManager
for this document.public SplittedDocHolder getSplittedDoc()
DomToSplitted
instance for this document.
DomToSplitted
for this document.public DocumentFragment getSource(Node mark)
emp:mark
element points to.
mark
- the mark element, or null
.
null
is provided then root
fragment is returned.
IllegalArgumentException
- if the element is not
emp:mark
or the ID does not exist.public void openView(DocumentView view)
view
- the view to register.public void closeView(DocumentView view)
view
- the document view to close. Fails if the view was not opened
for this document.public UndoManager getUndoManager()
@Deprecated public Set<String> getAllNamespaces()
null
namespace (nor empty
namespace) does not occur in the returned set. Deprecated, use namespace
manager methods.public Document getDocument()
Access to the XML document. This document has this special feature: Every
element has ExportUtils.GENE_ID_ATTRIBUTE_QNAME
attribute,
denoting ID of that element.
public void validate() throws SchemaException
SchemaException
- if something goes wrong in the process of
validation.public DocumentModifier getModifier()
public void loadGlobalSchemas() throws SchemaException, IOException
SchemaException
- if error happens during loading of schemas.
IOException
- if i/o error occurspublic DocumentSchema getSchema()
public NamespaceManager getNsManager()
public EntityManager getEntityManager()
public void saveDocument(OutputStream out, String encoding, boolean prettyFormatting)
out
- stream, where to store saved xml.encoding
- the encoding. If null
, then UTF-8 is
used.prettyFormatting
- if output xml will be pretty-formatted - readable
by user. Warning: this adds some whitespaces to xml, thus modifying
result xml. User must be sure that these whitespaces are discardable.public String getEncoding()
null
if the encoding was not specified.
public void serialize(OutputStream out)
out
- the outputstream.public DocumentListeners getListeners()
public URL getDocumentURL()
public String getFileName()
public URLDir getRoot()
public DocumentModifyHelper getDocumentModifyHelper()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |