1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_rdf_XDocumentMetadataAccess_idl__
25cdf0e10cSrcweir#define __com_sun_star_rdf_XDocumentMetadataAccess_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
28cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_lang_WrappedTargetException_idl__
32cdf0e10cSrcweir#include <com/sun/star/lang/WrappedTargetException.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
36cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir#ifndef __com_sun_star_container_ElementExistException_idl__
40cdf0e10cSrcweir#include <com/sun/star/container/ElementExistException.idl>
41cdf0e10cSrcweir#endif
42cdf0e10cSrcweir
43cdf0e10cSrcweir#ifndef __com_sun_star_container_NoSuchElementException_idl__
44cdf0e10cSrcweir#include <com/sun/star/container/NoSuchElementException.idl>
45cdf0e10cSrcweir#endif
46cdf0e10cSrcweir
47cdf0e10cSrcweir#ifndef __com_sun_star_io_IOException_idl__
48cdf0e10cSrcweir#include <com/sun/star/io/IOException.idl>
49cdf0e10cSrcweir#endif
50cdf0e10cSrcweir
51cdf0e10cSrcweir#ifndef __com_sun_star_io_XInputStream_idl__
52cdf0e10cSrcweir#include <com/sun/star/io/XInputStream.idl>
53cdf0e10cSrcweir#endif
54cdf0e10cSrcweir
55cdf0e10cSrcweir#ifndef __com_sun_star_datatransfer_UnsupportedFlavorException_idl__
56cdf0e10cSrcweir#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl>
57cdf0e10cSrcweir#endif
58cdf0e10cSrcweir
59cdf0e10cSrcweir#ifndef __com_sun_star_embed_XStorage_idl__
60cdf0e10cSrcweir#include <com/sun/star/embed/XStorage.idl>
61cdf0e10cSrcweir#endif
62cdf0e10cSrcweir
63cdf0e10cSrcweir#ifndef __com_sun_star_task_XInteractionHandler_idl__
64cdf0e10cSrcweir#include <com/sun/star/task/XInteractionHandler.idl>
65cdf0e10cSrcweir#endif
66cdf0e10cSrcweir
67cdf0e10cSrcweir#ifndef __com_sun_star_rdf_FileFormat_idl__
68cdf0e10cSrcweir#include <com/sun/star/rdf/FileFormat.idl>
69cdf0e10cSrcweir#endif
70cdf0e10cSrcweir
71cdf0e10cSrcweir#ifndef __com_sun_star_rdf_ParseException_idl__
72cdf0e10cSrcweir#include <com/sun/star/rdf/ParseException.idl>
73cdf0e10cSrcweir#endif
74cdf0e10cSrcweir
75cdf0e10cSrcweir#ifndef __com_sun_star_rdf_XURI_idl__
76cdf0e10cSrcweir#include <com/sun/star/rdf/XURI.idl>
77cdf0e10cSrcweir#endif
78cdf0e10cSrcweir
79cdf0e10cSrcweir#ifndef __com_sun_star_rdf_XMetadatable_idl__
80cdf0e10cSrcweir#include <com/sun/star/rdf/XMetadatable.idl>
81cdf0e10cSrcweir#endif
82cdf0e10cSrcweir
83cdf0e10cSrcweir#ifndef __com_sun_star_rdf_XRepositorySupplier_idl__
84cdf0e10cSrcweir#include <com/sun/star/rdf/XRepositorySupplier.idl>
85cdf0e10cSrcweir#endif
86cdf0e10cSrcweir
87cdf0e10cSrcweir
88cdf0e10cSrcweir//=============================================================================
89cdf0e10cSrcweir
90cdf0e10cSrcweirmodule com {   module sun {   module star {   module rdf {
91cdf0e10cSrcweir
92cdf0e10cSrcweir//=============================================================================
93cdf0e10cSrcweir/** document metadata functionality related to the "manifest.rdf".
94cdf0e10cSrcweir
95cdf0e10cSrcweir    <p>
96cdf0e10cSrcweir    This interface contains some methods that create connections between
97cdf0e10cSrcweir    the content and the RDF metadata of an ODF document.
98cdf0e10cSrcweir    The main idea is to make querying and manipulating the
99cdf0e10cSrcweir    data in the metadata manifest easier.
100cdf0e10cSrcweir    </p>
101cdf0e10cSrcweir
102cdf0e10cSrcweir    <p>
103cdf0e10cSrcweir    Note that this interface inherits from <type>XURI</type>: the
104cdf0e10cSrcweir    base URI of the document is the string value of the RDF node.
105cdf0e10cSrcweir    This is so that you can easily make RDF statements about the document.
106cdf0e10cSrcweir    </p>
107cdf0e10cSrcweir
108*96af39f7SJürgen Schmidt    @since OpenOffice 3.2
109cdf0e10cSrcweir
110cdf0e10cSrcweir    @see XDocumentRepository
111cdf0e10cSrcweir */
112cdf0e10cSrcweirinterface XDocumentMetadataAccess
113cdf0e10cSrcweir{
114cdf0e10cSrcweir    interface XURI;
115cdf0e10cSrcweir    interface XRepositorySupplier;
116cdf0e10cSrcweir
117cdf0e10cSrcweir    //-------------------------------------------------------------------------
118cdf0e10cSrcweir    /** get the unique ODF element with the given metadata reference.
119cdf0e10cSrcweir
120cdf0e10cSrcweir        @param MetadataReference
121cdf0e10cSrcweir            a metadata reference, comprising the stream name and the XML ID
122cdf0e10cSrcweir            For example: Pair("content.xml", "foo-element-1")
123cdf0e10cSrcweir
124cdf0e10cSrcweir        @returns
125cdf0e10cSrcweir            the ODF element with the given metadata references if it exists,
126cdf0e10cSrcweir            else <NULL/>
127cdf0e10cSrcweir     */
128cdf0e10cSrcweir    XMetadatable getElementByMetadataReference(
129cdf0e10cSrcweir        [in] com::sun::star::beans::StringPair MetadataReference);
130cdf0e10cSrcweir
131cdf0e10cSrcweir    //-------------------------------------------------------------------------
132cdf0e10cSrcweir    /** get the ODF element that corresponds to an URI.
133cdf0e10cSrcweir
134cdf0e10cSrcweir        @param URI
135cdf0e10cSrcweir            an URI that may identify an ODF element
136cdf0e10cSrcweir
137cdf0e10cSrcweir        @returns
138cdf0e10cSrcweir            the ODF element that corresponds to the given URI, or <NULL/>
139cdf0e10cSrcweir
140cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
141cdf0e10cSrcweir            if the given URI is <NULL/>
142cdf0e10cSrcweir     */
143cdf0e10cSrcweir    XMetadatable getElementByURI([in] XURI URI)
144cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException );
145cdf0e10cSrcweir
146cdf0e10cSrcweir    //-------------------------------------------------------------------------
147cdf0e10cSrcweir    /** get the names of all metadata files with a given type.
148cdf0e10cSrcweir
149cdf0e10cSrcweir        @param Type
150cdf0e10cSrcweir            the <code>rdf:type</code> property of the requested named graphs
151cdf0e10cSrcweir
152cdf0e10cSrcweir        @returns
153cdf0e10cSrcweir            the names of all metadata graphs that have a <code>rdf:type</code>
154cdf0e10cSrcweir            property with the given Type as object
155cdf0e10cSrcweir
156cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
157cdf0e10cSrcweir            if the given Type is <NULL/>
158cdf0e10cSrcweir     */
159cdf0e10cSrcweir    sequence<XURI> getMetadataGraphsWithType([in] XURI Type)
160cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException );
161cdf0e10cSrcweir
162cdf0e10cSrcweir    //-------------------------------------------------------------------------
163cdf0e10cSrcweir    /** add a metadata file to the manifest.
164cdf0e10cSrcweir
165cdf0e10cSrcweir        <p>
166cdf0e10cSrcweir        This convenience method does the following:
167cdf0e10cSrcweir        <ul>
168cdf0e10cSrcweir        <li>create a new graph with the given name in the repository</li>
169cdf0e10cSrcweir        <li>insert statements declaring the new graph to be a
170cdf0e10cSrcweir            metadata file into the manifest graph</li>
171cdf0e10cSrcweir        <li>insert statements declaring <code>rdf:type</code> properties
172cdf0e10cSrcweir            for the new graph into the manifest graph</li>
173cdf0e10cSrcweir        </ul>
174cdf0e10cSrcweir        </p>
175cdf0e10cSrcweir
176cdf0e10cSrcweir        @param FileName
177cdf0e10cSrcweir            the name of the stream in the ODF storage where the graph will
178cdf0e10cSrcweir            be stored
179cdf0e10cSrcweir
180cdf0e10cSrcweir        @param Types
181cdf0e10cSrcweir            a list of types that will be inserted as <code>rdf:type</code>
182cdf0e10cSrcweir            properties for the graph
183cdf0e10cSrcweir
184cdf0e10cSrcweir        @returns
185cdf0e10cSrcweir            the name of the new graph
186cdf0e10cSrcweir
187cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
188cdf0e10cSrcweir            if the FileName is invalid
189cdf0e10cSrcweir
190cdf0e10cSrcweir        @throws com::sun::star::container::ElementExistException
191cdf0e10cSrcweir            if a stream with the given FileName already exists
192cdf0e10cSrcweir     */
193cdf0e10cSrcweir    XURI addMetadataFile([in] string FileName,
194cdf0e10cSrcweir            [in] sequence<XURI> Types )
195cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
196cdf0e10cSrcweir                com::sun::star::container::ElementExistException );
197cdf0e10cSrcweir
198cdf0e10cSrcweir    //-------------------------------------------------------------------------
199cdf0e10cSrcweir    /** import a metadata file into the document repository, and add it to the
200cdf0e10cSrcweir        manifest.
201cdf0e10cSrcweir
202cdf0e10cSrcweir        <p>
203cdf0e10cSrcweir        This convenience method does the following:
204cdf0e10cSrcweir        <li>import the given file into a graph with the given name
205cdf0e10cSrcweir            in the repository</li>
206cdf0e10cSrcweir        <li>insert statements declaring the new graph to be a
207cdf0e10cSrcweir            metadata file into the manifest graph</li>
208cdf0e10cSrcweir        <li>insert statements declaring <code>rdf:type</code> properties
209cdf0e10cSrcweir            for the new graph into the manifest graph</li>
210cdf0e10cSrcweir        </p>
211cdf0e10cSrcweir
212cdf0e10cSrcweir        @param FileName
213cdf0e10cSrcweir            the name of the stream in the ODF storage where the graph will
214cdf0e10cSrcweir            be stored
215cdf0e10cSrcweir
216cdf0e10cSrcweir        @param BaseURI
217cdf0e10cSrcweir            a base URI to resolve relative URI references
218cdf0e10cSrcweir
219cdf0e10cSrcweir        @param Types
220cdf0e10cSrcweir            a list of types that will be inserted as <code>rdf:type</code>
221cdf0e10cSrcweir            properties for the graph
222cdf0e10cSrcweir
223cdf0e10cSrcweir        @returns
224cdf0e10cSrcweir            the name of the new graph
225cdf0e10cSrcweir
226cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
227cdf0e10cSrcweir            if the given stream is <NULL/>,
228cdf0e10cSrcweir            or BaseURI is <NULL/> and the format requires use of a base URI,
229cdf0e10cSrcweir            or the FileName is invalid
230cdf0e10cSrcweir
231cdf0e10cSrcweir        @throws com::sun::star::datatransfer::UnsupportedFlavorException
232cdf0e10cSrcweir            if the format requested is unknown or not supported
233cdf0e10cSrcweir
234cdf0e10cSrcweir        @throws com::sun::star::container::ElementExistException
235cdf0e10cSrcweir            if a stream with the given FileName already exists
236cdf0e10cSrcweir
237cdf0e10cSrcweir        @throws ParseException
238cdf0e10cSrcweir            if the input does not conform to the specified file format.
239cdf0e10cSrcweir
240cdf0e10cSrcweir        @throws com::sun::star::io::IOException
241cdf0e10cSrcweir            if an I/O error occurs.
242cdf0e10cSrcweir
243cdf0e10cSrcweir        @see FileFormat
244cdf0e10cSrcweir     */
245cdf0e10cSrcweir    XURI importMetadataFile( [in] /*FileFormat*/ short Format,
246cdf0e10cSrcweir            [in] com::sun::star::io::XInputStream InStream,
247cdf0e10cSrcweir            [in] string FileName, [in] XURI BaseURI,
248cdf0e10cSrcweir            [in] sequence<XURI> Types )
249cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
250cdf0e10cSrcweir                com::sun::star::datatransfer::UnsupportedFlavorException,
251cdf0e10cSrcweir                com::sun::star::container::ElementExistException,
252cdf0e10cSrcweir                ParseException,
253cdf0e10cSrcweir                com::sun::star::io::IOException );
254cdf0e10cSrcweir
255cdf0e10cSrcweir    //-------------------------------------------------------------------------
256cdf0e10cSrcweir    /** remove a metadata file from the manifest and the repository.
257cdf0e10cSrcweir
258cdf0e10cSrcweir        <p>
259cdf0e10cSrcweir        This convenience method does the following:
260cdf0e10cSrcweir        <li>delete the graph with the given GraphName in the repository</li>
261cdf0e10cSrcweir        <li>remove the statements declaring the graph to be a
262cdf0e10cSrcweir            metadata file from the manifest graph</li>
263cdf0e10cSrcweir        </p>
264cdf0e10cSrcweir
265cdf0e10cSrcweir        @param GraphName
266cdf0e10cSrcweir            the name of the graph that is to be removed
267cdf0e10cSrcweir
268cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
269cdf0e10cSrcweir            if the given GraphName is <NULL/>
270cdf0e10cSrcweir
271cdf0e10cSrcweir        @throws com::sun::star::container::NoSuchElementException
272cdf0e10cSrcweir            if a graph with the given GraphName does not exist
273cdf0e10cSrcweir     */
274cdf0e10cSrcweir    void removeMetadataFile([in] XURI GraphName)
275cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
276cdf0e10cSrcweir                com::sun::star::container::NoSuchElementException );
277cdf0e10cSrcweir
278cdf0e10cSrcweir    //-------------------------------------------------------------------------
279cdf0e10cSrcweir    /** add a content or styles file to the manifest.
280cdf0e10cSrcweir
281cdf0e10cSrcweir        <p>
282cdf0e10cSrcweir        This convenience method adds the required statements declaring a
283cdf0e10cSrcweir        content or styles file to the manifest graph.
284cdf0e10cSrcweir        <ul>
285cdf0e10cSrcweir        <li>If the FileName ends in "content.xml",
286cdf0e10cSrcweir            an <code>odf:ContentFile</code> is added.</li>
287cdf0e10cSrcweir        <li>If the FileName ends in "styles.xml" ,
288cdf0e10cSrcweir            an <code>odf:StylesFile</code>  is added.</li>
289cdf0e10cSrcweir        <li>Other FileNames are invalid.</li>
290cdf0e10cSrcweir        </ul>
291cdf0e10cSrcweir        </p>
292cdf0e10cSrcweir
293cdf0e10cSrcweir        @param FileName
294cdf0e10cSrcweir            the name of the stream in the ODF storage
295cdf0e10cSrcweir
296cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
297cdf0e10cSrcweir            if the FileName is invalid
298cdf0e10cSrcweir
299cdf0e10cSrcweir        @throws com::sun::star::container::ElementExistException
300cdf0e10cSrcweir            if a stream with the given FileName already exists
301cdf0e10cSrcweir     */
302cdf0e10cSrcweir    void addContentOrStylesFile([in] string FileName)
303cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
304cdf0e10cSrcweir                com::sun::star::container::ElementExistException );
305cdf0e10cSrcweir
306cdf0e10cSrcweir    //-------------------------------------------------------------------------
307cdf0e10cSrcweir    /** remove a content or styles file from the manifest.
308cdf0e10cSrcweir
309cdf0e10cSrcweir        <p>
310cdf0e10cSrcweir        This convenience method removes the statements declaring a
311cdf0e10cSrcweir        content or styles file from the manifest graph.
312cdf0e10cSrcweir        </p>
313cdf0e10cSrcweir
314cdf0e10cSrcweir        @param FileName
315cdf0e10cSrcweir            the name of the stream in the ODF storage
316cdf0e10cSrcweir
317cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
318cdf0e10cSrcweir            if the FileName is invalid
319cdf0e10cSrcweir
320cdf0e10cSrcweir        @throws com::sun::star::container::NoSuchElementException
321cdf0e10cSrcweir            if a graph with the given GraphName does not exist
322cdf0e10cSrcweir     */
323cdf0e10cSrcweir    void removeContentOrStylesFile([in] string FileName)
324cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
325cdf0e10cSrcweir                com::sun::star::container::NoSuchElementException );
326cdf0e10cSrcweir
327cdf0e10cSrcweir    //-------------------------------------------------------------------------
328cdf0e10cSrcweir    /** initialize document metadata from a storage.
329cdf0e10cSrcweir
330cdf0e10cSrcweir        <p>
331cdf0e10cSrcweir        This method re-initializes the document metadata,
332cdf0e10cSrcweir        loads the stream named "manifest.rdf" from the storage, and then
333cdf0e10cSrcweir        loads all metadata streams mentioned in the manifest.
334cdf0e10cSrcweir        </p>
335cdf0e10cSrcweir
336cdf0e10cSrcweir        <p>
337cdf0e10cSrcweir        Note that it is not an error if the storage does not contain
338cdf0e10cSrcweir        a manifest.
339cdf0e10cSrcweir        In this case, the document metadata will be default initialized.
340cdf0e10cSrcweir        </p>
341cdf0e10cSrcweir
342cdf0e10cSrcweir        <p>
343cdf0e10cSrcweir        If an InteractionHandler argument is given, it will be used for
344cdf0e10cSrcweir        error reporting. Otherwise, errors will be reported as exceptions.
345cdf0e10cSrcweir        </p>
346cdf0e10cSrcweir
347cdf0e10cSrcweir        @param Storage
348cdf0e10cSrcweir            a storage, representing e.g. an ODF package file, or sub-document
349cdf0e10cSrcweir
350cdf0e10cSrcweir        @param BaseURI
351cdf0e10cSrcweir            a base URI to resolve relative URI references
352cdf0e10cSrcweir            <p>N.B.: when loading from an ODF package, the base URI is not the
353cdf0e10cSrcweir               URI of the package, but the URI of the directory in the package
354cdf0e10cSrcweir               that contains the metadata.rdf</p>
355cdf0e10cSrcweir
356cdf0e10cSrcweir        @param InteractionHandler
357cdf0e10cSrcweir            an InteractionHandler, used for error reporting
358cdf0e10cSrcweir
359cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
360cdf0e10cSrcweir            if any argument is <NULL/>
361cdf0e10cSrcweir
362cdf0e10cSrcweir        @throws com::sun::star::lang::WrappedTargetException
363cdf0e10cSrcweir            if an error occurs while loading and no InteractionHandler given
364cdf0e10cSrcweir     */
365cdf0e10cSrcweir    void loadMetadataFromStorage(
366cdf0e10cSrcweir            [in] com::sun::star::embed::XStorage Storage,
367cdf0e10cSrcweir            [in] XURI BaseURI,
368cdf0e10cSrcweir            [in] com::sun::star::task::XInteractionHandler InteractionHandler )
369cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
370cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException );
371cdf0e10cSrcweir
372cdf0e10cSrcweir    //-------------------------------------------------------------------------
373cdf0e10cSrcweir    /** store document metadata to a storage.
374cdf0e10cSrcweir
375cdf0e10cSrcweir        <p>
376cdf0e10cSrcweir        This method stores all the graphs in the document metadata repository
377cdf0e10cSrcweir        to the given storage.
378cdf0e10cSrcweir        </p>
379cdf0e10cSrcweir
380cdf0e10cSrcweir        <p>
381cdf0e10cSrcweir        Note that to be stored correctly, a named graph must have a complete
382cdf0e10cSrcweir        entry in the manifest graph.
383cdf0e10cSrcweir        </p>
384cdf0e10cSrcweir
385cdf0e10cSrcweir        @param Storage
386cdf0e10cSrcweir            a storage, representing e.g. an ODF package file, or sub-document
387cdf0e10cSrcweir
388cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
389cdf0e10cSrcweir            if Storage argument is <NULL/>
390cdf0e10cSrcweir
391cdf0e10cSrcweir        @throws com::sun::star::lang::WrappedTargetException
392cdf0e10cSrcweir            if an error occurs while loading
393cdf0e10cSrcweir     */
394cdf0e10cSrcweir    void storeMetadataToStorage(
395cdf0e10cSrcweir            [in] com::sun::star::embed::XStorage Storage )
396cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
397cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException );
398cdf0e10cSrcweir
399cdf0e10cSrcweir    //-------------------------------------------------------------------------
400cdf0e10cSrcweir    /** loads document metadata from a medium.
401cdf0e10cSrcweir
402cdf0e10cSrcweir        <p>If the Medium contains an InteractionHandler, it will be used for
403cdf0e10cSrcweir        error reporting.</p>
404cdf0e10cSrcweir
405cdf0e10cSrcweir        @param Medium
406cdf0e10cSrcweir            the <type>com::sun::star::document::MediaDescriptor</type>
407cdf0e10cSrcweir            representing the source
408cdf0e10cSrcweir
409cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
410cdf0e10cSrcweir            if the argument does not contain a URL or Stream property
411cdf0e10cSrcweir
412cdf0e10cSrcweir        @throws com::sun::star::lang::WrappedTargetException
413cdf0e10cSrcweir            if an error occurs while loading
414cdf0e10cSrcweir
415cdf0e10cSrcweir        @see com::sun::star::document::MediaDescriptor
416cdf0e10cSrcweir     */
417cdf0e10cSrcweir    void loadMetadataFromMedium(
418cdf0e10cSrcweir            [in] sequence < com::sun::star::beans::PropertyValue > Medium )
419cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
420cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException );
421cdf0e10cSrcweir
422cdf0e10cSrcweir    //-------------------------------------------------------------------------
423cdf0e10cSrcweir    /** stores document metadata to a medium.
424cdf0e10cSrcweir
425cdf0e10cSrcweir        @param Medium
426cdf0e10cSrcweir            the <type>com::sun::star::document::MediaDescriptor</type>
427cdf0e10cSrcweir            representing the target
428cdf0e10cSrcweir
429cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
430cdf0e10cSrcweir            if the argument does not contain a URL or Stream property
431cdf0e10cSrcweir
432cdf0e10cSrcweir        @throws com::sun::star::lang::WrappedTargetException
433cdf0e10cSrcweir            if an error occurs while storing
434cdf0e10cSrcweir
435cdf0e10cSrcweir        @see com::sun::star::document::MediaDescriptor
436cdf0e10cSrcweir     */
437cdf0e10cSrcweir    void storeMetadataToMedium(
438cdf0e10cSrcweir            [in] sequence < com::sun::star::beans::PropertyValue > Medium )
439cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
440cdf0e10cSrcweir                com::sun::star::lang::WrappedTargetException );
441cdf0e10cSrcweir
442cdf0e10cSrcweir};
443cdf0e10cSrcweir
444cdf0e10cSrcweir//=============================================================================
445cdf0e10cSrcweir
446cdf0e10cSrcweir}; }; }; };
447cdf0e10cSrcweir
448cdf0e10cSrcweir#endif
449