Comments (8)
What would this accomplish? Context is critical to validating data, segregating it into a separate document would simply increase the workload to validate the message. Is there a recommended workflow for consuming LD payloads that includes preloading context data?
from niem.github.io.
Yes. See https://json-ld.org/spec/latest/json-ld-api-best-practices/#cache-context ("Best Practice 3: Cache JSON-LD Contexts"), which recommends reusing contexts.
Also https://json-ld.org/spec/latest/json-ld/#interpreting-json-as-json-ld ("4.9 Interpreting JSON as JSON-LD").
Basically the idea is that JSON-LD should be able to look like plain uninteresting JSON, and the LD needs to be accessible somehow. You can put the context inline, link to a context via a URI, or include the context in an HTTP header.
We need to avoid the appearance that people need to jam contexts into their instances; we want the JSON to seem as simple as possible.
from niem.github.io.
Yeah, I see you. I've left this open because I'm focusing elsewhere right now and will be digging into the JSON-LD depths in July.
I don't know that we need to explicitly put in @ids for QNames (e.g., nc:Person), since the URI for a QName would be the expansion of the prefix (nc -> http://release.niem.gov/niem/niem-core/3.0/#) concatenated to the local part (Person) yeilding the URI (http://release.niem.gov/niem/niem-core/3.0/#Person), which is what we want.
We could put @type on properties in a context, but I'm not sure what that would buy us at this point. I'm going to be digging into JSON-LD processors, but outside the RDF world (like Jena) I'm not sure how @type gets utilized.
First cut on a default context for NIEM 4 will just be declaring namespaces. Later, I will dig into Jena-stack processing of NIEM data, using RDFS declarations corresponding to NIEM schema definitions, per the NDR section 5. Any help is welcome, especially if you want to get ahead of me on that.
from niem.github.io.
I opened an new issue just to start a conversation, but since you're here....
Here's what @type buys me specifically:
I'm writing a framework that will walk the inheritance tree for any message received all the way back to basic types, then create persistence schemas automatically.
So if a message is received, and as you said above the context is available either from:
- The message itself
- Cached reference
- Externally resolvable reference
My framework will walk the types back to the basic types, then create an persistence mapping from that, whether that's an SQL statement, or ElasticSearch index, or file format, or whatever.
For example:
nc:PersonType -> nc:PersonNameType -> nc:PersonGivenName -> nc:PersonNameTextType -> nc:ProperNameTextType -> nc:TextType => (sql engine) varchar(255)
The framework will be able to generate a persistence mapping to add to a @vocab doc.
Right now I'm using a custom version of sqlite3 for testing with my framework, which is called Union-Station (for reference).
from niem.github.io.
So it's a lot like Jena (what you reference above), except written in NodeJS and C++, with a lot less code and a visual graph interface like Node-Red .
The current demo version is actually a heavily modified fork of Node-Red, but the next version is a ground-up rebuild.
from niem.github.io.
Everything you're saying sounds great to me. Anything I can do from the NIEM-standardization side to help? I don't want anything we do to get in the way of this kind of thing.
from niem.github.io.
At this point just answering my questions is a huge help! I do appreciate the quick feedback.
There isn't really anything that is going to help / hurt from the standardization side, it's just when I'm trying to write code sometimes there are holes in my understanding that I'm trying to fill. For example, this conversation is informing this code starting around line #173.
I don't have all the code in the open yet but it's coming.
from niem.github.io.
A draft of the proposed default context for NIEM 4 is at https://github.com/webb/NIEM-Releases/blob/dev-json-ld-context/niem/context/niem-4.0.jsonld. Take a look if you get a chance.
from niem.github.io.
Related Issues (20)
- Update the Domain Modeler training information
- Update the IEPD Developer training information HOT 1
- Build sample implementations to use for IEPD implementer training HOT 1
- Add an IEPD review checklist HOT 1
- Create a standard way to compare rule sets across specification versions
- Add demo pages for how to do certain things in NIEM
- Add videos or animated gifs to the site HOT 1
- Set up a repo for training materials HOT 1
- Review potential security vulnerability warnings HOT 1
- Update the JSON syntax highlight colors HOT 1
- Business reporting schema?
- Add help info for submitting new content-related issues
- Provide an updated glossary of terms
- Replace the use of "MPD" with "IEPD" HOT 1
- Contact us page not working & tools.niem.gov certificate is expired HOT 2
- Add a sitemap HOT 1
- Delegate NIEM data catalog profile to DCAT-US or DCAT v2
- Update site for OASIS
- beta.movement.niem.gov is down
- Schema Subset Generation Tool (SSGT) Does not Load HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from niem.github.io.