You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michael Vorburger (Created) (JIRA)" <ji...@apache.org> on 2011/11/06 13:32:51 UTC
[jira] [Created] (BEANUTILS-406) DynaClassReader to read DynaClass
definitions from a "DSL"
DynaClassReader to read DynaClass definitions from a "DSL"
----------------------------------------------------------
Key: BEANUTILS-406
URL: https://issues.apache.org/jira/browse/BEANUTILS-406
Project: Commons BeanUtils
Issue Type: New Feature
Components: DynaBean
Affects Versions: 1.8.3
Reporter: Michael Vorburger
It could sometimes be very useful to create DynaClass definitions not only programmatically (as is possible today), but to define data structures in some textual format (a "DSL"), and load that into DynaClass/DynaProperty and create DynaBeans from that.
This isn't very hard to add to BeanUtils (I've done it and will attach a patch) and would allow the following usage, given:
{noformat}Address {
zip: java.lang.Long
}
Employee {
firstName : java.lang.String
lastName :java.lang.String
mainAddress : Address
boss : Employee
subordinates : Employee *
address : Address <>
}{noformat}
one could then use the new proposed DynaClassReader like so:
{noformat}DynaClassReader r = new DynaClassReader();
r.readClasspathResource("/DynaClassReaderTest.domain.txt");
DynaClass klass = r.getDynaClass("Employee");
{noformat}
This requires BEANUTILS-405.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (BEANUTILS-406) DynaClassReader to read
DynaClass definitions from a "DSL"
Posted by "Michael Vorburger (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BEANUTILS-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145100#comment-13145100 ]
Michael Vorburger commented on BEANUTILS-406:
---------------------------------------------
This would probably still need a few lines of new doc about it in the src\main\java\overview.html (like I've provided for BEANUTILS-405 & BEANUTILS-407).
> DynaClassReader to read DynaClass definitions from a "DSL"
> ----------------------------------------------------------
>
> Key: BEANUTILS-406
> URL: https://issues.apache.org/jira/browse/BEANUTILS-406
> Project: Commons BeanUtils
> Issue Type: New Feature
> Components: DynaBean
> Affects Versions: 1.8.3
> Reporter: Michael Vorburger
> Attachments: 0002-BEANUTILS-406-DynaClassReader-to-read-DynaClass-defi.patch
>
>
> It could sometimes be very useful to create DynaClass definitions not only programmatically (as is possible today), but to define data structures in some textual format (a "DSL"), and load that into DynaClass/DynaProperty and create DynaBeans from that.
> This isn't very hard to add to BeanUtils (I've done it and will attach a patch) and would allow the following usage, given:
> {noformat}Address {
> zip: java.lang.Long
> }
> Employee {
> firstName : java.lang.String
> lastName :java.lang.String
>
> mainAddress : Address
> boss : Employee
> subordinates : Employee *
> address : Address <>
> }{noformat}
> one could then use the new proposed DynaClassReader like so:
> {noformat}DynaClassReader r = new DynaClassReader();
> r.readClasspathResource("/DynaClassReaderTest.domain.txt");
> DynaClass klass = r.getDynaClass("Employee");
> {noformat}
> This requires BEANUTILS-405.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (BEANUTILS-406) DynaClassReader to read DynaClass
definitions from a "DSL"
Posted by "Michael Vorburger (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BEANUTILS-406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Vorburger updated BEANUTILS-406:
----------------------------------------
Attachment: 0002-BEANUTILS-406-DynaClassReader-to-read-DynaClass-defi.patch
Attached proposed patch. This builds on top of the two patches in BEANUTILS-405.
Same also on https://github.com/vorburger/apache-commons-beanutils/commits/domain-file-reader - would be easier to contribute via BEANUTILS-404 ... ;-)
> DynaClassReader to read DynaClass definitions from a "DSL"
> ----------------------------------------------------------
>
> Key: BEANUTILS-406
> URL: https://issues.apache.org/jira/browse/BEANUTILS-406
> Project: Commons BeanUtils
> Issue Type: New Feature
> Components: DynaBean
> Affects Versions: 1.8.3
> Reporter: Michael Vorburger
> Attachments: 0002-BEANUTILS-406-DynaClassReader-to-read-DynaClass-defi.patch
>
>
> It could sometimes be very useful to create DynaClass definitions not only programmatically (as is possible today), but to define data structures in some textual format (a "DSL"), and load that into DynaClass/DynaProperty and create DynaBeans from that.
> This isn't very hard to add to BeanUtils (I've done it and will attach a patch) and would allow the following usage, given:
> {noformat}Address {
> zip: java.lang.Long
> }
> Employee {
> firstName : java.lang.String
> lastName :java.lang.String
>
> mainAddress : Address
> boss : Employee
> subordinates : Employee *
> address : Address <>
> }{noformat}
> one could then use the new proposed DynaClassReader like so:
> {noformat}DynaClassReader r = new DynaClassReader();
> r.readClasspathResource("/DynaClassReaderTest.domain.txt");
> DynaClass klass = r.getDynaClass("Employee");
> {noformat}
> This requires BEANUTILS-405.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (BEANUTILS-406) DynaClassReader to
read DynaClass definitions from a "DSL"
Posted by "Michael Vorburger (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BEANUTILS-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145100#comment-13145100 ]
Michael Vorburger edited comment on BEANUTILS-406 at 11/6/11 8:56 PM:
----------------------------------------------------------------------
This would probably still need a few lines of new doc about it in the src\main\java\org\apache\commons\beanutils\package.html (like I've provided for BEANUTILS-405 & BEANUTILS-407).
was (Author: vorburger):
This would probably still need a few lines of new doc about it in the src\main\java\overview.html (like I've provided for BEANUTILS-405 & BEANUTILS-407).
> DynaClassReader to read DynaClass definitions from a "DSL"
> ----------------------------------------------------------
>
> Key: BEANUTILS-406
> URL: https://issues.apache.org/jira/browse/BEANUTILS-406
> Project: Commons BeanUtils
> Issue Type: New Feature
> Components: DynaBean
> Affects Versions: 1.8.3
> Reporter: Michael Vorburger
> Attachments: 0002-BEANUTILS-406-DynaClassReader-to-read-DynaClass-defi.patch
>
>
> It could sometimes be very useful to create DynaClass definitions not only programmatically (as is possible today), but to define data structures in some textual format (a "DSL"), and load that into DynaClass/DynaProperty and create DynaBeans from that.
> This isn't very hard to add to BeanUtils (I've done it and will attach a patch) and would allow the following usage, given:
> {noformat}Address {
> zip: java.lang.Long
> }
> Employee {
> firstName : java.lang.String
> lastName :java.lang.String
>
> mainAddress : Address
> boss : Employee
> subordinates : Employee *
> address : Address <>
> }{noformat}
> one could then use the new proposed DynaClassReader like so:
> {noformat}DynaClassReader r = new DynaClassReader();
> r.readClasspathResource("/DynaClassReaderTest.domain.txt");
> DynaClass klass = r.getDynaClass("Employee");
> {noformat}
> This requires BEANUTILS-405.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira