Kevin; There's not much to the JSP here, and what you have is on the
right rack, so I think this turns out to be SPARQL/RDF question. The
key is to get to the resource defining the enumeration.
I wasn't real clear on the relationshiop between hasTimeOfDay and the
enumeration, but the following example would get you a list of all
members of oneOf enumerations in your model:
SELECT *
WHERE {
?rsc owl:oneOf ?tod .
?tod list:member ?members
}
If you want to print out the lists as a string, you can use
smf:buildStringFromRDFList, e.g. substituting the following for the
last triple pattern in the above example:
LET (?listStr := smf:buildStringFromRDFList(?tod, "{?member}, "))
-- Scott
On Jun 15, 5:43 pm, Kevin Matthews <[email protected]> wrote:
> I am trying to print the values of an enumeration within a JSP and
> cannot figure it out. Hopefully, somebody can post some example code
> that points me in the right direction.
>
> Here are the details. Let's say I have a class called TestClass that
> includes an enumeration called hasTimeOfDay. hasTimeOfDay can contain
> "morning", "afternoon", or "night". I simply want to print these
> values in a JSP. I have heard of using list:member, or smf:name, but
> I have yet to see any concrete implementations that do this.
>
> So far, this SPARQL statement gives me the possible values of the
> enumeration in the ?object column and property name in the ?subject
> column.
>
> SELECT ?subject ?object
> WHERE {
> ?subject rdfs:domain :Operational_Condition .
> ?subject rdfs:range ?object .
> ?object a owl:DataRange .
>
> }
>
> Within my JSP, I am trying to print out the ?object column using a
> <sparql:out node=...> tag, but it is printing hexidecimal values. I
> believe these are b-nodes. I would be fine just printing out
> "owl:oneOf{"morning", "afternoon", "night"}", but I can't seem to do
> that either.
>
> Any help would be appreciated.
>
> Thanks,
>
> Kevin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---