File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11package app ;
22
3+ import org .apache .jena .datatypes .xsd .XSDDatatype ;
4+ import org .apache .jena .rdf .model .Model ;
5+ import org .apache .jena .rdf .model .ModelFactory ;
6+ import org .apache .jena .rdf .model .Property ;
7+ import org .apache .jena .rdf .model .Resource ;
8+
39public class App {
10+ static private String namespace = "http://example.org/test/" ;
411 public static void main (String [] args ) throws Exception {
5- System .out .println ("Hello Java" );
12+ Model model = ModelFactory .createDefaultModel ();
13+
14+ Resource subject = model .createResource (namespace + "message" );
15+ Property property = model .createProperty (namespace + "says" );
16+ subject .addProperty (property , "Hello World!" , XSDDatatype .XSDstring );
17+
18+ model .write (System .out );
619 }
720}
You can’t perform that action at this time.
0 commit comments