[Dspace-tech] URL REST Call to return XML

2015-06-11 Thread Hicham Zahnan
Hi,

I'm using a Drupal Module called DSpace, that requires a REST URL to return XML.
My problem is when I use the REST URL i.e. 
(www.abcd.com/rest/communities/6/itemshttp://www.abcd.com/rest/communities/6/items),
 into a browser I sometimes get JSON or XML, depending on the browser. Because 
its returning a JSON, its causing the module not to work. So is there a way to 
only get XML through http REST request?

We are using DSpace 5.2

Thank you,
Hicham
--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] URL REST Call to return XML

2015-06-11 Thread Alan Orth
You need to set the Accept HTTP header to tell the REST API which format
you want. From the command line you can do it like this:

$ curl -s -H Accept: application/xml
http://localhost:8080/rest/communities

I'm not familiar with the DSpace module for Drupal though, so I'm not sure
if it allows you to configure request headers...

Alan

On Thu, Jun 11, 2015 at 1:11 PM, Hicham Zahnan h...@aub.edu.lb wrote:

 Hi,



 I’m using a Drupal Module called DSpace, that requires a REST URL to
 return XML.

 My problem is when I use the REST URL i.e. (
 www.abcd.com/rest/communities/6/items), into a browser I sometimes get
 JSON or XML, depending on the browser. Because its returning a JSON, its
 causing the module not to work. So is there a way to only get XML through
 http REST request?



 We are using DSpace 5.2



 Thank you,

 Hicham


 --

 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




-- 
Alan Orth
alan.o...@gmail.com
https://alaninkenya.org
https://mjanja.ch
In heaven all the interesting people are missing. -Friedrich Nietzsche
GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0
--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] How to search items by metadata using REST API?

2015-06-11 Thread Alan Orth
Thanks. It seems my query is well formed but it returns an HTTP 405 Method
Not Allowed response. Perhaps DSpace 4.x's REST API isn't sufficient for
the find-by-metadata-field query. Or perhaps I need to log in as you
illustrated here:

https://github.com/BrunoNZ/dspace-rest-requests

I guess I'll fork that repo and give this a more structured test. I already
found some syntax and usability bugs there (mixing sh and bash, not reading
the sourced variables, etc).

Alan

On Wed, Jun 10, 2015 at 8:30 PM, Bruno Zanette brunonzane...@gmail.com
wrote:

 Hey Alan,
 Take a look at the commentaries on the REST-API's documentation's page.
 I've answered a similar question there.

 https://wiki.duraspace.org/display/DSDOC5x/REST+API?focusedCommentId=68068154#comment-68068154

 But basically, the request that you have to send is something like this:
 curl -k -4 -H accept: application/json -H Content-Type:
 application/json -X POST 
 https://demo.dspace.org/rest/items/find-by-metadata-field; -d '{key:
 dc.title,value: Test Webpage,language: en_US}'

 Em qua, 10 de jun de 2015 às 14:08, Alan Orth alan.o...@gmail.com
 escreveu:

 Hey,

 I'm using DSpace 4.3 and trying to search for items matching certain
 metadata. The REST API docs on GitHub[0] mention that you can POST to
 `rest/items/find-by-metadata-field`, but it doesn't give any more
 information than that (like how to specify query parameters).

 I've tried several variations of the following:

 $ http --print Hhb POST '
 http://localhost:8080/rest/items/find-by-metadata-field'
 dc.subject=LACTATION

 It always returns with an HTTP 405. What is the proper way to use this?
 Does the POST require I login first or something?

 Thanks,

 [0] https://github.com/DSpace/DSpace/tree/master/dspace-rest

 --
 Alan Orth
 alan.o...@gmail.com
 https://alaninkenya.org
 https://mjanja.ch
 In heaven all the interesting people are missing. -Friedrich Nietzsche
 GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0

 --
 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




-- 
Alan Orth
alan.o...@gmail.com
https://alaninkenya.org
https://mjanja.ch
In heaven all the interesting people are missing. -Friedrich Nietzsche
GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0
--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] Send email Christian David Criollo

2015-06-11 Thread Cristian David Criollo Lopez


[Descripción: logo_correos]

Christian David Criollo Lopez
Analista-Programador Jr
SYRI-Desarrollo
Servicios y Recursos de Informaciónhttp://www.icesi.edu.co/servicios_apoyo
Universidad Icesihttp://www.icesi.edu.co/
Tel: +57 (2) 555 2334 ext. 8749




Este documento puede contener información privilegiada o confidencial. Por 
tanto, usar esta información y sus anexos para propósitos ajenos a los de la 
Universidad Icesi, divulgarla a personas a las cuales no se encuentre destinado 
este correo o reproducirla total o parcialmente, se encuentra prohibido en 
virtud de la legislación vigente. La universidad no asumirá responsabilidad 
sobre información, opiniones o criterios contenidos en este correo que no estén 
directamente relacionados con la Icesi. La Universidad no garantiza la 
transmisión de mensajes electrónicos en forma segura y libre de errores debido 
a que la información puede ser interceptada, manipulada, dañada o destruida. Si 
usted no es el destinatario autorizado o por error recibe este mensaje, por 
favor informe al remitente y posteriormente bórrelo de su sistema sin conservar 
copia del mismo. En caso de no querer continuar recibiendo estas comunicaciones 
por favor envié un correo electrónico a midatoperso...@icesi.edu.co . Para 
mayor información Usted puede consultar las políticas de la Universidad Icesi 
sobre la custodia y el manejo seguro y confidencial de Datos Personales a 
través del sitio web www.icesi.edu.co
--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] Problem with Search Result display in Mirage2 theme

2015-06-11 Thread George Stanley Kozak
Hi…

I am not sure if this has already been reported, but I found something strange 
with my DSpace 5.2 install which I have in development and am planning to move 
to production.
I am using the XMLUI with Mirage2 theme.

I found that in the search results display, if there is no abstract, the system 
displays random information.

For instance:

Pellegrini Vineyards
Hearn, Russell (2008)
stream_source_info Hearn_PellegriniVineyards_WIWP_2008.pdf.txt 
stream_content_type text/plain stream_size 2036 Content-Encoding UTF-8 
stream_name Hearn_PellegriniVineyards_WIWP_2008.pdf.txt Content-Type 
text/plain; charset=UTF-8...
Pellegrini Vineyards 4/30/08 Pellegrini Vineyards •  FIRST VINTAGE: 1991 •  
OPERATED BY: Bob and Joyce Pellegrini •  WINEMAKER: Russell Hearn •  WINES: •  
East End Select- Chardonnay, Rosé, Merlot •  Pellegrini Vineyards- Chardonnay, 
Merlot...

If I add an abstract to the item, then the search displays changes to:

Pellegrini Vineyards
Hearn, Russell (2008)
Added abstract here…

Has anyone else seen this?  Does anyone know what is going on or where I can go 
to fix this?

George Kozak
Digital Library Specialist
Cornell University Library Information Technologies (CUL-IT)
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924



--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] Is it possible to delete exact bitstream?

2015-06-11 Thread IdeaFix
Hi.

 

I have a problem with dspace celanup. May be it is very old problem, but I
found it only after update to 5.2. When I make dspace cleanup -v or
analyse logs I see an error with exact bitstream order. It is an sql error.
When I edit an item (via web interface) and save it, I can make dspace
cleanup and delete bitstream. But now I have some broken bitstreams
winhout items (it was deleted).

 

I update dspace from 1.7 to 1.8.3, to 3.4 and to 5.2. It may be an old
error.

 

Database passes all tests.

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] Browse by Titles in Dspace 5.2

2015-06-11 Thread Layale Bassil
Hello All,

When I browse by Title from the right panel I do not get any result. However 
the search dspace section is working properly.

But if I try to seach for a title from under the Browse section by Titles for 
example, I get a result showing x of but none is displayed.

What is the reason for such a behavior?

Thanks!

Regards.

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] How to search items by metadata using REST API?

2015-06-11 Thread Alan Orth
Ah, it seems the `/rest/items/find-by-metadata-field` endpoint doesn't
exist in DSpace 4.x. Neither does the `/rest/login` endpoint. The docs need
to make more of a point to say which versions these are supposed to work
in... ;)

Alan

On Thu, Jun 11, 2015 at 12:24 PM Alan Orth alan.o...@gmail.com wrote:

 Thanks. It seems my query is well formed but it returns an HTTP 405
 Method Not Allowed response. Perhaps DSpace 4.x's REST API isn't
 sufficient for the find-by-metadata-field query. Or perhaps I need to log
 in as you illustrated here:

 https://github.com/BrunoNZ/dspace-rest-requests

 I guess I'll fork that repo and give this a more structured test. I
 already found some syntax and usability bugs there (mixing sh and bash, not
 reading the sourced variables, etc).

 Alan

 On Wed, Jun 10, 2015 at 8:30 PM, Bruno Zanette brunonzane...@gmail.com
 wrote:

 Hey Alan,
 Take a look at the commentaries on the REST-API's documentation's page.
 I've answered a similar question there.

 https://wiki.duraspace.org/display/DSDOC5x/REST+API?focusedCommentId=68068154#comment-68068154

 But basically, the request that you have to send is something like this:
 curl -k -4 -H accept: application/json -H Content-Type:
 application/json -X POST 
 https://demo.dspace.org/rest/items/find-by-metadata-field; -d '{key:
 dc.title,value: Test Webpage,language: en_US}'

 Em qua, 10 de jun de 2015 às 14:08, Alan Orth alan.o...@gmail.com
 escreveu:

 Hey,

 I'm using DSpace 4.3 and trying to search for items matching certain
 metadata. The REST API docs on GitHub[0] mention that you can POST to
 `rest/items/find-by-metadata-field`, but it doesn't give any more
 information than that (like how to specify query parameters).

 I've tried several variations of the following:

 $ http --print Hhb POST '
 http://localhost:8080/rest/items/find-by-metadata-field'
 dc.subject=LACTATION

 It always returns with an HTTP 405. What is the proper way to use this?
 Does the POST require I login first or something?

 Thanks,

 [0] https://github.com/DSpace/DSpace/tree/master/dspace-rest

 --
 Alan Orth
 alan.o...@gmail.com
 https://alaninkenya.org
 https://mjanja.ch
 In heaven all the interesting people are missing. -Friedrich Nietzsche
 GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0

 --
 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




 --
 Alan Orth
 alan.o...@gmail.com
 https://alaninkenya.org
 https://mjanja.ch
 In heaven all the interesting people are missing. -Friedrich Nietzsche
 GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] URL REST Call to return XML

2015-06-11 Thread Bruno Zanette
Hicham,
Good Question...

The only method i know that fix it is the one that Alan said. The request
is made directly by URL or there is a middleware between your app and the
browser?

Em qui, 11 de jun de 2015 às 08:01, Alan Orth alan.o...@gmail.com
escreveu:

 You need to set the Accept HTTP header to tell the REST API which format
 you want. From the command line you can do it like this:

 $ curl -s -H Accept: application/xml
 http://localhost:8080/rest/communities

 I'm not familiar with the DSpace module for Drupal though, so I'm not sure
 if it allows you to configure request headers...

 Alan

 On Thu, Jun 11, 2015 at 1:11 PM, Hicham Zahnan h...@aub.edu.lb wrote:

 Hi,



 I’m using a Drupal Module called DSpace, that requires a REST URL to
 return XML.

 My problem is when I use the REST URL i.e. (
 www.abcd.com/rest/communities/6/items), into a browser I sometimes get
 JSON or XML, depending on the browser. Because its returning a JSON, its
 causing the module not to work. So is there a way to only get XML through
 http REST request?



 We are using DSpace 5.2



 Thank you,

 Hicham


 --

 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




 --
 Alan Orth
 alan.o...@gmail.com
 https://alaninkenya.org
 https://mjanja.ch
 In heaven all the interesting people are missing. -Friedrich Nietzsche
 GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0

 --
 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] URL REST Call to return XML

2015-06-11 Thread Peter Dietz
Hi Hicham,

Princeton's Drupal module for DSpace is not compatible with the current
version of DSpace. The Drupal Module is designed to use the 2011 Google
Summer of Code REST API. The 2011 GSoC REST API was never merged into the
core of DSpace, instead a Jersey based REST API was built. So, the Drupal
Module would need to be updated to work with the new API.


Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809

On Thu, Jun 11, 2015 at 7:01 AM, Alan Orth alan.o...@gmail.com wrote:

 You need to set the Accept HTTP header to tell the REST API which format
 you want. From the command line you can do it like this:

 $ curl -s -H Accept: application/xml
 http://localhost:8080/rest/communities

 I'm not familiar with the DSpace module for Drupal though, so I'm not sure
 if it allows you to configure request headers...

 Alan

 On Thu, Jun 11, 2015 at 1:11 PM, Hicham Zahnan h...@aub.edu.lb wrote:

 Hi,



 I’m using a Drupal Module called DSpace, that requires a REST URL to
 return XML.

 My problem is when I use the REST URL i.e. (
 www.abcd.com/rest/communities/6/items), into a browser I sometimes get
 JSON or XML, depending on the browser. Because its returning a JSON, its
 causing the module not to work. So is there a way to only get XML through
 http REST request?



 We are using DSpace 5.2



 Thank you,

 Hicham


 --

 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




 --
 Alan Orth
 alan.o...@gmail.com
 https://alaninkenya.org
 https://mjanja.ch
 In heaven all the interesting people are missing. -Friedrich Nietzsche
 GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0


 --

 ___
 DSpace-tech mailing list
 DSpace-tech@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dspace-tech
 List Etiquette:
 https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] delete bitstream

2015-06-11 Thread IdeaFix
I have a problem with dspace celanup. May be it is very old problem, but I
found it only after update to 5.2. When I make dspace cleanup -v or
analyse logs I see an error with exact bitstream order. It is an sql error.
When I edit an item (via web interface) and save it, I can make dspace
cleanup and delete bitstream. But now I have some broken bitstreams
winhout items (it was deleted).
 
I update dspace from 1.7 to 1.8.3, to 3.4 and to 5.2. It may be an old
error.
 
Database passes all tests.

 

Now I have link http://127.0.0.1/retrieve/15834 and filename.

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] Anonymous User Submit?

2015-06-11 Thread Bob Arko
Greetings,

I'd like to accept content from folks who self-register.
How may I enable an Anonymous User to submit?
I've tried setting the appropriate ADD policy for Group=Anonymous
on my Community and Collection, but still get
You are not authorized to submit to any collections.
I'm running 5.1 JSPUI.
(I've checked the Manual and FAQ.)

Much thanks,
Bob

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette


[Dspace-tech] Issue with form selection when using the BTE submission lookup

2015-06-11 Thread Genevieve Turner
Hi All,

While doing an upgrade for our DSpace environment to version 4.2 I came across 
an issue where for the BTE submission lookup was only using fields defined in 
the default form (as defined in input-forms.xml).  As the system only records 
the fields that have been defined in the input form this is problematic.  I 
found that the source of the issue is that the 'getInputs' method expects a 
collection handle rather than a form name which is what is being sent.  This is 
certainly still an issue in version 5.

To fix this issue I changed the following:
In org.dspace.submit.lookup.DSpaceWorkspaceItemOutputGenerator:

private DCInput getDCInput(String formName, String schema, String element,
String qualifier) throws DCInputsReaderException
{
DCInputSet dcinputset = new DCInputsReader().getInputs(formName);
...

To:

private DCInput getDCInput(String formName, String schema, String element,
String qualifier) throws DCInputsReaderException
{
DCInputSet dcinputset = new 
DCInputsReader().getInputsForForm(formName);
...


In org.dspace.app.util.DCInputsReader:

public DCInputSet getInputs(String collectionHandle)
throws DCInputsReaderException
{
String formName = whichForms.get(collectionHandle);
if (formName == null)
{
formName = whichForms.get(DEFAULT_COLLECTION);
}
...

To:
public DCInputSet getInputs(String collectionHandle)
throws DCInputsReaderException
{
String formName = whichForms.get(collectionHandle);
return getInputsForForm(formName);
}

public DCInputSet getInputsForForm(String formName)
throws DCInputsReaderException
{
if (formName == null)
{
formName = whichForms.get(DEFAULT_COLLECTION);
}
...

I'm not sure what the process is to get this fixed in the code base/get a JIRA 
issue raised but if I need to do anything please let me know.

Regards,

Genevieve

--
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette