Types )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::datatransfer::UnsupportedFlavorException,
com::sun::star::container::ElementExistException,
ParseException,
com::sun::star::io::IOException );
/** remove a metadata file from the manifest and the repository.
This convenience method does the following:
- delete the graph with the given GraphName in the repository
- remove the statements declaring the graph to be a
metadata file from the manifest graph
@param GraphName
the name of the graph that is to be removed
@throws com::sun::star::lang::IllegalArgumentException
if the given GraphName is `NULL`
@throws com::sun::star::container::NoSuchElementException
if a graph with the given GraphName does not exist
*/
void removeMetadataFile([in] XURI GraphName)
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::container::NoSuchElementException );
/** add a content or styles file to the manifest.
This convenience method adds the required statements declaring a
content or styles file to the manifest graph.
- If the FileName ends in "content.xml",
an
odf:ContentFile is added.
- If the FileName ends in "styles.xml" ,
an
odf:StylesFile is added.
- Other FileNames are invalid.
@param FileName
the name of the stream in the ODF storage
@throws com::sun::star::lang::IllegalArgumentException
if the FileName is invalid
@throws com::sun::star::container::ElementExistException
if a stream with the given FileName already exists
*/
void addContentOrStylesFile([in] string FileName)
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::container::ElementExistException );
/** remove a content or styles file from the manifest.
This convenience method removes the statements declaring a
content or styles file from the manifest graph.
@param FileName
the name of the stream in the ODF storage
@throws com::sun::star::lang::IllegalArgumentException
if the FileName is invalid
@throws com::sun::star::container::NoSuchElementException
if a graph with the given GraphName does not exist
*/
void removeContentOrStylesFile([in] string FileName)
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::container::NoSuchElementException );
/** initialize document metadata from a storage.
This method re-initializes the document metadata,
loads the stream named "manifest.rdf" from the storage, and then
loads all metadata streams mentioned in the manifest.
Note that it is not an error if the storage does not contain
a manifest.
In this case, the document metadata will be default initialized.
If an InteractionHandler argument is given, it will be used for
error reporting. Otherwise, errors will be reported as exceptions.
@param Storage
a storage, representing e.g. an ODF package file, or sub-document
@param BaseURI
a base URI to resolve relative URI references
N.B.: when loading from an ODF package, the base URI is not the
URI of the package, but the URI of the directory in the package
that contains the metadata.rdf
@param InteractionHandler
an InteractionHandler, used for error reporting
@throws com::sun::star::lang::IllegalArgumentException
if any argument is `NULL`
@throws com::sun::star::lang::WrappedTargetException
if an error occurs while loading and no InteractionHandler given
*/
void loadMetadataFromStorage(
[in] com::sun::star::embed::XStorage Storage,
[in] XURI BaseURI,
[in] com::sun::star::task::XInteractionHandler InteractionHandler )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::lang::WrappedTargetException );
/** store document metadata to a storage.
This method stores all the graphs in the document metadata repository
to the given storage.
Note that to be stored correctly, a named graph must have a complete
entry in the manifest graph.
@param Storage
a storage, representing e.g. an ODF package file, or sub-document
@throws com::sun::star::lang::IllegalArgumentException
if Storage argument is `NULL`
@throws com::sun::star::lang::WrappedTargetException
if an error occurs while loading
*/
void storeMetadataToStorage(
[in] com::sun::star::embed::XStorage Storage )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::lang::WrappedTargetException );
/** loads document metadata from a medium.
If the Medium contains an InteractionHandler, it will be used for
error reporting.
@param Medium
the com::sun::star::document::MediaDescriptor
representing the source
@throws com::sun::star::lang::IllegalArgumentException
if the argument does not contain a URL or Stream property
@throws com::sun::star::lang::WrappedTargetException
if an error occurs while loading
@see com::sun::star::document::MediaDescriptor
*/
void loadMetadataFromMedium(
[in] sequence < com::sun::star::beans::PropertyValue > Medium )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::lang::WrappedTargetException );
/** stores document metadata to a medium.
@param Medium
the com::sun::star::document::MediaDescriptor
representing the target
@throws com::sun::star::lang::IllegalArgumentException
if the argument does not contain a URL or Stream property
@throws com::sun::star::lang::WrappedTargetException
if an error occurs while storing
@see com::sun::star::document::MediaDescriptor
*/
void storeMetadataToMedium(
[in] sequence < com::sun::star::beans::PropertyValue > Medium )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::lang::WrappedTargetException );
};
}; }; }; };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */