Re: [dspace-tech] change the query

2016-09-21 Thread Bruno Nocera Zanette
Well remembered, Luiz! Specially the second point if you're dealing with a Git repository, because it allows you to pull new versions of code without having to deal with code conflicts. I've already used this method to do some customisation on xmlui interface and it worked like a charm. Em qua, 2

Re: [dspace-tech] change the query

2016-09-21 Thread Luiz dos Santos
Hi Dante, The code of Bruno makes senses to me, just return a HaspMap instead the array thing, as Bruno said it will not compile at all, I have two advices for you: 1- Instead change the findItemsMetadataField, create a new method. 2- Create a new class to overload ItemResources,

Re: [dspace-tech] change the query

2016-09-21 Thread Bruno Nocera Zanette
Dante, Even if the query returns more than you need, i wouldn't change it in the first moment. What you really have to change now is the returning line, because this is the line that will create the response for your request. For now it is returning an array of items. You have to change it to retur

Re: [dspace-tech] change the query

2016-09-21 Thread Dante Valencia
Thank you Bruno, I was trying changing the code of dspace 5.2 and its diferent. > @POST > @Path("/find-by-metadata-field") > @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) > public Item[] findItemsByMetadataField(MetadataEntry metadataEntry, > @QueryParam("expand") String

Re: [dspace-tech] change the query

2016-09-18 Thread Bruno Nocera Zanette
Dante, You'll have to alter ItemResource's code on REST api: https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/ItemsResource.java#L903 Specially the line 967. As i'm not a Java specialist i can't help you besides that, but the idea is to return a hash like objec