Giter Club home page Giter Club logo

Comments (3)

cordawyn avatar cordawyn commented on August 23, 2024

This is a limitation of original design (which, at the same time, prevents possible hacks/gotchas where the database has properties with the same name as "sensitive" object methods of Spira objects, e.g. to_s, new or the like). I think it should possible to "declare" properties based on the data, instead of using explicit declarations in the Ruby class, but there would be many other implications throughout the gem that we decided to "avoid" for now.
I do not have any objections to your idea, in general, so you're welcome to send us a pull request implementing this "dynamic" declaration of properties.

from spira.

tpendragon avatar tpendragon commented on August 23, 2024

Sorry for the lateness. I don't really need dynamic properties, and think that's more dangerous than it's worth, I just need access to the entire RDF graph for that object - whether I can get to those properties via setters or not. We'll work on a pull request over here.

from spira.

cordawyn avatar cordawyn commented on August 23, 2024

Since Spira is based on RDF.rb, you can always use its lower level API to access stuff directly, e.g. get your object repository (r = my_object.class.repository), get your object's subject (s = my_object.subject) and finally, get all triples with that subject using RDF.rb API: ts = r.statements(:subject => s) (or something among those lines).

from spira.

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.