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_uri_UriReferenceFactory_idl__ 25#define __com_sun_star_uri_UriReferenceFactory_idl__ 26 27module com { module sun { module star { module uri { 28 29published interface XUriReferenceFactory; 30 31/** 32 creates URI references. 33 34 <p>See <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a> for a 35 description of URI references and related terms.</p> 36 37 <p>For parsing absolute URI references, this service tries to use a 38 scheme-specific parser. Such a scheme-specific parser will typically enforce 39 additional restrictions during parsing, and will typically return objects 40 that support extra, scheme-specific interfaces in addition to 41 <type scope="com::sun::star::uri">XUriReference</type>. If no such parser 42 is found, and for relative URI references, a generic parser is used, which 43 returns objects that only support 44 <type scope="com::sun::star::uri">XUriReference</type>.</p> 45 46 <p>Locating a scheme-specific parser works as follows: A scheme consists of 47 Latin captial letters 48 “<code>A</code>”–“<code>Z</code>”, Latin small 49 letters “<code>a</code>”–“<code>z</code>”, 50 digits “<code>0</code>”–“<code>9</code>”, 51 “<code>+</code>”, “<code>-</code>”, and 52 “<code>.</code>”. A scheme <var>s</var> is transformed into 53 a string <var>s</var>′ character-by-character, by translating 54 Lating capital letters to their small counterparts, translating 55 “<code>+</code>” to “<code>PLUS</code>”, 56 “<code>-</code>” to “<code>HYPHEN</code>”, 57 “<code>.</code>” to “<code>DOT</code>”, and copying 58 Latin small letters and digits unchanged. If the component context used 59 while creating this <code>UriReferenceFactory</code> instance offers a 60 service manager, and there is a service available at that service manager 61 whose name is the concatenation of 62 “<code>com.sun.star.uri.UriSchemeParser_</code>” and 63 <var>s</var>′, then that service is used. It is an error if that 64 service does not support 65 <type scope="com::sun::star::uri">XUriSchemeParser</type>.</p> 66 67 @since OpenOffice 2.0 68 */ 69published service UriReferenceFactory: XUriReferenceFactory; 70 71}; }; }; }; 72 73#endif 74