For example I have something like this in my application:
class X {
public Y doY(Z z){
//...
}
}
x = new X();
z = new Z();
Y y = x.doY(z); //not necessary
How can I describe this structure with RDF and RDFs?
I tried to describe it with something like the following, but I don't think I do it well: (please imagine the namespaces)
Method type Class
returnValue type Property
returnValue domain Method
arguments type Property
arguments type List
arguments domain Method
X type Class
doY type Method
doY domain X
z type Z
z member doY.arguments
x type X
z type Z
y type Y
x.doY.arguments._1 value z
y value x.doY.returnValue
What I really need to describe REST services with JSON-LD, but I suppose I cannot do that without fully understanding RDF. (I have an existing model, it works well in theory.)
According to the w3c recommendation by RDF everything is an rdfs:Resource
instance, even the rdfs:Class
itself. I assume we usually don't use rdfs:Resource
in our triples when we want to define a class, so I think the example was okay.
What I really need to describe REST services with JSON-LD, but I suppose I cannot do that without fully understanding RDF. (I have an existing model, it works well in theory.)
I think RDF is just a formality in by case. What really matters that if I want to write a general REST browser, then it should know a general REST vocabulary which I can describe with RDF. If I have an application specific REST client then it should know an application specific vocabulary, which has to be based on the general REST vocabulary, for example it should use the terms: resource, representation, method, link, etc... That's all I need.