Code Monkey home page Code Monkey logo

Comments (4)

artob avatar artob commented on August 21, 2024

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.

ijdickinson avatar ijdickinson commented on August 21, 2024

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.

artob avatar artob commented on August 21, 2024

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.

artob avatar artob commented on August 21, 2024

Removed the superfluous, unused RDF::RDF vocabulary class and clarified the documentation accordingly (closed by f02666b).

from rdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.