Issue Details (XML | Word | Printable)

Key: DIRSERVER-793
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Stefan Seelmann
Reporter: Ersin Er
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Implement parsers and simple beans for all schema elements in RFC4512

Created: 10/Dec/06 08:12 PM   Updated: 23/Feb/07 08:24 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works shared-ldap-trunks-ATD-LSD.patch 2006-12-12 11:45 PM Stefan Seelmann 105 kB
Text File Licensed for inclusion in ASF works shared-ldap-trunks-DCRD-DSRD-NFD.patch 2006-12-17 07:35 PM Stefan Seelmann 171 kB
Text File Licensed for inclusion in ASF works shared-ldap-trunks-MRD.patch 2006-12-16 05:21 PM Stefan Seelmann 152 kB
Text File Licensed for inclusion in ASF works shared-ldap-trunks-MRD2.patch 2006-12-16 08:35 PM Stefan Seelmann 71 kB
Text File Licensed for inclusion in ASF works shared-ldap-trunks-ObjectClassDescription.patch 2006-12-10 08:58 PM Stefan Seelmann 83 kB
Text File Licensed for inclusion in ASF works shared-ldap-trunks-UNESC.patch 2006-12-18 10:46 PM Stefan Seelmann 3 kB

Resolution Date: 23/Feb/07 08:24 PM


 Description  « Hide
We need parsers and simple beans to populate in for all schema elements given in RFC4512. The elements are:

ObjectClassDescription
AttributeTypeDescription
MatchingRuleDescription
MatchingRuleUseDescription
SyntaxDescription
DITContentRuleDescription
DITStructureRuleDescription
NameFormDescription


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Stefan Seelmann added a comment - 10/Dec/06 08:58 PM
This patch includes
- Antlr grammar to generate lexer and parser for ObjectClassDescriptions
- A wrapper class around the generated Antlr parser and lexer
- A bean class for ObjectClassDescriptions
- A syntax checker for ObjectClassDescriptions
- Two test cases to test the parser and syntax checker

I will also implement and add parsers for the other schema elements.

Ersin Er added a comment - 10/Dec/06 10:25 PM
Applied the patch provided by Stefan Seelmann here:

http://svn.apache.org/viewvc?view=rev&rev=485262

Thanks again. We are looking forward to applying other remaining patches to close the issue ;-)

Stefan Seelmann added a comment - 12/Dec/06 11:45 PM
This patch includes parsers, beans, checkers and test cases for attribute type descriptions and LDAP syntax descriptons.

Emmanuel Lecharny added a comment - 13/Dec/06 02:00 AM
Applied !

Thanks Stefan for the patch.

However we have had a discussion about parsers, and we think that we should have as many parsers as
we have objects to parse, to avoid concurrenct access problems. This is something I will elaborate tomorrow,
because 3am is definitively not the right time to make my brain produce smart things :)

Stefan Seelmann added a comment - 16/Dec/06 05:21 PM
This patch includes parsers, beans, checkers and test cases for matching rule descriptions and matching rule use descriptions.

It also includes some refactorings:
- AbstractSchemaDescription is a base class for all beans
- AbstractSchemaParser is a base class for all parsers
- SchemaParserTestUtils contains test methods that are common for most schema objects (oid, name, desc, extensions)

Alex Karasulu added a comment - 16/Dec/06 05:52 PM
Applied shared-ldap-trunks-MRD.patch on commit revision 487835 here:

     http://svn.apache.org/viewvc?view=rev&revision=487835

Thanks Seelmann!!!

Stefan Seelmann added a comment - 16/Dec/06 08:35 PM
Some file were missing in the last patch, sorry.


Emmanuel Lecharny added a comment - 16/Dec/06 09:20 PM
Was closed a little bit too early :)

Stefan Seelmann added a comment - 17/Dec/06 07:35 PM
This patch includes parsers, beans, checkers and test cases for DIT content rule descriptions, DIT structure rule descriptions and name form descriptions.

Ersin Er added a comment - 17/Dec/06 07:53 PM
shared-ldap-trunks-DCRD-DSRD-NFD.patch has been committed here:

http://svn.apache.org/viewvc?view=rev&revision=488033

I think we're close to end of this big parser party. Go Stefan!

Ersin Er added a comment - 17/Dec/06 08:01 PM

Stefan Seelmann added a comment - 17/Dec/06 08:34 PM
All parsers are implemented.

Current features:
- Accepts any order of elements, of course the OID must be the first
- Checks that each element only appears once
- Checks for required elements (e.g. AT requires at least one of SYNTAX or SUP, but both are optional)

The parser could do more semantic checks. Some ideas:
- No duplicate values in multivalued elements (e.g. "... MUST ( cn, cn )..." )
- SUP in ObjectClass, AttributeType or DITStructureRule should not point to itself
- MUST and MAY in ObjectClass should be disjoint.
- MUST, MAY and NOT in DITContentRule should be disjoint.
- MUST and MAY in NameForm should be disjoint.
On the other side when checking for duplicate/disjoint values there is a problem with alternative identifiers: MUST contains name (cn), MAY contains OID (2.5.4.3 ) or an alternative name (commonName). The parser doesn't know that they are equal.

Stefan Seelmann added a comment - 18/Dec/06 10:46 PM
Unescapes escaped backslash and single-quote in qdstring

Ersin Er added a comment - 05/Feb/07 12:47 PM
Assigning this issue to Stefan, so that he can review for last time and resolve it.

Alex Karasulu added a comment - 05/Feb/07 04:19 PM
Adding a request for 3 more parsers for apacheDS specific operational attributes present in the schema subentry:

syntaxCheckers
comparators
normalizers

I will give syntaxes for this soon.

Stefan Seelmann added a comment - 16/Feb/07 11:07 PM
The three ADS specific parsers were added here: http://svn.apache.org/viewvc?view=rev&rev=504368
The schema syntaxes are here: http://cwiki.apache.org/confluence/display/DIRxSRVx11/ApacheDS+Specific+Schema+Descriptions

TODOs:
- We have to check the grammars, especially the base64 and fqcn productions must be specified
- Then the parsers must be improved
- And of course we need tests for these schema parsers

Alex Karasulu added a comment - 23/Feb/07 08:24 PM
It's all been done. Thanks Stefan!