modules icon indicating copy to clipboard operation
modules copied to clipboard

[contacts] Use correct ontology URI and schema for vCard

Open raucao opened this issue 11 years ago • 18 comments

http://www.w3.org/TR/2014/NOTE-vcard-rdf-20140522

raucao avatar Jun 01 '14 13:06 raucao

good point. in http://www.w3.org/TR/2014/NOTE-vcard-rdf-20140522/#Overview it is stated that the correct URI, both for rdf and for json-ld, is "http://www.w3.org/2006/vcard/ns#"

michielbdejong avatar Jun 01 '14 17:06 michielbdejong

There's a JSON-LD example as well.

raucao avatar Jun 01 '14 17:06 raucao

ok, I'll update the module so that it uses that instead of http://remotestorage.io/modules/code/files/contacts-js.html#contacts/contact

michielbdejong avatar Jun 01 '14 17:06 michielbdejong

This is still missing a whole lot of fields, and most importantly, still doesn't specificy the actual schema, including format information for stuff like URLs etc, which we can all define.

raucao avatar Jun 03 '14 09:06 raucao

good point, that wasn't clear. fixed now.

I updated the schema definition so that it's clear that any field that exists in the vcard spec is allowed, and the schema we give here is non-normative. they're just the fields we want to check at runtime.

michielbdejong avatar Jun 03 '14 10:06 michielbdejong

That's not solving...

This is still missing a whole lot of fields, and most importantly, still doesn't specify the actual schema, including format information for stuff like URLs etc, which we can all define.

If you don't want to do it, please leave it open for me or someone else to complete. We can define all known fields, so that developers don't have to do extend the module for their app in order to have validation etc.

raucao avatar Jun 03 '14 10:06 raucao

sure, you can add more fields if you think you or someone else will use them

michielbdejong avatar Jun 03 '14 10:06 michielbdejong

That's a nonsensical "if". I'll add them for other reasons, namely the ones I already wrote down.

raucao avatar Jun 03 '14 11:06 raucao

do you use JSON-LD @context in data you store?

$  curl http://www.w3.org/2006/vcard/ns -H "Accept: application/ld+json"

elf-pavlik avatar Jun 03 '14 15:06 elf-pavlik

i wonder if your schema and code handles properly cases like multiple values:

{
  hasEmail: [
    "[email protected]",
    "[email protected]"
  ]
}

http://www.w3.org/TR/json-ld/#sets-and-lists

as well as multiple languages:

{
  fn: {
    en: "Ismail",
    ar: "إسماعيل"
  }
}

http://www.w3.org/TR/json-ld/#string-internationalization

elf-pavlik avatar Jun 03 '14 17:06 elf-pavlik

do you use JSON-LD @context in data you store?

Yes.

i wonder if your schema and code handles properly cases like multiple values:

We can define that in the JSON Schema object. JSON schema is extensible in theory, but you can also just amend the schema in the module. We even have an extend method in modules for merging objects like schemas. The schema we define should account for all standard use cases, though, so that people don't have to muck around in the module.

raucao avatar Jun 03 '14 18:06 raucao

thx @skddc! I guess I move further conversation to http://community.remotestorage.io/ :)

elf-pavlik avatar Jun 03 '14 19:06 elf-pavlik

Completely OT, but hey: Well, @elf-pavlik, you didn't check that page in a while, didn't you? The Discourse service died some days/weeks ago. I wonder if it would make sense, @skddc, if we joined forces and I'd put the last backup you have within my new Discourse farm at Ecobytes. ?

almereyda avatar Jun 03 '14 22:06 almereyda

:+1: AFAIK you guys live in the same town, just do a small hack party and make it happen :smiley:

elf-pavlik avatar Jun 04 '14 09:06 elf-pavlik

We're still waiting for the data. It's not because we're lazy.

raucao avatar Jun 04 '14 09:06 raucao

Good luck with the backup.

On 4 June 2014 11:45, Sebastian Kippe [email protected] wrote:

We're still waiting for the data. It's not because we're lazy.

— Reply to this email directly or view it on GitHub https://github.com/remotestorage/modules/issues/56#issuecomment-45071265 .

almereyda avatar Jun 04 '14 09:06 almereyda

this should help: https://github.com/lanthaler/vCardOntology from one of JSON-LD spec authors!

elf-pavlik avatar Dec 01 '14 19:12 elf-pavlik

Nice, thanks!

That would mean we'd have to introduce support for maps/objects as @context. Looks like our implementation still needs work to support using all of JSON-LD.

raucao avatar Dec 02 '14 14:12 raucao