RavenclawDev: returning frame from a back end
Svetlana Stenchikova
svetastenchikova at gmail.com
Wed Oct 11 15:31:54 EDT 2006
Do you think it is possible to return a structure from a java back-end in a
format expected by RavenClaw?
If so, could you please recomment how, and if not, could someone point to
the place in RavenClaw that I could modify to work around this issue?
I am sorry to bother you with this question, but we have a demo coming up
and listing the events is one of the essential functionality that we wanted
to show.
Thank you all for your help!
Svetlana
On 10/10/06, Svetlana Stenchikova <svetastenchikova at gmail.com> wrote:
>
> Thanks Dan,
>
> this generally makes sense, but I am not sure how to do this in the java
> server.
>
> The operation function in the java galaxy service returns a GFrame.
>
> I can set properties of this frame in any way, but I must return a GFrame,
> I think. I tried declaring an operation that returns String and it causes
> runtime exception:
> java.lang.ClassCastException: java.lang.String
>
>
> This is how a RoomLine return from a perl back end looks like:
>
> {
> suggested_refine none
> error false
> results :1
> {
> {
> date_time {
> time {
> start_time 1700
> end_time 1800
> }
> date {
> valid_date true
> year 2006
> month 10
> day 11
> weekday 3
> }
> }
> room_size 30
> room_projector true
> room_whiteboard true
> room_computer true
> room_network true
> room_location Wean Hall
> room_size_spec large
> room_number 4625
> }
> }
> }
>
>
> And here is how my java back end frame looks like:
>
> Server environment sending frame:
> {c java_be.add_event
> error "false"
> :hub_opaque_data {c admin_info
> :reply_requested 1
> :session_id "Default"
> :tidx 70
> :scriptless 1
> :timestamp [array: type GAL_FLOAT_64, 1 elements]
> :provider_id "[8]"
> :invoked_stype "java_be" } }
>
> Please make a suggestion on how to return a string from a java server.
>
> thank you,
> Svetlana
>
> On 10/10/06, Dan Bohus <dbohus at cs.cmu.edu> wrote:
> >
> > Hi Svetlana,
> >
> >
> >
> > I think this is the same problem with "Ravenclaw frames" and "galaxy
> > frames" but on the output side. Basically what you're doing in the code
> > below is constructing a galaxy frame. Instead ravenclaw expects a single
> > string in that galaxy frame which contains the information in a single
> > string in the "string Ravenclaw frame" format…
> >
> >
> >
> > If this message is too cryptic, let me know and I can send you more
> > details,
> >
> > Dan
> >
> >
> > ------------------------------
> >
> > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:
> > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] * On Behalf Of *Svetlana
> > Stenchikova
> > *Sent:* Tuesday, October 10, 2006 5:41 PM
> > *To:* ravenclaw-developers at cs.cmu.edu
> > *Subject:* RavenclawDev: returning frame from a back end
> >
> >
> >
> > Hi,
> >
> > How should a back-end function of a ravenclaw dialog manager format a
> > frame?
> >
> > For example, I am expecting to get a "error" parameter from:
> >
> > CALL("java_be.add_event <event_add error>backend_error")
> >
> > backend_error is declared as:
> > BOOL_SYSTEM_CONCEPT(backend_error)
> >
> > In the java back-end:
> >
> > public GFrame serverOpAddEvent(GFrame f) {
> > ...
> >
> > GFrame eventAdded = new Clause("event_add");
> >
> > eventAdded.setProperty("error", "false");
> >
> > return eventAdded;
> > }
> >
> >
> > But the backend_error in DM does not get initialized.
> >
> > Is there a particular way that the return GFrame from the backend server
> > has to be generated?
> >
> > Thank you,
> > Svetlana
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/30e32089/attachment.html
More information about the Ravenclaw-developers
mailing list