

The method attachResource() does not force reloading of the document. The XModel offers a method attachResource() that changes the media descriptor of the document, but this method should only be used in special cases, for example, by the implementer of a new document model and controller. The separation of the URL and the other arguments is used, because the URL is often the most wanted part for its performance optimized access. If a model is loaded or stored successfully, all parts of the media descriptor not explicitly excluded according to the media descriptor table in section MediaDescriptor must be provided by the methods getURL() and getArgs() in the .XModel interface. class, xDocument ) // Determine suitable HTML filter name for export. String sFilter = null // Detect document type by asking XServiceInfoĬom. Normally this filter should be searched inside the filter // configuration (using service .FilterFactory) // but here we use well known filter names directly. Conditions: sURL = "file:///home/target.htm" // xDocument = m_xLoadedDocument // Export can be achieved by saving the document and using // a special filter which can write the desired format. The following example exports a Writer document, Writer/Web document or Calc sheet to HTML. The method storeAsURL sets the Modified attribute of the document, accessible through its .XModifiable interface, to false and updates the internal media descriptor of the document with the parameters passed in the call. The storeToURL() method saves the current document to the desired location without touching the internal state of the document. The other two methods storeAsURL() and storeToURL() leave the original file untouched and differ after the storing procedure. Calling this method on a document that was created from scratch using a private:factory/. The method store() overwrites an existing file. The latter two methods are called with a media descriptor. The XStorable offers the methods store(), storeAsURL() and storeToURL() for storing.

sequence lArguments ) boolean hasLocation ( ) string getLocation ( ) boolean isReadonly ( ) sequence lArguments ) void storeToURL ( string sURL, Void store ( ) void storeAsURL ( string sURL,
