1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  package org.apache.directory.server.xdbm.search.impl;
21  
22  
23  import org.apache.directory.shared.ldap.schema.Syntax;
24  import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
25  import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
26  
27  import javax.naming.NamingException;
28  
29  
30  /**
31   * A dummy syntax for testing.
32   *
33   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
34   * @version $Rev$
35   */
36  public class BogusSyntax implements Syntax
37  {
38      private static final long serialVersionUID = 1L;
39  
40  
41      public boolean isHumanReadable()
42      {
43          return false;
44      }
45  
46  
47      public SyntaxChecker getSyntaxChecker() throws NamingException
48      {
49          return new AcceptAllSyntaxChecker();
50      }
51  
52  
53      public boolean isObsolete()
54      {
55          return false;
56      }
57  
58  
59      public String getOid()
60      {
61          return "1.3.6.1.4.1.18060.0.4.1.1.100000";
62      }
63  
64  
65      public String[] getNames()
66      {
67          return new String[] { "bogus" };
68      }
69  
70  
71      public String getName()
72      {
73          return "bogus";
74      }
75  
76  
77      public String getDescription()
78      {
79          return "bogus";
80      }
81  
82  
83      public String getSchema()
84      {
85          return "bogus";
86      }
87  
88  
89      public void setSchema( String schemaName )
90      {
91      }
92  
93  
94      public String[] getNamesRef()
95      {
96          return new String[] { "bogus" };
97      }
98  }