Comments (4)
You should just directly use RDF.first
, RDF.type
, etc.
I'll remove the lib/rdf/vocab/rdf.rb
file to reduce confusion - it isn't used, and can't be used due to the name clashing with the base module (as you noticed). So all the RDF properties are defined directly on the base module itself.
I see that our YARD documentation currently (and incorrectly) includes the RDF::RDF
module, which is probably what led you to try using it? The documentation will be fixed when the superfluous file is removed.
from rdf.
Thanks for the clarification.
I did read about RDF::RDF in the documentation somewhere - I forget exactly where, it may well have been where you said. But I guess I was also expecting the RDF namespace and the RDFS to be accessed consistently. If I understand things correctly now, I should use RDF.first but RDF::RDFS.label? I think that's possibly going to trip other users up. However, perhaps with good pointers in the docs and examples it won't be too much of a problem.
Ian
from rdf.
The inconsistency is unavoidable in this case, unfortunately. But the idea is in any case that most users will do an include RDF
statement somewhere in their code, after which they'll be able to directly (and consistently) refer to just RDF.type
, RDFS.label
, DC.title
, and so on. Makes for much nicer code.
from rdf.
Removed the superfluous, unused RDF::RDF vocabulary class and clarified the documentation accordingly (closed by f02666b).
from rdf.
Related Issues (20)
- Ruby 2.7.1, URI.decode is obsolete
- bad behaviour in RDF::List HOT 7
- blank nodes reuse memory addresses, causing problems for persistent stores HOT 3
- Is there a "prettier" HOT 1
- Is there a more 'elegant' way to do this? HOT 3
- Strange "file missing" error with 3.1.14 release HOT 6
- Comparing two repositories HOT 2
- Verbose warnings on 2.7+ Ruby HOT 2
- 3.2.1 removes `RDF::Repository::Implementation::SerializedTransaction` HOT 5
- Is it possible to change the standard prefixes? HOT 7
- docmentation: how to create new vocabs, and langage-tagged strings in vocabs HOT 3
- Weird `require 'enumerator'` issue caused by this gem HOT 5
- change from DateTime < Literal to DateTime < Temporal breaks downstream customization HOT 5
- Invalid argument @ rb_sysopen - (Errno:EINVAL) when using local files on Windows HOT 10
- RDF::Vocabulary.find on RDF vocab returns RDF class HOT 5
- Ruby regexp warning: character class has duplicated range HOT 10
- Errno::EINVAL using `each_statement` with a LARGE, local NTriples file HOT 1
- RDF::Query#graph_name does not behave has documented HOT 3
- Error when using local files on Windows HOT 1
- FrozenError during concurrent activity in 3.2.11 HOT 12
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 rdf.