merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / rdf / XMetadatable.idl
blobe7f01d9c05bae8285ff478ad7e6f4c3e671b11a4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_rdf_XMetadatable_idl__
29 #define __com_sun_star_rdf_XMetadatable_idl__
31 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
32 #include <com/sun/star/lang/IllegalArgumentException.idl>
33 #endif
35 #ifndef __com_sun_star_beans_StringPair_idl__
36 #include <com/sun/star/beans/StringPair.idl>
37 #endif
39 #ifndef __com_sun_star_rdf_XURI_idl__
40 #include <com/sun/star/rdf/XURI.idl>
41 #endif
44 //=============================================================================
46 module com { module sun { module star { module rdf {
48 //=============================================================================
49 /** marks an object representing an ODF element that may have RDF meta data
50 attached.
52 <p>
53 To make using ODF elements as part of RDF statements more convenient,
54 this interface inherits from <type>XURI</type>.
55 The URI is constructed by concatenating the URI of the document, the
56 stream name, a fragment separator, and the XML ID.
57 </p>
59 <p>
60 Note that using the <type>XURI</type> interface on an instance of
61 <type>XMetadatable</type> may have the side effect of creating a metadata
62 reference for the instance.
63 </p>
65 @since OOo 3.2
67 @see XRepository
68 @see XDocumentMetadataAccess
70 interface XMetadatable : XURI
72 //-------------------------------------------------------------------------
73 /** a metadata reference, comprising the stream name and the XML ID.
75 <p>
76 Note that this metadata reference must be unique for the ODF document.
77 This implies that the XML ID part must be unique for every stream.
78 A pair of two empty strings signifies "no metadata reference".
79 For example: Pair("content.xml", "foo-element-1")
80 </p>
82 @throws com::sun::star::lang::IllegalArgumentException
83 if the given metadata reference is invalid, or not unique
85 [attribute] com::sun::star::beans::StringPair MetadataReference {
86 set raises ( com::sun::star::lang::IllegalArgumentException );
89 //-------------------------------------------------------------------------
90 /** creates a metadata reference for this object, if necessary.
92 <p>
93 If this object already has a metadata reference, do nothing;
94 otherwise, create metadata reference with a fresh, unique XML ID
95 and assign it to the MetadataReference attribute.
96 </p>
98 void ensureMetadataReference();
102 //=============================================================================
104 }; }; }; };
106 #endif