Prq bulk commands  DS 2019

see    https://jira.duraspace.org/browse/DS-2019

I changed the routine to always return String[];
see 
https://github.com/akinom/DSpace/commit/ded88b728f856a7f560d57e5a929d8fab59fae11
Now it is simpler - and therefor better

As a consequence item values are printed slightly different in the 
bulk-list command, which is fine.

Monika


On Tue Jul  8 02:50:39 2014, Kevin Van de Velde wrote:
> In dspace-api/src/main/java/org/dspace/content/DCValue.java:
>
> > @@ -46,6 +46,29 @@
> >       * @return
> >       */
> >      public String getField() {
> > -        return schema + "." + element + (qualifier==null?"":("." + qualifier));
> > +        return schema + "." + element + (qualifier == null ? "" : ("." + qualifier));
> > +    }
> > +
> > +    public String toString() {
> > +        String str = schema + "." + element;
> > +        if (qualifier != null)
> > +            str = str + "." + qualifier;
> > +        if (language != null && language != "")
> > +            str = str + "[" + language + "]";
> > +        return str + "=" + value;
> > +    }
> > +
> > +    public static Object valuesFor(DCValue[] values) {
>
> Correct me if I'm wrong, but it looks like you can avoid the casting
> of the "Object" for the three cases you describe by returning an array
> of strings. The equivalent of null could be an empty array, the
> equivalent of the single string could be an array with a single
> string. Making it a requirement for people to cast the return type of
> your method will make its use more error prone.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/DSpace/DSpace/pull/560/files#r14638766>.
>

--
Monika Mevenkamp
phone: 609-258-4161
Lewis Library,Washington Road and Ivy Lane, Princeton University, 
Princeton, NJ 08544