1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.server.xdbm.search.impl;
21
22
23 import org.apache.directory.shared.ldap.schema.AttributeType;
24 import org.apache.directory.shared.ldap.schema.UsageEnum;
25 import org.apache.directory.shared.ldap.schema.Syntax;
26 import org.apache.directory.shared.ldap.schema.MatchingRule;
27 import org.apache.directory.shared.ldap.constants.SchemaConstants;
28
29 import javax.naming.NamingException;
30
31
32
33
34
35
36
37
38
39 public class NoMatchingRuleAttributeType implements AttributeType
40 {
41 private static final long serialVersionUID = 1L;
42
43
44 public boolean isSingleValue()
45 {
46 return false;
47 }
48
49
50 public boolean isCanUserModify()
51 {
52 return false;
53 }
54
55
56 public boolean isCollective()
57 {
58 return false;
59 }
60
61
62 public UsageEnum getUsage()
63 {
64 return null;
65 }
66
67
68 public AttributeType getSuperior() throws NamingException
69 {
70 return null;
71 }
72
73
74 public Syntax getSyntax() throws NamingException
75 {
76 return new BogusSyntax();
77 }
78
79
80 public int getLength()
81 {
82 return 0;
83 }
84
85
86 public MatchingRule getEquality() throws NamingException
87 {
88 return null;
89 }
90
91
92 public MatchingRule getOrdering() throws NamingException
93 {
94 return null;
95 }
96
97
98 public MatchingRule getSubstr() throws NamingException
99 {
100 return null;
101 }
102
103
104 public boolean isAncestorOf( AttributeType descendant ) throws NamingException
105 {
106 return false;
107 }
108
109
110 public boolean isDescentantOf( AttributeType ancestor ) throws NamingException
111 {
112 return false;
113 }
114
115
116 public boolean isObsolete()
117 {
118 return false;
119 }
120
121
122 public String getOid()
123 {
124 return SchemaConstants.ATTRIBUTE_TYPES_AT_OID + ".2000";
125 }
126
127
128 public String[] getNames()
129 {
130 return new String[] { "bogus" };
131 }
132
133
134 public String getName()
135 {
136 return "bogus";
137 }
138
139
140 public String getDescription()
141 {
142 return "";
143 }
144
145
146 public String getSchema()
147 {
148 return "other";
149 }
150
151
152 public void setSchema( String schemaName )
153 {
154 }
155
156
157 public String[] getNamesRef()
158 {
159 return new String[] { "bogus" };
160 }
161 }