title: Ontology updation
body: <p>I have installed Protege 4.2 alpha for creating Ontology. I have created an ontology (Tamil.owl). My need is to update the created ontology using a java program.</p>
  
  <p>Got an error stating "no protocol" while executing the below java program</p>
  
  <pre><code>import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.InputStream;
  import java.io.PrintStream;
  import java.net.URI;
  import java.util.Collection;
  import java.util.Iterator;
  
  import com.hp.hpl.jena.ontology.Individual;
  import com.hp.hpl.jena.ontology.ObjectProperty;
  import com.hp.hpl.jena.ontology.OntClass;
  import com.hp.hpl.jena.ontology.OntModel;
  import com.hp.hpl.jena.ontology.OntModelSpec;
  import com.hp.hpl.jena.rdf.model.ModelFactory;
  import com.hp.hpl.jena.rdf.model.Property;
  import com.hp.hpl.jena.util.FileManager;
  
  import edu.stanford.smi.protegex.owl.model.OWLIndividual;
  import edu.stanford.smi.protegex.owl.model.OWLNamedClass;
  import edu.stanford.smi.protegex.owl.swrl.bridge.OWLSubClassAxiom;
  
  public class addIndividual {
  
  public static void main(String args[]) throws Exception
  {
      //create an empty model
      OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_TRANS_INF, null);
  
  
      InputStream in = FileManager.get().open("/home/saranya/workspace/New/plugins/edu/stanford/smi/protegex/owl/tamil.owl");
      if (in == null) {
         // throw new IllegalArgumentException("File not found");
      }
  
      // read the RDF/XML file
      model.read(in, "");
  
      String NS = "http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owl";
      //String NSS = "http://www.semanticweb.org/ontologies/2013/3/untitled-ontology-4.owl/Crops#";
      OntClass att = model.getOntClass(NS + "Crops");
      //Individual I1 = model.createIndividual(NS + "Rice", att);
      System.out.println("Test NS"+NS);
      //OntClass att2 = model.getOntClass(NS + "Pest");
      //System.out.println(att2);
      //Individual I2 = model.createIndividual(NS + "Worm", att);
      OntClass att1 = model.createClass(NS + "TestClass");
      OntClass att2 = model.createClass(NS + "NewTest");
      OntClass att22 = model.createClass(NS + "பழம்");
  
      ObjectProperty prop = model.createObjectProperty(NS +"is_a");
      Property prop1 = model.createDatatypeProperty(NS +"has_a");
      OntClass myClass = model.createClass(NS + "மாம்பழம்");
      myClass.addSuperClass(att22);
      myClass.addSubClass(att1);
      //model.add(I2, prop, I1);
  
      model.write(System.out);
  
      PrintStream p= new PrintStream("/home/saranya/workspace/New/plugins/edu/stanford/smi/protegex/owl/Tamil.owl");
      model.write(p);
      p.close();
  }
  }
  </code></pre>
  
  <p>How to resolve the below error??</p>
  
  <pre><code>ERROR [main] (RDFDefaultErrorHandler.java:40) - unknown-source: {E213} no protocol:
  </code></pre>
  
  <p>Other output is:</p>
  
  <pre><code>Test NShttp://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owl
  </code></pre>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:owl="http://www.w3.org/2002/07/owl#"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" &gt; 
    &lt;rdf:Description rdf:about="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlபழம்"&gt;
      &lt;rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/&gt;
    &lt;/rdf:Description&gt;
    &lt;rdf:Description rdf:about="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlNewTest"&gt;
      &lt;rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/&gt;
    &lt;/rdf:Description&gt;
    &lt;rdf:Description rdf:about="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlis_a"&gt;
      &lt;rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/&gt;
    &lt;/rdf:Description&gt;
    &lt;rdf:Description rdf:about="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlhas_a"&gt;
      &lt;rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/&gt;
    &lt;/rdf:Description&gt;
    &lt;rdf:Description rdf:about="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlTestClass"&gt;
      &lt;rdfs:subClassOf rdf:resource="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlமாம்பழம்"/&gt;
      &lt;rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/&gt;
    &lt;/rdf:Description&gt;
    &lt;rdf:Description rdf:about="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlமாம்பழம்"&gt;
      &lt;rdfs:subClassOf rdf:resource="http://www.semanticweb.org/saranya/ontologies/2013/11/Ontology1.owlபழம்"/&gt;
      &lt;rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/&gt;
    &lt;/rdf:Description&gt;
  &lt;/rdf:RDF&gt;
  </code></pre>