1 20 21 package org.apache.directory.ldapstudio.browser.core.model.schema; 22 23 24 import java.io.Serializable ; 25 26 import org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifAttrValLine; 27 28 29 public abstract class SchemaPart implements Comparable , Serializable  30 { 31 32 protected LdifAttrValLine line; 33 34 protected Schema schema; 35 36 protected String numericOID; 37 38 protected String desc; 39 40 41 protected SchemaPart() 42 { 43 this.schema = null; 44 this.numericOID = null; 45 this.desc = null; 46 } 47 48 49 53 public Schema getSchema() 54 { 55 return schema; 56 } 57 58 59 public void setSchema( Schema schema ) 60 { 61 this.schema = schema; 62 } 63 64 65 69 public String getNumericOID() 70 { 71 return numericOID; 72 } 73 74 75 public void setNumericOID( String numericOID ) 76 { 77 this.numericOID = numericOID; 78 } 79 80 81 85 public boolean isDefault() 86 { 87 return this.schema.isDefault(); 88 } 89 90 91 95 public String getDesc() 96 { 97 return desc; 98 } 99 100 101 public void setDesc( String desc ) 102 { 103 this.desc = desc; 104 } 105 106 107 public LdifAttrValLine getLine() 108 { 109 return line; 110 } 111 112 113 public void setLine( LdifAttrValLine line ) 114 { 115 this.line = line; 116 } 117 118 119 public boolean equals( Object obj ) 120 { 121 if ( obj instanceof SchemaPart ) 122 { 123 return this.getClass() == obj.getClass() && this.toString().equals( obj.toString() ); 124 } 125 else 126 { 127 return false; 128 } 129 } 130 131 132 public int hashCode() 133 { 134 return toString().hashCode(); 135 } 136 137 } 138 | Popular Tags |