We are trying to access to some routes in our pods, but we cant manage to access to them.
we are trying to acces obtaining the document but we cant access to the route since we are on the routes folder
We are news in Solid, so im sorry if its a really basic question, and we appreciate your help.
If you need any other folder or part of code you can find it here: https://github.com/Arquisoft/viade_es5c/tree/RDF
Hi @aitorllanos99, judging by your second screenshot, your route is in /public/viade/routes/otro. However, on this line you read the value from /rutas/ - which does not exist. Thus, try fc.readFolder(storage + 'public/viade/routes/otro') instead, and see where that gets you
Alright, well⦠Is there a place where we can see the current code? That would make it easier to helpā¦
So again, judging by your second screenshot, it looks like the route is actually called #myRoute, rather than #Route? That would explain why you canāt find it
Thanks for the updated link. So this line still says youāre looking in public/viade/routes - so without /otro. Have you tried public/viade/routes/otro as well?
If you did, what does the console.log("RUTISA:" + route); output?
Alright, that looks good! You can access the properties of that route using the listed methods, e.g. route.getString('http://xmlns.com/foaf/0.1/name') and route.getRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#type').
(Iām making some assumptions here about what your data looks like - if you have a link to the Pod containing the data in your second screenshot, I can verify that.)
Hi @Vincent ! First of all thank you so much for your help, it is very important for us. We have tried what you have just said but it doesnāt work either⦠Here it is a new screenshot of what the code returns us:
You probably think that we donāt know nothing about this topic, but we are new and anyone has explained us how this āworldā works. Again, thank you so much for spending your time helping us!!
This means that, later in that document where it says :myRoute, the : gets replaced by http://example.org/. This means that the actual identifier of your route is http://example.org/myRoute, rather than #myRoute.
Thank you so much!! We are starting to understand more or less how RDF works. Now we know how to obtain things from schema like our routeās name. But for example, to obtain our routeās points seems to be different. We thought that the āobjectā route had some property that returned its points but seem not to work like that.
We also know how to obtain the points. As point has viadeās type, we deduced that āviade:ā would be replaced for its prefix, as you explained us before. So we did this:
But for a reason we donāt understand yet, we canāt have its values as you explained us with the routeās name. Maybe a different method? ( i talk about a method like āgetSubject()ā) Thanks very much!!
Great to hear! And yes, your points are a bit different, but I figured Iād first help you with the first steps so you can gradually learn how things fit together
In RDF terms, the points on your route are blank nodes (i.e. they donāt have a URL), whereas the route itself is a named node (i.e. it has a URL: currently http://example.org/myRoute, though it shouldāve been https://aitorllanos99.solid.community/public/viade/routes/otro#myRoute).
So weāve been calling e.g. getString() to get properties of the route, but how can we do the same for points on that route?
In Tripledoc, the library youāre using to access the data, you can access those points through getLocalSubject() (to access one of them) and getAllLocalSubjects() (to access multiple).
So in code, you could get access to the points using:
Vincent you dont know how really thankful we are for your help and for your lessons about RDF and how to work with it, this was really fructiferous, and we know much more about Solid.
From our heart, thanks in name of all our group.
@Vincent Thank you so so much for your advices!! Thanks to you i hate a little less this university project hahaha. Seriously, you donāt know how much you had helped us.
Happy to hear youāre making progress! If you encounter more challenges, be sure to start a new topic in this forum! Thereās plenty of people willing to help, and itāll also be helpful to others who encounter the same problems in the future.