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_xsd_XDataTypeRepository_idl__
25#define __com_sun_star_xsd_XDataTypeRepository_idl__
26
27#ifndef __com_sun_star_container_XEnumerationAccess_idl__
28#include <com/sun/star/container/XEnumerationAccess.idl>
29#endif
30#ifndef __com_sun_star_container_XNameAccess_idl__
31#include <com/sun/star/container/XNameAccess.idl>
32#endif
33#ifndef __com_sun_star_xsd_XDataType_idl__
34#include <com/sun/star/xsd/XDataType.idl>
35#endif
36#ifndef __com_sun_star_container_NoSuchElementException_idl__
37#include <com/sun/star/container/NoSuchElementException.idl>
38#endif
39#ifndef __com_sun_star_container_ElementExistException_idl__
40#include <com/sun/star/container/ElementExistException.idl>
41#endif
42#ifndef __com_sun_star_util_VetoException_idl__
43#include <com/sun/star/util/VetoException.idl>
44#endif
45
46
47//=============================================================================
48module com {  module sun {  module star {  module xforms {
49
50//-----------------------------------------------------------------------------
51/** specifies a repository of XSD data types
52
53    <p>The elements of the repository are instances supporting the <type scope="com::sun::star::xsd">XDataType</type>
54    interface.</p>
55*/
56interface XDataTypeRepository
57{
58    /** provides access to an enumeration of the contained data types
59    */
60    interface com::sun::star::container::XEnumerationAccess;
61
62    /** provides untyped access to the elements of the repository, as well as meta information
63        such as the names of all contained types, and the existence of a named type
64    */
65    interface com::sun::star::container::XNameAccess;
66
67    /** retrieves the basic type for the given type class
68
69        @see com::sun::star::xsd::DataTypeClass
70
71        @throws com::sun::star::container::NoSuchElementException
72            if in the repository, there is no data type with the given class
73    */
74    com::sun::star::xsd::XDataType
75        getBasicDataType( [in] short dataTypeClass )
76            raises ( com::sun::star::container::NoSuchElementException );
77
78    /** creates a clone of the given data type, and inserts it into the repository
79
80        @throws com::sun::star::container::NoSuchElementException
81            if the given name does not refer to a type in the repository
82
83        @throws com::sun::star::container::ElementExistException
84            if the new name is already used in the repository
85    */
86    com::sun::star::xsd::XDataType
87        cloneDataType( [in] string sourceName, [in] string newName )
88			raises( com::sun::star::container::NoSuchElementException, com::sun::star::container::ElementExistException );
89
90    /** removes a data type given by name from the repository
91
92        @throws com::sun::star::container::NoSuchElementException
93            if the given name does not refer to a type in the repository
94
95        @throws com::sun::star::util::VetoException
96            if the specified data type is a built-in (basic) data type, and cannot
97            be removed
98
99        @see com::sun::star::xsd::XDataType
100    */
101    void
102        revokeDataType( [in] string typeName )
103			raises( com::sun::star::container::NoSuchElementException, com::sun::star::util::VetoException );
104
105    /**
106    */
107    com::sun::star::xsd::XDataType
108        getDataType( [in] string typeName )
109			raises( com::sun::star::container::NoSuchElementException );
110};
111
112//=============================================================================
113
114}; }; }; };
115
116#endif
117