1 17 package org.apache.ldap.server.tools.schema; 18 19 20 import org.apache.ldap.common.util.ArrayUtils; 21 import org.apache.ldap.common.schema.ObjectClassTypeEnum; 22 23 24 31 public class ObjectClassLiteral 32 { 33 private boolean obsolete = false; 34 35 private String oid; 36 private String description; 37 38 private String [] names = ArrayUtils.EMPTY_STRING_ARRAY; 39 private String [] superiors = ArrayUtils.EMPTY_STRING_ARRAY; 40 private String [] must = ArrayUtils.EMPTY_STRING_ARRAY; 41 private String [] may = ArrayUtils.EMPTY_STRING_ARRAY; 42 43 private ObjectClassTypeEnum classType = ObjectClassTypeEnum.STRUCTURAL; 44 45 46 50 51 public ObjectClassLiteral( String oid ) 52 { 53 this.oid = oid; 54 } 55 56 57 61 62 public boolean isObsolete() 63 { 64 return obsolete; 65 } 66 67 public void setObsolete( boolean obsolete ) 68 { 69 this.obsolete = obsolete; 70 } 71 72 public String getOid() 73 { 74 return oid; 75 } 76 77 public void setOid( String oid ) 78 { 79 this.oid = oid; 80 } 81 82 public String getDescription() 83 { 84 return description; 85 } 86 87 public void setDescription( String description ) 88 { 89 this.description = description; 90 } 91 92 public String [] getNames() 93 { 94 return names; 95 } 96 97 public void setNames( String [] names ) 98 { 99 this.names = names; 100 } 101 102 public String [] getSuperiors() 103 { 104 return superiors; 105 } 106 107 public void setSuperiors( String [] superiors ) 108 { 109 this.superiors = superiors; 110 } 111 112 public String [] getMust() 113 { 114 return must; 115 } 116 117 public void setMust( String [] must ) 118 { 119 this.must = must; 120 } 121 122 public String [] getMay() 123 { 124 return may; 125 } 126 127 public void setMay( String [] may ) 128 { 129 this.may = may; 130 } 131 132 public ObjectClassTypeEnum getClassType() 133 { 134 return classType; 135 } 136 137 public void setClassType( ObjectClassTypeEnum classType ) 138 { 139 this.classType = classType; 140 } 141 142 143 147 148 public int hashCode() 149 { 150 return getOid().hashCode(); 151 } 152 153 154 public boolean equals( Object obj ) 155 { 156 if ( this == obj ) 157 { 158 return true; 159 } 160 161 if ( ! ( obj instanceof ObjectClassLiteral ) ) 162 { 163 return false; 164 } 165 166 return getOid().equals( ( ( ObjectClassLiteral ) obj ).getOid() ); 167 } 168 169 170 public String toString() 171 { 172 return getOid(); 173 } 174 } 175 | Popular Tags |