[teiid-issues] [JBoss JIRA] (TEIID-3260) Create custom metadata repository that uses Modeshape

Paul Richardson (JIRA) issues at jboss.org
Tue Feb 24 11:18:49 EST 2015


    [ https://issues.jboss.org/browse/TEIID-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043242#comment-13043242 ] 

Paul Richardson commented on TEIID-3260:
----------------------------------------

[~blafond] is referring to the Teiid BNF of course.

The Teiid BNF and the Teiid javacc template were the starting points for both the Modeshape TeiidSQL CND and Sequencer.

* Steps taken in creation of Teiid SQL Sequencer
** The Teiid javacc template was copied and converted to a [jjt template|https://github.com/Teiid-Designer/komodo/blob/master/plugins/org.komodo.modeshape.teiid.sql.sequencer/gen/javacc/TeiidSequencingParser.jjt]
** Since the Teiid parser acts on language objects, those classes were migrated from Teiid. However, their inner state has been stripped out and their logic converted to extending AstNode (a convenient intermittent step between parser and MS node creation)
** The Teiid SQL Sequencing calls the Teiid SQL parser, which generates the tree of AstNodes, which queues up and stores them as JcrNodes in the MS repository.
** The class [TeiidCndGenerator|https://github.com/Teiid-Designer/komodo/blob/master/plugins/org.komodo.modeshape.teiid.sql.sequencer/demigen/org/komodo/modeshape/teiid/generators/TeiidCndGenerator.java] executes standalone, reading in the jjt template and converting it to an MS [CND|https://github.com/Teiid-Designer/komodo/blob/master/plugins/org.komodo.modeshape.teiid.sql.sequencer/demigen/org/komodo/modeshape/teiid/cnd/TeiidSql.cnd] and a convenient TeiidSQL [Lexicon constants class|https://github.com/Teiid-Designer/komodo/blob/master/plugins/org.komodo.modeshape.teiid.sql.sequencer/demigen/org/komodo/modeshape/teiid/cnd/TeiidSqlLexicon.java]. The CND has to be plugged into the Sequencer so that it knows the correct NodeTypes from which to create the JcrNodes.
** The class [TeiidNodeFactoryGenerator|https://github.com/Teiid-Designer/komodo/blob/master/plugins/org.komodo.modeshape.teiid.sql.sequencer/demigen/org/komodo/modeshape/teiid/generators/TeiidNodeFactoryGenerator.java] executes standalone, reading in the generated Teiid SQL parser's TeiidSequencingParserTreeConstants class and converting it to a [factory class|https://github.com/Teiid-Designer/komodo/blob/master/plugins/org.komodo.modeshape.teiid.sql.sequencer/demigen/org/komodo/modeshape/teiid/parser/TeiidNodeFactory.java] for use in creating the AstNodes for the sequencing process

Given the generator classes are standalone and executed manually, their generated classes are version-controlled (under the demi-gen folder), whilst the parser (like Teiid) is generated from the jjt template so never checked-in to git.

Should a change to Teiid's BNF be required then the jjt template will be updated and the generator classes executed to update the MS-related components.

> Create custom metadata repository that uses Modeshape
> -----------------------------------------------------
>
>                 Key: TEIID-3260
>                 URL: https://issues.jboss.org/browse/TEIID-3260
>             Project: Teiid
>          Issue Type: Feature Request
>          Components: Server
>    Affects Versions: 8.10
>            Reporter: Van Halbert
>            Assignee: Van Halbert
>
> Create a custom metadata repository implementation that uses ModeShape as the repository for obtaining the VDB metadata for deployment. 



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the teiid-issues mailing list