Auto completer for the RDF turtle and TriG serializations with knowledge of common schema
This package provides the following services:
Turtle Autocompleter package
This is an autocompleter for the Atom editor, compatible with AutoComplete+ that knows common ontologies and will suggest predicates based on your typing. Both the Turtle and TriG serializations are supported.
Current ontologies are:
- Activity Vocabulary
- Metadata for Tabular Data
- Data Catalog Vocabulary
- Data Cubes
- Data Quality Vocabulary
- Data Usage Vocabulary
- Dublin Core & Terms
- Friend of a Friend
- ODRL
- Ontology for Media Resources
- OWL
- R2RML
- RDF
- RDFS
- Relationship
- SHapes Constraint Language
- SKOS
- W3C Provenance
- Web Annotation Vocabulary
If you'd like others added either raise an issue on the atom package, comment on gitter, tweet @nonodename or do a pull request with the conversion. Contributions are greatly appreciated. Note that the ontology is matched based on common prefixes.
Known ontologies are referenced from the file ontologies.json
in \lib
. Each ontology has a JSON file that contains the completion info.
To generate a new file, run convert.py
over a ttl version of the ontology to generate the JSON. convert.py supports a few command line options, run without any parameters to see them.
Note that quality of anchor links into the specs varies on whether the naming convention for the anchors is sufficiently predictable. Feel free to fix any that are wrong in the relevant JSON file and do a pull request to get added.
Testing ontologies
To test a new ontology without the palaver of pull requests:
- Create a copy of the file ontologies.json in
\lib
- Convert your ontology to the JSON format required for the completer
- Update the ontologies.json file, setting the key to the desired prefix and ontology attribute to the filename & path of the converted ontology.
- The spec, prefix and docprefix attributes aren't part of the code path so can be ignored or completed as you wish
- Note that if you re-use a predefined prefix you'll override the built in ontology
For example:
"tr":{
"title":"My First ontology",
"spec":"URL of the spec",
"prefix":"tr",
"docprefix":"URL prefix for documentation",
"ontology":"/users/dan/ontologies/tr.json"
}