Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
menuma
menuma's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Jena in Processing
[0 Replies]
01-Jan-2013 04:59 AM
Forum:
Share your Work
By copying the Jena-libs into the "code" directory i was able to run the code from
Ian Dickinson
in Processing.
The Processing code is :
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.datatypes.xsd.XSDDatatype;
Model m = ModelFactory.createDefaultModel();
String NS = "http://example.com/test/";
void setup()
{
size(200,200);
noLoop();
}
void draw()
{
Resource r = m.createResource(NS + "r");
Property p = m.createProperty(NS + "p");
r.addProperty(p, "hello world", XSDDatatype.XSDstring);
m.write(System.out, "Turtle");
}
I used Processing 2.0b3 and Apache-Jena-2.7.4
«Prev
Next »
Moderate user : menuma
Forum