FamilySearch / gedcomx

An open data model and an open serialization format for exchanging genealogical data.
http://www.gedcomx.org
Apache License 2.0
350 stars 67 forks source link

model notes #23

Closed carpentermp closed 12 years ago

carpentermp commented 13 years ago

We probably need a model for Notes on a Person (and possibly other entities).

stoicflame commented 13 years ago

+1

jeffph commented 13 years ago

I'm not sure I understand the intent of Person Notes in the Record Profile. To help me understand the use case, what type of data would go into Notes that wouldn't be in Attribution or one of the subclasses of Field?

carpentermp commented 13 years ago

This has reference to Notes on Person, not Persona.

jeffph commented 13 years ago

The record profile tag should be removed then?

stoicflame commented 13 years ago

done

stoicflame commented 12 years ago

Modeled at 74283aa

stoicflame commented 12 years ago

I'll reopen this issue, since there's some discussion still to be had about what a "note" is. I need to figure out why other people can't reopen issues...

I suppose I could comment on a closed issue, but since the issue is closed, who would pay any attention?

Anybody participating in the conversation still gets notified. Also, if you want to include other people in the conversation, mention them with an '@'username and they'll get notified. Right, @ranbo?

carpentermp commented 12 years ago

How is this support for inline notes accomplished--as an extension? Why not put them explicitly in the model via a "list of notes" like we model other things?

Below is the discussion thread we were having before this issue got reopened:


From: Ryan Heaton Sent: Monday, September 12, 2011 1:58 PM To: Randy Wilson Cc: Merlin Carpenter Subject: Re: [gedcomx] model notes (#23)

On 09/12/2011 01:42 PM, Randy Wilson wrote:

It seems to me like notes are often real "data" rather than "metadata". One way to think about notes is that it is where you put any data that our model doesn't let you model explicitly, including brief stories about the person. I suppose you could use notes to add stories about a person, but I've never seen any products (or met any product owners) that explicitly tell a user to put a story about an ancestor in a note. It's always a UI that says something like "do you want to attach a note to this conclusion?" And, more pragmatically, it seems like it would make sense to put notes inside of the thing that they are a note about. I wouldn't put them everywhere, but I'd probably put them in a few key places:

  • Notes in individuals
  • Notes in names
  • Notes in events
  • Notes in characteristics

Sure, if the application decides that notes are more "pragmatic" inline, the model allows for that:

<person rdf:ID="pid">
<gx:note>...</gx:note>
<persistentId>...</persistentId>
<name>
<gx:note>...</gx:note>
</name>
<event>
<gx:note>...</gx:note>
</event>
</person>

If the note was inside of the thing it refers to, it wouldn't need an "about" pointer, which has the side benefit that we wouldn't need to ensure that we have URLs for names, events and characteristics, if we want events on those.

This is how old GEDCOM did it (though they may have allowed notes in a lot more places than these, which I don't know that I would recommend), and it seems like it's still a good way to go.

--Randy Wilson

-----Original Message----- From: Ryan Heaton Sent: Monday, September 12, 2011 1:23 PM To: Randy Wilson Cc: Merlin Carpenter Subject: Re: [gedcomx] model notes (#23)

What the proposal is for notes is not that they would be "entities" in the sense that they have their own lifecycle independent of the things that they're attached to. The intent was to model them clearly as metadata, i.e. data "about" a specific piece of data. So "person" would have it's own set of notes, as you propose.

Here's what a request for a person with notes would look like:

<gxcw:person xmlns="http://gedcomx.org/conclusion/v1/"
               xmlns:gx="http://gedcomx.org/"
               xmlns:gxcw="http://gedcomx.org/conclusion/www/v1/">
<person rdf:ID="pid">
<persistentId>http://familysearch.org/pal/12345</persistentId>
<name rdf:ID="name-id">
              ...
</name>
</person>
<gxcw:metadata>
<gx:note rdf:about="http://familysearch.org/pal/12345">
<gx:text>Here is a note about person 12345</gx:text>
</gx:note>
<gx:note rdf:about="http://familysearch.org/pal/12345">
<gx:text>Here is another note about person 12345</gx:text>
</gx:note>
</gxcw:metadata>
</gxcw:person>

A request for a person without notes wouldn't include those notes in the metadata section.

Some implementations could event have notes on a conclusion, e.g.:

               xmlns:gx="http://gedcomx.org/"
               xmlns:gxcw="http://gedcomx.org/conclusion/www/v1/">
<person rdf:ID="pid">
<persistentId>http://familysearch.org/pal/12345</persistentId>
<name rdf:ID="name-id">
              ...
</name>
</person>
gxcw:metadata
<gx:note rdf:about="#name-id">
gx:textHere is a note about the name of person 12345/gx:text
/gx:note
/gxcw:metadata
/gxcw:person

On 09/12/2011 10:15 AM, Randy Wilson wrote:

The original GEDCOM spec allows for both inline notes and shared notes. However, it is interesting that when Michael Nelson and others created our GEDCOM standardizer, they decided to make all source references shared; but to make all notes inline. When I asked about this, he said it was because there were no desktop managers they knew of that actually allowed you to share notes between individuals.

As long as there's a way to create a text artifact that can be pointed to (via source links) from a person, I actually prefer to have notes be part of the person, too. A web service can always have query parameters that allow you to filter out notes to keep the size small when notes aren't needed, if that's a concern.

--Randy Wilson

-----Original Message----- From: Merlin Carpenter Sent: Monday, September 12, 2011 9:50 AM To: Ryan Heaton Cc: Randy Wilson Subject: FW: [gedcomx] model notes (#23)

I checked out the model for notes and I have a couple of questions. I can't make these questions on the issue itself because you closed it. Perhaps it should be reopened? Anyway, here are my questions:

1) I didn't see anything in the change for how Records/Persons/Relationships refer to the Notes that refer to them. Is this part of the model, or was it your intention that Notes point at Records/Persons/Relationships, but that Records/Persons/Relationships don't point back? If that is the case, then you would need a way in the web service of asking for the Notes of a given Record/Person/Relationship. This doesn't feel right to me.

2) It appears that Notes are intended to be their own "entities". Many notes are simple statements like, "died of tuberculosis". Having an entity for something of this nature seems like overkill. Also, it would seem to me that the case for Notes being entities would be when multiple Records/Persons/Relationships are "using" the same note (so the information doesn't have to be repeated). In this case, the "about" link would need to be a list of links. Still, it seems more natural to point at the Note from Record/Person/Relationship rather than the other way around.

I personally don't favor Notes as entities because of all the entity baggage you get with that model. Yes, there is the case where multiple entities want to share a potentially large Note. I would favor modeling that case as a Source to an online "text" entity, such as a "personal history" or whatever (We have to support these types of online entities anyway, so it's nothing new.) Then, I would just have Notes as part of a Record/Person/Relationship. This simple model would seem to do most of what we need and be much simpler than Notes as entities.

stoicflame commented 12 years ago

After doing some work to research the nature of a note in other genealogical applications and models, a notes property was added directly to the model for the top-level entities and conclusions including Record, Persona, Person, Relationship, and Conclusion (which includes Gender, Name, etc.).

Thanks, @carpentermp and @ranbo, for making sure we got this right.

P.S. I guess it's just inherent to the way Github works that only the person that closed an issue can reopen it. So commenting on an issue requesting it reopened appears to be the Way Things Work.

stoicflame commented 12 years ago

Forgot to mention the commit: ad3a8aa584864f196f83b71fc512c34ae420b634

carpentermp commented 12 years ago

I noticed that Note, in addition to "text" which is a String, now has "mediaType" which is meant to be the media type of the text of the note. I was wondering, besides "text/plain", what other common media types are contemplated, and how would they be "encoded" in a String? e.g. text/html?

stoicflame commented 12 years ago

I noticed that Note, in addition to "text" which is a String, now has "mediaType"

Oh, thanks for bringing that up. That actually was a mistake; I was playing around with the idea and neglected to take it out before committing. The idea was so that applications can possibly put formatted text in the note, but there is no hard requirement driving it yet, so in the spirit of the way we've been doing things, we'll keep it out for now until there's a demand.