Methods' Details |
getElementByMetadataReference
- Description
- get the unique ODF element with the given metadata reference.
- Parameter MetadataReference
- a metadata reference, comprising the stream name and the XML ID
For example: Pair("content.xml", "foo-element-1")
- Returns
- the ODF element with the given metadata references if it exists,
else NULL
|
|
getElementByURI
- Description
- get the ODF element that corresponds to an URI.
- Parameter URI
- an URI that may identify an ODF element
- Returns
- the ODF element that corresponds to the given URI, or NULL
- Throws
- com::sun::star::lang::IllegalArgumentException
if the given URI is NULL
|
|
getMetadataGraphsWithType
- Description
- get the names of all metadata files with a given type.
- Parameter Type
- the
rdf:type property of the requested named graphs
- Returns
- the names of all metadata graphs that have a
rdf:type
property with the given Type as object
- Throws
- com::sun::star::lang::IllegalArgumentException
if the given Type is NULL
|
|
addMetadataFile
- Description
- add a metadata file to the manifest.
This convenience method does the following:
- create a new graph with the given name in the repository
- insert statements declaring the new graph to be a
metadata file into the manifest graph
- insert statements declaring
rdf:type properties
for the new graph into the manifest graph
- Parameter FileName
- the name of the stream in the ODF storage where the graph will
be stored
- Parameter Types
- a list of types that will be inserted as
rdf:type
properties for the graph
- Returns
- the name of the new graph
- 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
|
|
importMetadataFile
- Description
- import a metadata file into the document repository, and add it to the
manifest.
This convenience method does the following:
- import the given file into a graph with the given name
in the repository
- insert statements declaring the new graph to be a
metadata file into the manifest graph
- insert statements declaring
rdf:type properties
for the new graph into the manifest graph
- Parameter FileName
- the name of the stream in the ODF storage where the graph will
be stored
- Parameter BaseURI
- a base URI to resolve relative URI references
- Parameter Types
- a list of types that will be inserted as
rdf:type
properties for the graph
- Returns
- the name of the new graph
- Throws
- com::sun::star::lang::IllegalArgumentException
if the given stream is NULL,
or BaseURI is NULL and the format requires use of a base URI,
or the FileName is invalid
- Throws
- com::sun::star::datatransfer::UnsupportedFlavorException
if the format requested is unknown or not supported
- Throws
- com::sun::star::container::ElementExistException
if a stream with the given FileName already exists
- Throws
- ParseException
if the input does not conform to the specified file format.
- Throws
- com::sun::star::io::IOException
if an I/O error occurs.
- See also
- FileFormat
|
|
removeMetadataFile
- Description
- 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
- Parameter 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
|
|
addContentOrStylesFile
- Description
- 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.
- Parameter 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
|
|
removeContentOrStylesFile
- Description
- 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.
- Parameter 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
|
|
loadMetadataFromStorage
- Description
- 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.
- Parameter Storage
- a storage, representing e.g. an ODF package file, or sub-document
- Parameter 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
- Parameter 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
|
|
storeMetadataToStorage
- Description
- 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.
- Parameter 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
|
|
loadMetadataFromMedium
- Description
- loads document metadata from a medium.
If the Medium contains an InteractionHandler, it will be used for
error reporting.
- Parameter 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 also
- ::com::sun::star::document::MediaDescriptor
|
|
storeMetadataToMedium
- Description
- stores document metadata to a medium.
- Parameter 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 also
- ::com::sun::star::document::MediaDescriptor
|
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.