-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
empty string in Agent.js #13
Comments
@bshambaugh the
then there's vocab-jsonld-context which handles the dependencies and such to combine them into a single does that help? |
@ahdinosaur @elf-pavlik Ha one mystery explained I think. This is probably why your "json-ld" looked funny to people - it gets further processed into the real stuff..... |
@ahdinosaur I know you are trying to focus on your implementation, but I have a request if it doesn't take long. Can you blow out your @context using your ovn inputs and the library you wrote? Or whichever parts you think are in OK enough shape to be useful? It would save me time in coding up a proposed draft @context for the relationships and relationship types. If not, no worries, I can get where you were going from what you have on ovn. |
> var vocab = require('./vocab')
> var vocabToJsonldContext = require('vocab-jsonld-context')
> var extend = require('xtend/mutable')
// id's must be absolute, do normalization
> Object.keys(vocab).forEach(function (id) { vocab[id].id = "http://vocab.ovn.is/" + id })
> vocabToJsonldContext(vocab.Person)
schema-is-schema: invalid schema
> vocab.Person.allOf[1].id = "http://vocab.ovn.is/Person"
'http://vocab.ovn.is/Person'
> vocab.Group.allOf[1].id = "http://vocab.ovn.is/Person"
'http://vocab.ovn.is/Person'
// end id normalization
// get context from each entity description and merge into a single context object
> var context = {}
> Object.keys(vocab).forEach(function (id) { extend(context, vocabToJsonldContext(vocab[id])) })
> context
{ '@vocab': 'http://schema.org/',
foaf: 'http://xmlns.com/foaf/0.1/',
Agent: 'foaf:Agent',
relationships: 'ovn:hasRelationship',
ovn: 'http://vocab.ovn.is/',
Relationship: 'org:Membership',
relationshipType: 'ovn:relationshipType',
is: 'ovn:isRelated',
has: 'ovn:hasRelated',
status: 'ovn:status',
symmetric: 'ovn:symmetric',
RelationshipType: 'ovn:RelationshipType',
label: 'skos:prefLabel',
pluralLabel: 'skos:altLabel',
org: 'http://www.w3.org/TR/vocab-org#',
Person: 'org:Organization',
members: 'member',
qudt: 'http://qudt.org/1.1/schema/qudt',
Kind: 'qudt:QuantityKind',
description: 'qudt:description',
abbreviation: 'qudt:abbreviation',
symbol: 'qudt:symbol',
generalization: 'qudt:quantityKind',
Location: 'Place',
handle: 'foaf:nick',
location: 'foaf:based_near',
groups: 'memberOf',
Quantity: 'qudt:QuantityValue',
value: 'qudt:numericValue',
relativeStandardUncertainty: 'qudt:relativeStandardUncertainty',
standardUncertainty: 'qudt:standardUncertainty',
unit: 'qudt:unit',
Unit: 'qudt:Unit',
kind: 'qudt:quantityKind',
conversionMultiplier: 'qudt:conversionMultiplier',
conversionOffset: 'qudt:conversionOffset',
skos: 'http://www.w3.org/2004/02/skos/core#',
Role: 'org:Role',
related: 'skos:related',
broader: 'skos:broader',
narrower: 'skos:narrower' } not sure how useful this is though, i reckon its more useful to understand the prefixes and contexts i chose for each entity and see if those match with what you're looking for. as far as the relationship stuff goes, we're charting new territory with our own terms, which i prefer to trying to force our data model into existing (in my opinion kinda lacking) linked data terms. |
@ahdinosaur Thanks much! It is helpful in my education and confidence in actually writing some json-ld. :) But yes, the hard part is choosing the mapping to existing vocab. I'm hoping @elf-pavlik will help in this area. There is for sure a balancing act in using existing vocab, but I basically agree with you to use our new terms rather than forcing into existing terms when they aren't really right for us. For example, I am thinking to move away from org:Membership - too specific a name and doesn't support person to person relationships. |
we should handle it through #35 |
@ahdinosaur What does the empty string in line 5 mean? i.e: "": "http://schema.org/",
The text was updated successfully, but these errors were encountered: