01: /*
02: * Copyright 1999-2004 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.apache.naming.core;
18:
19: import javax.naming.NameParser;
20: import javax.naming.Name;
21: import javax.naming.NamingException;
22: import javax.naming.CompositeName;
23:
24: /**
25: * Parses names.
26: *
27: * @author Remy Maucherat
28: * @version $Revision: 1.2 $ $Date: 2004/02/24 08:58:08 $
29: */
30: public class NameParserImpl implements NameParser {
31:
32: // ----------------------------------------------------- Instance Variables
33:
34: // ----------------------------------------------------- NameParser Methods
35:
36: /**
37: * Parses a name into its components.
38: *
39: * @param name The non-null string name to parse
40: * @return A non-null parsed form of the name using the naming convention
41: * of this parser.
42: */
43: public Name parse(String name) throws NamingException {
44: return new CompositeName(name);
45: }
46:
47: // public Name parse( String name ) throws NamingException
48: // {
49: // return new CompoundName( name, syntax );
50: // }
51:
52: // public Properties getSyntax()
53: // {
54: // return syntax;
55: // }
56:
57: // static Properties syntax = new Properties();
58:
59: // static
60: // {
61: // syntax.put("jndi.syntax.direction", "left_to_right");
62: // syntax.put("jndi.syntax.separator", "/");
63: // syntax.put("jndi.syntax.ignorecase", "false");
64: // }
65:
66: }
|