jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Bologna" <alessandro.bolo...@gmail.com>
Subject Modeling data types
Date Thu, 01 Feb 2007 18:43:44 GMT

is there a recommended way to model an "enum", or a "set". For instance, if
color is defined as {red, green, blue} how can I represent it in terms of
JSR-170 structures?
I experimented with using a string property and constraints, but it seems
that changing the constraints does not affect the node (in other words, if I
change "red" to "yellow", my node still has "red").

I can imagine that one way could be to use an "enum" node, with same name
siblings "values" nodes attached, and then use references, but it seems a
bit convoluted. Is there another way? Another problem is that the "enum"
should be part of the node type definition, and how would that work with
references? Can the reference be constrained to point to a specific "enum"
instance? Say, the node type "Window" has a "color" reference that points to
the single "enum" instance "colors".

Alessandro Bologna

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message