1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_rdf_XMetadatable_idl__ 25#define __com_sun_star_rdf_XMetadatable_idl__ 26 27#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 28#include <com/sun/star/lang/IllegalArgumentException.idl> 29#endif 30 31#ifndef __com_sun_star_beans_StringPair_idl__ 32#include <com/sun/star/beans/StringPair.idl> 33#endif 34 35#ifndef __com_sun_star_rdf_XURI_idl__ 36#include <com/sun/star/rdf/XURI.idl> 37#endif 38 39 40//============================================================================= 41 42module com { module sun { module star { module rdf { 43 44//============================================================================= 45/** marks an object representing an ODF element that may have RDF meta data 46 attached. 47 48 <p> 49 To make using ODF elements as part of RDF statements more convenient, 50 this interface inherits from <type>XURI</type>. 51 The URI is constructed by concatenating the URI of the document, the 52 stream name, a fragment separator, and the XML ID. 53 </p> 54 55 <p> 56 Note that using the <type>XURI</type> interface on an instance of 57 <type>XMetadatable</type> may have the side effect of creating a metadata 58 reference for the instance. 59 </p> 60 61 @since OpenOffice 3.2 62 63 @see XRepository 64 @see XDocumentMetadataAccess 65 */ 66published interface XMetadatable : XURI 67{ 68 //------------------------------------------------------------------------- 69 /** a metadata reference, comprising the stream name and the XML ID. 70 71 <p> 72 Note that this metadata reference must be unique for the ODF document. 73 This implies that the XML ID part must be unique for every stream. 74 A pair of two empty strings signifies "no metadata reference". 75 For example: Pair("content.xml", "foo-element-1") 76 </p> 77 78 @throws com::sun::star::lang::IllegalArgumentException 79 if the given metadata reference is invalid, or not unique 80 */ 81 [attribute] com::sun::star::beans::StringPair MetadataReference { 82 set raises ( com::sun::star::lang::IllegalArgumentException ); 83 }; 84 85 //------------------------------------------------------------------------- 86 /** creates a metadata reference for this object, if necessary. 87 88 <p> 89 If this object already has a metadata reference, do nothing; 90 otherwise, create metadata reference with a fresh, unique XML ID 91 and assign it to the MetadataReference attribute. 92 </p> 93 */ 94 void ensureMetadataReference(); 95 96}; 97 98//============================================================================= 99 100}; }; }; }; 101 102#endif 103