merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / rdf / XMetadatable.idl
blob19b25f8b58a0915962dbb1c464dd946a66f5941e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMetadatable.idl,v $
10 * $Revision: 1.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_rdf_XMetadatable_idl__
32 #define __com_sun_star_rdf_XMetadatable_idl__
34 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35 #include <com/sun/star/lang/IllegalArgumentException.idl>
36 #endif
38 #ifndef __com_sun_star_beans_StringPair_idl__
39 #include <com/sun/star/beans/StringPair.idl>
40 #endif
42 #ifndef __com_sun_star_rdf_XURI_idl__
43 #include <com/sun/star/rdf/XURI.idl>
44 #endif
47 //=============================================================================
49 module com { module sun { module star { module rdf {
51 //=============================================================================
52 /** marks an object representing an ODF element that may have RDF meta data
53 attached.
55 <p>
56 To make using ODF elements as part of RDF statements more convenient,
57 this interface inherits from <type>XURI</type>.
58 The URI is constructed by concatenating the URI of the document, the
59 stream name, a fragment separator, and the XML ID.
60 </p>
62 <p>
63 Note that using the <type>XURI</type> interface on an instance of
64 <type>XMetadatable</type> may have the side effect of creating a metadata
65 reference for the instance.
66 </p>
68 @since OOo 3.2
70 @see XRepository
71 @see XDocumentMetadataAccess
73 interface XMetadatable : XURI
75 //-------------------------------------------------------------------------
76 /** a metadata reference, comprising the stream name and the XML ID.
78 <p>
79 Note that this metadata reference must be unique for the ODF document.
80 This implies that the XML ID part must be unique for every stream.
81 A pair of two empty strings signifies "no metadata reference".
82 For example: Pair("content.xml", "foo-element-1")
83 </p>
85 @throws com::sun::star::lang::IllegalArgumentException
86 if the given metadata reference is invalid, or not unique
88 [attribute] com::sun::star::beans::StringPair MetadataReference {
89 set raises ( com::sun::star::lang::IllegalArgumentException );
92 //-------------------------------------------------------------------------
93 /** creates a metadata reference for this object, if necessary.
95 <p>
96 If this object already has a metadata reference, do nothing;
97 otherwise, create metadata reference with a fresh, unique XML ID
98 and assign it to the MetadataReference attribute.
99 </p>
101 void ensureMetadataReference();
105 //=============================================================================
107 }; }; }; };
109 #endif