Thanks Alex, So, say I put a jar on the classpath with Foo and Bar in it: class Foo { public String fooProperty = "defaultText"; public void setFooProperty(String x) {fooProperty = x;} public String serialize() {""" x = new Foo(); x.fooProperty = $fooProperty; x; """;} public Foo fromXWiki(String serialized) {Eval.me(serialized);} } class Bar { public Foo barProperty = new Foo(); } So I could have an XWiki class XwBar with a field barProperty containing text that created a Foo, and while navigating a site that uses an XwBar, deserialize barProperty into a Foo, possibly rinse and repeat with its properties, and then display it some way. Is this what you mean? Travis PS: Above code not tested. It's just for illustration. On Fri, Sep 17, 2010 at 12:48, Alex Busenius <[email protected]> wrote:
I think you can do what you want by defining your recursive data types in Groovy (you'll need programming rights on the wiki) and storing a simplified version of them (e.g. type name and raw text data) in objects of some custom XWiki class. You would just need to have some kind of factory method to create instances of the corresponding Groovy classes from the stored information on load or first access.
Regards, Alex
On 09/17/2010 08:58 PM, Travis Wellman wrote:
Thanks Arnaud, seems like the answer is that XWiki is not capable of this?
From the page you gave me: "XWiki currently supports the following kinds of properties # Number # String # TextArea # Password # Boolean # Static List # Database List # Database Tree List # Date # User List # Group List"
I would have expected one of these options to be "Class". I need to nest types in order to appropriately represent an xml schema.
Thanks anyway, Travis
On Fri, Sep 17, 2010 at 06:45, Arnaud bourree <[email protected]> wrote:
2010/9/16 <[email protected]>:
Hi XWiki people,
I need a "semantic" way to edit xml data. This is a project that could consume a very large portion of my future time, but in the near term I'm looking for a way to get this typed data into a wiki format so that the object graph can be clicked through and offsite links can be managed.
First, I need to be able to have nested types. That is, a class has a field, the type for which is a class I have defined elsewhere. I don't see a way to do this in XWiki. Am I missing something? Seems like a typing system is incomplete without being able to have classes have attributes of defined types.
Travis
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi
Sould be what you search: http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel
Arnaud. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users