1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_rdf_XMetadatable_idl__
30 #define __com_sun_star_rdf_XMetadatable_idl__
32 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
33 #include
<com
/sun
/star
/beans
/StringPair.idl
>
34 #include
<com
/sun
/star
/rdf
/XURI.idl
>
37 //=============================================================================
39 module com
{ module sun
{ module star
{ module rdf
{
41 //=============================================================================
42 /** marks an object representing an ODF element that may have RDF meta data
46 To make using ODF elements as part of RDF statements more convenient,
47 this interface inherits from <type>XURI</type>.
48 The URI is constructed by concatenating the URI of the document, the
49 stream name, a fragment separator, and the XML ID.
53 Note that using the <type>XURI</type> interface on an instance of
54 <type>XMetadatable</type> may have the side effect of creating a metadata
55 reference for the instance.
61 @see XDocumentMetadataAccess
63 interface XMetadatable
: XURI
65 //-------------------------------------------------------------------------
66 /** a metadata reference, comprising the stream name and the XML ID.
69 Note that this metadata reference must be unique for the ODF document.
70 This implies that the XML ID part must be unique for every stream.
71 A pair of two empty strings signifies "no metadata reference".
72 For example: Pair("content.xml", "foo-element-1")
75 @throws com::sun::star::lang::IllegalArgumentException
76 if the given metadata reference is invalid, or not unique
78 [attribute
] com
::sun
::star
::beans
::StringPair MetadataReference
{
79 set raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
82 //-------------------------------------------------------------------------
83 /** creates a metadata reference for this object, if necessary.
86 If this object already has a metadata reference, do nothing;
87 otherwise, create metadata reference with a fresh, unique XML ID
88 and assign it to the MetadataReference attribute.
91 void ensureMetadataReference
();
95 //=============================================================================
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */