Login  Register

Re: Re: Re: Output to Fedora rather than eXist?

Posted by Ethan Gruber on Mar 21, 2011; 5:40pm
URL: https://discuss.orbeon.com/Output-to-Fedora-rather-than-eXist-tp3393755p3394246.html

The other XHTML files have similar XForms submissions.  You will probably have to enable HTTP authentication (by default, EADitor posts the data to eXist with a guest account that has no password).  See http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions#TOC-HTTP-authentication for using xxforms:username and xxforms:password

I haven't tested this with Fedora, but if you set your action to point to Fedora's REST API with the proper authentication, it should work.  One of my colleagues at the University of Virginia Library was able to get Brown University's MODS editor to interact with Fedora and there are a handful of other libraries I know of using Orbeon with Fedora.  See http://journal.code4lib.org/articles/3916 for more info about a few active projects.

Ethan

On Mon, Mar 21, 2011 at 1:30 PM, Tyler Mobley <[hidden email]> wrote:

Well, you were right about the xforms. I snooped through EAditor's files and in upload.xhtml and delete.xhtml I found these respective snippets:

<xforms:submission id="put-to-exist" method="put" replace="none"
                               ref="instance('new-guide')"
                               action="/exist/rest/db/eaditor/guides/{instance('new-guide')/@id}.xml">
                               <xforms:message ev:event="xforms-submit-error" level="modal">Error in writing file
                                       to eXist.</xforms:message>
                               <xforms:setvalue ev:event="xforms-submit-done" ref="instance('status')">File
                                       successfully uploaded.</xforms:setvalue>
</xforms:submission>


<xforms:submission id="delete-submission"
                               action="/exist/rest/db/eaditor/guides/{instance('id')}.xml" method="delete" replace="none">
                               <!--<xforms:send ev:event="xforms-submit-done" submission="delete-from-solr"/>-->
                               <xforms:setvalue ev:event="xforms-submit-done" ref="instance('status')">File
                               successfully deleted.</xforms:setvalue>
                               <xforms:send ev:event="xforms-submit-done" submission="delete-from-solr"/>
                               <xforms:toggle case="deleted" ev:event="xforms-submit-done"/>
</xforms:submission>

I'm guessing this is what I'll need to modify for Fedora. Do you imagine I'd need to look for some other snippets elsewhere, or is this likely to cover it? Now, I just need to acquaint myself with Fedora's api to see how to change this! I'll update if I make some progress.



On Mar 21, 2011, at 1:10 PM, Tom Grahame wrote:

> Tyler,
>
> I would recommend cutting out eXist (there's nothing wrong with it, you just
> don't need it) and using Fedora's REST API directly.
>
> I don't know anything about EADitor apart from what's on the project page
> intro, but I would guess that at some point it makes an HTTP PUT or maybe
> POST to eXist to store data. I would start by finding out more precisely how
> EADitor does that data exchange and modifying it for Fedora - the chances
> are since this is all REST (or should be) the mechanics will be fairly
> similar. It will probably occur from within an XForms page or an Orbeon
> pipeline inside EADitor when you... click a button?
>
> So, where does that write operation begin and what does it do? Start there
> and please post back how you get on.
>
> Good luck,
>
> Tom
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Output-to-Fedora-rather-than-eXist-tp3393755p3394170.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws