Skip to content
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

Tweak datatype-id property description and annotation. Make `dataty… #566

Merged
merged 10 commits into from
Jun 3, 2015

Conversation

gkellogg
Copy link
Member

…pe` an object property. #543.

@JeniT
Copy link

JeniT commented May 23, 2015

The question that remains here is whether we want to allow datatype to reference arbitrary (JSON) datatype definitions which are then retrieved. In other words, should I be able to do:

"datatype": "http://example.org/age"

and have http://example.org/age resolve to the JSON:

{
  "@id": "http://example.org/age",
  "base": "integer",
  "minimum": 0,
  "maximum": 120
}

If so, then we can take out the sentence about the datatype property, if a string, needing to be one of the built-in types, and rely on it being an object property (I think, or do we have to say something about how the strings in that case are mapped onto URLs)?

@JeniT JeniT assigned gkellogg and unassigned JeniT May 23, 2015
@gkellogg
Copy link
Member Author

This is a conundrum, and changes much practice. If we have something like the following:

{
  "columns": [{
    "name": "number",
    "datatype": "number"
  }]
}

We can clearly expand the "number" value to a URI using the context, and probably nothing specific needs to be said about this. We probably need to add some rules specific to "datatype" that if the value is a term in the context, it SHOULD NOT be dereferenced (to reduce noise on the network), otherwise, it is expanded to a URL and dereferenced; if the result of dereferencing this is a datatype description, this is used. Otherwise, a new object is created with @id set to that expanded URL.

We want the previous to continue to expand as follows:

{
  "columns": [{
    "name": "number",
    "datatype": {
      "base": "number"
    }
  }]
}

But, if we had something where the value was a URL (not a term in the context, or more specifically one of the datatype terms we define), we could get the following:

{
  "columns": [{
    "name": "number",
    "datatype": {
      "@id": "http://example.org/datatype"
    }
  }]
}

This is one thing that makes this not act like an object property, and this solution is starting to look more involved.

@gkellogg gkellogg assigned JeniT and unassigned gkellogg May 23, 2015
@JeniT
Copy link

JeniT commented May 27, 2015

I think we want

{
  "columns": [{
    "name": "number",
    "datatype": "number"
  }]
}

to expand to

{
  "columns": [{
    "name": "number",
    "datatype": { "@id": "xsd:double" }
  }]
}

which I think is what the object property gives us.

Having said that, the text looks fine from what I can tell.

@JeniT JeniT assigned gkellogg and unassigned JeniT Jun 3, 2015
@JeniT
Copy link

JeniT commented Jun 3, 2015

@gkellogg would you look over the rewording and see what you think?

gkellogg added a commit that referenced this pull request Jun 3, 2015
Tweak `datatype-id` property description and annotation. Make `dataty…
@gkellogg gkellogg merged commit 80ce5b1 into gh-pages Jun 3, 2015
@gkellogg gkellogg deleted the issue-543-datatypes branch June 3, 2015 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants