| | |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | | syntax = new SubstitutionSyntax(subSyntax,description,oid); |
| | | syntax = new SubstitutionSyntax(subSyntax,valueStr,description,oid); |
| | | } |
| | | else if(lowerTokenName.equals("x-pattern")) |
| | | { |
| | |
| | | try |
| | | { |
| | | Pattern pattern = Pattern.compile(regex); |
| | | syntax = new RegexSyntax(pattern,description,oid); |
| | | syntax = new RegexSyntax(pattern,valueStr,description,oid); |
| | | } |
| | | catch(Exception e) |
| | | { |
| | |
| | | } |
| | | entries.add(entry); |
| | | } |
| | | syntax = new EnumSyntax(entries, description, oid); |
| | | syntax = new EnumSyntax(entries, valueStr,description, oid); |
| | | } |
| | | else |
| | | { |
| | |
| | | // The description of this syntax. |
| | | private String description; |
| | | |
| | | // The definition of this syntax. |
| | | private String definition; |
| | | |
| | | |
| | | //The oid of this syntax. |
| | | private String oid; |
| | | |
| | |
| | | |
| | | //Creates a new instance of this syntax. |
| | | private SubstitutionSyntax(AttributeSyntax subSyntax, |
| | | String definition, |
| | | String description, |
| | | String oid) |
| | | { |
| | | super(); |
| | | this.subSyntax = subSyntax; |
| | | this.definition = definition; |
| | | this.description = description; |
| | | this.oid = oid; |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return definition; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | |
| | | //The oid of this syntax. |
| | | private String oid; |
| | | |
| | | //The definition of this syntax. |
| | | private String definition; |
| | | |
| | | //The equality matching rule. |
| | | private EqualityMatchingRule equalityMatchingRule; |
| | | |
| | |
| | | |
| | | //Creates a new instance of this syntax. |
| | | private RegexSyntax(Pattern pattern, |
| | | String definition, |
| | | String description, |
| | | String oid) |
| | | { |
| | | super(); |
| | | this.definition = definition; |
| | | this.pattern = pattern; |
| | | this.description = description; |
| | | this.oid = oid; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return definition; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | |
| | | //The approximate matching rule. |
| | | private ApproximateMatchingRule approximateMatchingRule; |
| | | |
| | | //The definition of this syntax. |
| | | private String definition; |
| | | |
| | | |
| | | //Creates a new instance of this syntax. |
| | | private EnumSyntax(LinkedList<ByteSequence> entries, |
| | | String definition, |
| | | String description, |
| | | String oid) |
| | | { |
| | | super(); |
| | | this.entries = entries; |
| | | this.definition = definition; |
| | | this.description = description; |
| | | this.oid = oid; |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return definition; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getDescription() |
| | | { |