[jboss-jira] [JBoss JIRA] Updated: (GPD-111) Add ability to forward and reverse map Semantic Elements to/from Dom Node/Xml Adapters jpdl
Matthew Sandoz (JIRA)
jira-events at lists.jboss.org
Wed Jul 25 19:10:47 EDT 2007
[ http://jira.jboss.com/jira/browse/GPD-111?page=all ]
Matthew Sandoz updated GPD-111:
-------------------------------
Attachment: solution.zip
I have updated the classes. as before dont use the com.nexubpm stuff - its just an example. i have also removed the "required" attribute for the mapperClass in the xmlMappings.exsd. this removes the need for any plugin.xml changes. The default mapper if no other is found is the ConfiguredSemanticElementDomMapper.java.
to summarize, the important files are the xmlMappings.exsd, ConfiguredSemanticElementDomMapper, SemanticElementDomMapper, XmlAdapter, XmlAdapterFactory and XmlAdapterRegistry.
Let me know if you need anything else related to this. The changes have enabled us to make lots of really fast progress on our extended version of the editor.
> Add ability to forward and reverse map Semantic Elements to/from Dom Node/Xml Adapters jpdl
> -------------------------------------------------------------------------------------------
>
> Key: GPD-111
> URL: http://jira.jboss.com/jira/browse/GPD-111
> Project: JBoss jBPM GPD
> Issue Type: Feature Request
> Components: jpdl
> Environment: all? :)
> Reporter: Matthew Sandoz
> Assigned To: Koen Aers
> Fix For: jBPM JPDL Designer 3.1.0.CR
>
> Attachments: solution.zip, solution.zip
>
>
> Addresses need to add new semantic elements without adding new xml types. Current mapping forces 1-1 mapping between them.
> this change allows one-to-many mapping between elements by introducing a mapping object for each semantic element.
> this mapping object's responsibility is to determine if a chunk of xml should map to a semantic element and xml adapter or not.
> the xml adapter registry holds a set of these mappers and loops through them all, giving each a chance to accept the xml chunk. all accepting
> mappers are then sorted by priority and the lowest priority number is selected. mappings with no priority are given Integer.MAX priority. Mappings with
> no mapperClass are given a default mapper class of ConfiguredSemanticElementDomMapper so that existing plugin.xml should continue to function
> normally.
> The priority property allows the maintainer of the plugin.xml to change priorities for different circumstances, giving different potentially conflicting mappers
> a specific preference order.
> Details of change:
> Added two elements to xmlMappings.exsd: mapperClass and mapperClassPriority
> Created interface SemanticElementDomMapper to determine if a given Dom Node can be assigned to a semantic element
> Created class ConfiguredSemanticElementDomMapper as a base implementation of the SemanticElementDomMapper. This
> default implementation checks the current configured xml node name against the node name of the passed Dom Node. This should
> duplicate the existing functionality for existing standard jpdl xml node types.
> JythonNodeDomMapper is included as an example but should not be committed to the project as it is for specialized use.
> XmlAdapterRegistry constructs a HashMap of Mappers and has a new getConfigurationElementByNode method.
> XmlAdapter has 2 lines modified in the createSemanticElementFor method to use the new registry method.
> XmlAdapterFactory has modifications in createAdapter and createAdapterFromModel
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list