1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_xsd_XDataType_idl__ 29#define __com_sun_star_xsd_XDataType_idl__ 30 31#ifndef __com_sun_star_container_XNamed_idl__ 32#include <com/sun/star/container/XNamed.idl> 33#endif 34#ifndef __com_sun_star_util_VetoException_idl__ 35#include <com/sun/star/util/VetoException.idl> 36#endif 37#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 38#include <com/sun/star/lang/IllegalArgumentException.idl> 39#endif 40#ifndef __com_sun_star_beans_XPropertySet_idl__ 41#include <com/sun/star/beans/XPropertySet.idl> 42#endif 43 44//============================================================================= 45module com { module sun { module star { module xsd { 46 47//----------------------------------------------------------------------------- 48/** specifies an <a href="http://www.w3.org/TR/xmlschema-2/#built-in-datatypes">XSD compliant simple data type</a> 49*/ 50interface XDataType 51{ 52 /** provides generic access to the instance properties 53 */ 54 interface com::sun::star::beans::XPropertySet; 55 56 /** provides access to the name of the type 57 */ 58 [attribute] string Name 59 { 60 set raises ( com::sun::star::util::VetoException ); 61 }; 62 63 /** specifies the pattern which strings conforming to this type comply to 64 65 <p>See <a href="http://www.w3.org/TR/xmlschema-2/#rf-pattern">http://www.w3.org/TR/xmlschema-2/#rf-pattern</a></p> 66 */ 67 [attribute] string Pattern; 68 69 /** specifies how strings of this data type are to be processed, with respect to 70 white spaces 71 72 <p>See <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace</a></p> 73 */ 74 [attribute] short WhiteSpaceTreatment 75 { 76 set raises ( com::sun::star::lang::IllegalArgumentException ); 77 }; 78 79 /** specifies whether the type is a basic type 80 81 <p>Basic types are built into the type system, and cannot be changed by the user.</p> 82 */ 83 [attribute, readonly] boolean IsBasic; 84 85 /** class of the type 86 87 @see DataTypeClass 88 */ 89 [attribute, readonly] short TypeClass; 90 91 /// TODO 92 boolean validate( [in] string value ); 93 94 /// TODO 95 string explainInvalid( [in] string value ); 96}; 97 98//============================================================================= 99 100}; }; }; }; 101 102#endif 103