[xwiki-users] nested types
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
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.
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
xwiki mail is users full of problems can it be trusted? it it always seems too broken and a pile of security risk On Thu, Sep 16, 2010 at 12:00 PM, <[email protected]> wrote:
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
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
On Sat, Sep 18, 2010 at 4:55 AM, <[email protected]> wrote:
xwiki mail is users full of problems can it be trusted?
it it always seems too broken and a pile of security risk
On Thu, Sep 16, 2010 at 12:00 PM, <[email protected]> wrote:
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
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
Yes, something like that. Alex On 09/18/2010 02:59 AM, Travis Wellman wrote:
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
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (5)
-
Alex Busenius -
Arnaud bourree -
tigre119@gmail.com -
Travis Wellman -
travis@archive.org