JENA mess


Model m = ModelFactory.createDefaultModel();
			String NS = "http://www.examle.com/test/";
			Resource r = m.createResource( NS + "r" );
			Property p = m.createProperty( NS + "p" );
		
			
			r.addProperty(p, "Hello world",XSDDatatype.XSDstring);
			
			//m.write(System.out, "Turtle");
			//m.write(System.out, "N-TRIPLE");
			m.write(System.out, "RDF/XML-ABBREV");
		
			
			
			
			// URI declarations
			String familyUri = "http://family/";
			String relationshipUri = "http://purl.org/vocab/relationship/";

			// Create an empty Model
			Model model = ModelFactory.createDefaultModel();

			// Create a Resource for each family member, identified by their URI
			Resource adam = model.createResource(familyUri + "adam");
			Resource beth = model.createResource(familyUri + "beth");
			Resource chuck = model.createResource(familyUri + "chuck");
			Resource dotty = model.createResource(familyUri + "dotty");
			// and so on for other family members

			// Create properties for the different types of relationship to represent
			Property childOf = model.createProperty(relationshipUri, "childOf");
			Property parentOf = model.createProperty(relationshipUri, "parentOf");
			Property siblingOf = model.createProperty(relationshipUri, "siblingOf");
			Property spouseOf = model.createProperty(relationshipUri, "spouseOf");

			// Add properties to adam describing relationships to other family members
			adam.addProperty(siblingOf,beth);
			adam.addProperty(spouseOf,dotty);
			adam.addProperty(childOf,chuck); //edward

			
			beth.addProperty(siblingOf, adam);
			chuck.addProperty(parentOf, adam);
			*/
			
			/*
			//OntModel m = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM );
			OntModel m2 = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM );
			OntDocumentManager dm = m2.getDocumentManager();
			String NS1 = "http://www.fit.vutbr.cz/~imilicka/public/ontology/2012/10/wikt.owl#";
			
			dm.addAltEntry( "http://www.fit.vutbr.cz/~imilicka/public/ontology/"
							//,"file:" + JENA + "src/examples/resources/eswc-2006-09-21.rdf"
							//,"file:eswc-2006-09-21.rdf"
							,"http://www.fit.vutbr.cz/~imilicka/public/ontology/wikt.owl"
			                );
			m2.read( "http://www.fit.vutbr.cz/~imilicka/public/ontology/wikt.owl" );
			
			Resource r2 = m2.getResource( NS1 + "Block" );
			r2.addProperty(childOf, "Blocek");
			
			
			//OntClass paper = m2.createClass( NS + "Paper" );
			*/
			
			//String className = "Block";
			//OntClass blockClass = m2.getOntClass(NS1+className);
			
			//OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(ONTOLOGY_URL);
			
			//m.createLiteralStatement(pizzaClass, childOf, 1);
			
			// first way: use a call on OntModel
			//Individual ind0 = m2.createIndividual( NS + "ind0", blockClass );

			// second way: use a call on OntClass
			//Individual ind1 = c.createIndividual( NS + "ind1" );
			
			
			
			//m2.write(System.out);
			
		/*	
			
			// create the base model
			String SOURCE = "http://www.eswc2006.org/technologies/ontology";
			String NS = SOURCE + "#";
			OntModel base = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );
			base.read( SOURCE, "RDF/XML" );

			// create the reasoning model using the base
			//OntModel inf = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_MICRO_RULE_INF, base );

			// create a dummy paper for this example
			OntClass paper = base.getOntClass( NS + "Paper" );
			//Individual p1 = base.createIndividual( NS + "paper1", paper );

			
			base.write(System.out);
			
			
			// Can also create statements directly . . .
			//Statement statement = model.createStatement(adam,parentOf,chuck); //frac

			// but remember to add the created statement to the model
			//model.add(statement);
			
			
			OutputStream output = new FileOutputStream("output-text.rdf");
			//model.write(output);
		*/