Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Jan Åge Lavik
Hi Esteban!

With the None approach, it fear it can get confusing when iterating over
all authors (or whatever other field) as one then get None into the mix. If
one really wants to get the first author, maybe calling first_author
(where first_author is a direct lookup to _first_author) is enough and
then expecting a None or empty list is alright? I dunno, it seems to me
that when asking for give me all the authors, None does not belong there
with John Ellis.

Cheers,
Jan

Cheers,
Jan

---
Jan Age Lavik
System Developer
INSPIRE-HEP http://inspirehep.net

Github: @jalavik https://github.com/jalavik
Work phone: +41 22 76 78682


On Thu, Mar 27, 2014 at 3:38 PM, Esteban Gabancho 
esteban.jose.garcia.gaban...@cern.ch wrote:

 Hey guys!

 I have a question about the aggregation of several fields into one.

 Taking the example of the authors, lets say I have two fields
 `_first_author` and `_additional_authors` and I want to aggregate then into
 `authors`.
 The common case, and the easiest, is when I have one `_first_author` and
 cero or more `_additional_authors`, in which case I just put a list with
 the authors (what else right? :-)
 The problem, or the question, comes when I don’t have a `_first_author` in
 which case I’m not sure about the content of the `authors` field, it could
 be i) only the list of `_additional_authors` or ii) `None` follow by the
 the list of `_additional_authors`.

 I think the second solution is the closest one to reality, the `None`
 express that the record doesn’t have a first author. And I also think that
 we could apply this solution for other cases where we have this kind of
 situation (like with the `110__` and `710__`).

 What do you think?
 Lars, as you have already pu in production, how do you deal with this
 problem?

 Cheers,
 --
 Esteban J. G. Gabancho




Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Alexander Wagner

On 27.03.2014 15:38, Esteban Gabancho wrote:

Hi!


I think the second solution is the closest one to reality, the `None` express 
that the record doesn’t have a first author. And I also think that we could 
apply this solution for other cases where we have this kind of situation (like 
with the `110__` and `710__`).

What do you think?


If I may: as a librarian you have a 100. You may not have a 700, but in
case you have only one author it is 100 by definition.

You always have to read Marc with the cataloging rulebook in mind.
(AACR*, RAK, what have you.)

Still one should handle a cataloguing error.

--

Kind regards,

Alexander Wagner
Scientific Services / Scientific Publishing
Central Library
52425 Juelich

mail : a.wag...@fz-juelich.de
phone: +49 2461 61-1586
Fax  : +49 2461 61-6103
http://www.fz-juelich.de/zb/wp




Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt





Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Ferran Jorba
Hello Alexander, Esteban et al,

Alexander Wagner a.wag...@fz-juelich.de wrote:
 
 On 27.03.2014 15:38, Esteban Gabancho wrote:

 I think the second solution is the closest one to reality, the `None`
 express that the record doesn’t have a first author. And I also think
 that we could apply this solution for other cases where we have this
 kind of situation (like with the `110__` and `710__`).

 What do you think?

 If I may: as a librarian you have a 100. You may not have a 700, but
 in case you have only one author it is 100 by definition.

[to the non librarians in the crowd; Alexander knows it already]

Or a 110, or a 111, I'd like to remind.  An author is not only a 100
(personal author), but it may be a corporate one (110) or a conference
(111).  And please, don't forget that any of those tags may have
arbitrary values as indicators.

Best regards,

Ferran


Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Lars Holm Nielsen

On 27.03.2014 15:38, Esteban Gabancho wrote:

Hey guys!

I have a question about the aggregation of several fields into one.

Taking the example of the authors, lets say I have two fields `_first_author` 
and `_additional_authors` and I want to aggregate then into `authors`.
The common case, and the easiest, is when I have one `_first_author` and cero 
or more `_additional_authors`, in which case I just put a list with the authors 
(what else right? :-)
The problem, or the question, comes when I don’t have a `_first_author` in 
which case I’m not sure about the content of the `authors` field, it could be 
i) only the list of `_additional_authors` or ii) `None` follow by the the list 
of `_additional_authors`.

I think the second solution is the closest one to reality, the `None` express 
that the record doesn’t have a first author. And I also think that we could 
apply this solution for other cases where we have this kind of situation (like 
with the `110__` and `710__`).


In Zenodo i'm just interested in the list of authors, and the first in 
the list is by definition the first author. The first author/additional 
authors are somehow an artifact of having to store in MARC as master 
format. I'm not sure what we would be the most appropriate solution.


Cheers,
Lars




What do you think?
Lars, as you have already pu in production, how do you deal with this problem?

Cheers,
--
Esteban J. G. Gabancho




--
Lars Holm Nielsen
CERN, IT Department, Collaboration  Information Services
http://zenodo.org | Tel: +41 22 76 79182 | Cel: +41 76 672 8927




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Esteban Gabancho
Hi Jan!

On 27 Mar 2014, at 16:02, Jan Åge Lavik jan.age.la...@cern.ch wrote:
 With the None approach, it fear it can get confusing when iterating over all 
 authors (or whatever other field) as one then get None into the mix. If one 
 really wants to get the first author, maybe calling first_author (where 
 first_author is a direct lookup to _first_author) is enough and then 
 expecting a None or empty list is alright? I dunno, it seems to me that when 
 asking for give me all the authors, None does not belong there with John 
 Ellis.

I understand (and share) your opinion, currently in the templates we are just 
iterating over the full list of authors and maybe we should start using the 
other keys. 
Lets see what the others think about this, although this is something that each 
Invenio instance should do with their data model definition.

Cheers,
--
Esteban J. G. Gabancho

Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Wagner, Alexander
Hi Lars!

Be careful with this general simplified notion.

In some areas of research author ordering can cause sort of religious wars. And 
I may also add that depending on the area of research, the question I want all 
my papers, but only those where I am the first author is /very/ common. Up to 
the notion my papers == only those where I am the first author == only those 
count at all.

So, a destinction of 1xx/7xx (of course Ferran is right about the other fields) 
is really important as is the ordering field $b.

--
Kind regards,

Alexander Wagner

Subject Specialist
Central Library
52425 Juelich

mail : a.wag...@fz-juelich.de
phone: +49 2461 61-1586
Fax  : +49 2461 61-6103
www.fz-juelich.de/zb/DE/zb-fi


- Reply message -
From: Lars Holm Nielsen lars.holm.niel...@cern.ch
Date: Thu, Mar 27, 2014 17:08
Subject: [pu jsonalchemy] Aggregation of several fields into now
To: Esteban Gabancho esteban.jose.garcia.gaban...@cern.ch
Cc: project-invenio-devel (Invenio developers mailing-list) 
project-invenio-devel@cern.ch

On 27.03.2014 15:38, Esteban Gabancho wrote:
 Hey guys!

 I have a question about the aggregation of several fields into one.

 Taking the example of the authors, lets say I have two fields `_first_author` 
 and `_additional_authors` and I want to aggregate then into `authors`.
 The common case, and the easiest, is when I have one `_first_author` and cero 
 or more `_additional_authors`, in which case I just put a list with the 
 authors (what else right? :-)
 The problem, or the question, comes when I don’t have a `_first_author` in 
 which case I’m not sure about the content of the `authors` field, it could be 
 i) only the list of `_additional_authors` or ii) `None` follow by the the 
 list of `_additional_authors`.

 I think the second solution is the closest one to reality, the `None` express 
 that the record doesn’t have a first author. And I also think that we could 
 apply this solution for other cases where we have this kind of situation 
 (like with the `110__` and `710__`).

In Zenodo i'm just interested in the list of authors, and the first in
the list is by definition the first author. The first author/additional
authors are somehow an artifact of having to store in MARC as master
format. I'm not sure what we would be the most appropriate solution.

Cheers,
Lars



 What do you think?
 Lars, as you have already pu in production, how do you deal with this problem?

 Cheers,
 --
 Esteban J. G. Gabancho



--
Lars Holm Nielsen
CERN, IT Department, Collaboration  Information Services
http://zenodo.org | Tel: +41 22 76 79182 | Cel: +41 76 672 8927






Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt