| | |
| | | this.chopBefore = new TreeMap<DN, DN>(); |
| | | |
| | | for (DN localName : chopBefore) { |
| | | this.chopBefore.put(new DN(baseDN, localName), localName); |
| | | this.chopBefore.put(baseDN.concat(localName), localName); |
| | | } |
| | | } else { |
| | | // No chop before specifications. |
| | |
| | | this.chopAfter = new TreeMap<DN, DN>(); |
| | | |
| | | for (DN localName : chopAfter) { |
| | | this.chopAfter.put(new DN(baseDN, localName), localName); |
| | | this.chopAfter.put(baseDN.concat(localName), localName); |
| | | } |
| | | } else { |
| | | // No chop after specifications. |
| | |
| | | } |
| | | |
| | | // Check minimum and maximum depths. |
| | | int baseRDNCount = baseDN.getRDNComponents().length; |
| | | int baseRDNCount = baseDN.getNumComponents(); |
| | | |
| | | if (minimumDepth > 0) { |
| | | int entryRDNCount = dn.getRDNComponents().length; |
| | | int entryRDNCount = dn.getNumComponents(); |
| | | |
| | | if (entryRDNCount - baseRDNCount < minimumDepth) { |
| | | return false; |
| | |
| | | } |
| | | |
| | | if (maximumDepth >= 0) { |
| | | int entryRDNCount = dn.getRDNComponents().length; |
| | | int entryRDNCount = dn.getNumComponents(); |
| | | |
| | | if (entryRDNCount - baseRDNCount > maximumDepth) { |
| | | return false; |