001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 *
019 */
020
021 package org.apache.directory.shared.ldap.schema.parsers;
022
023
024 import org.apache.directory.shared.ldap.schema.UsageEnum;
025
026
027 /**
028 * RFC 4512 - 4.1.2. Attribute Types
029 *
030 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
031 * @version $Rev$, $Date$
032 */
033 public class AttributeTypeDescription extends AbstractSchemaDescription
034 {
035 private String superType;
036
037 private String equalityMatchingRule;
038
039 private String orderingMatchingRule;
040
041 private String substringsMatchingRule;
042
043 private String syntax;
044
045 private int syntaxLength;
046
047 private boolean isSingleValued;
048
049 private boolean isCollective;
050
051 private boolean isUserModifiable;
052
053 private UsageEnum usage;
054
055
056 public AttributeTypeDescription()
057 {
058 superType = null;
059 equalityMatchingRule = null;
060 orderingMatchingRule = null;
061 substringsMatchingRule = null;
062 syntax = null;
063 syntaxLength = 0;
064 isSingleValued = false;
065 isCollective = false;
066 isUserModifiable = true;
067 usage = UsageEnum.USER_APPLICATIONS;
068 }
069
070
071 public String getEqualityMatchingRule()
072 {
073 return equalityMatchingRule;
074 }
075
076
077 public void setEqualityMatchingRule( String equalityMatchingRule )
078 {
079 this.equalityMatchingRule = equalityMatchingRule;
080 }
081
082
083 public boolean isCollective()
084 {
085 return isCollective;
086 }
087
088
089 public void setCollective( boolean isCollective )
090 {
091 this.isCollective = isCollective;
092 }
093
094
095 public boolean isUserModifiable()
096 {
097 return isUserModifiable;
098 }
099
100
101 public void setUserModifiable( boolean isUserModifiable )
102 {
103 this.isUserModifiable = isUserModifiable;
104 }
105
106
107 public String getOrderingMatchingRule()
108 {
109 return orderingMatchingRule;
110 }
111
112
113 public void setOrderingMatchingRule( String orderingMatchingRule )
114 {
115 this.orderingMatchingRule = orderingMatchingRule;
116 }
117
118
119 public boolean isSingleValued()
120 {
121 return isSingleValued;
122 }
123
124
125 public void setSingleValued( boolean singleValued )
126 {
127 this.isSingleValued = singleValued;
128 }
129
130
131 public String getSubstringsMatchingRule()
132 {
133 return substringsMatchingRule;
134 }
135
136
137 public void setSubstringsMatchingRule( String substringsMatchingRule )
138 {
139 this.substringsMatchingRule = substringsMatchingRule;
140 }
141
142
143 public String getSuperType()
144 {
145 return superType;
146 }
147
148
149 public void setSuperType( String superType )
150 {
151 this.superType = superType;
152 }
153
154
155 public String getSyntax()
156 {
157 return syntax;
158 }
159
160
161 public void setSyntax( String syntax )
162 {
163 this.syntax = syntax;
164 }
165
166
167 public int getSyntaxLength()
168 {
169 return syntaxLength;
170 }
171
172
173 public void setSyntaxLength( int syntaxLenght )
174 {
175 this.syntaxLength = syntaxLenght;
176 }
177
178
179 public UsageEnum getUsage()
180 {
181 return usage;
182 }
183
184
185 public void setUsage( UsageEnum usage )
186 {
187 this.usage = usage;
188 }
189
190 }