Modifying protege owlapi - nononing2014/repoProtege GitHub Wiki

Protege owlapi introduces some extensions to owlapi. It is only protege not other application using owlapi. For example owlapi does not provide write safe ontology where as protege-owlapi dows. We did not introduce any extension to protege-owlapi but as we are introducing new apis in OWLOntology so we must declare them in WriteSafeOWLOntologyImpl which is implementing OWLOntology. It's code can be found here. Our modification to WriteSafeOWLOntologyImpl are:

	public void addRelation(String name){
		delegate.addRelation(name);
	}
	
	public void removeRelation(String name){
		delegate.removeRelation(name);
	}
	
	public OWLRelation getRelation(String name){
		return delegate.getRelation(name);
	}
	
	public boolean doesContainRelation(String name){
		return delegate.doesContainRelation(name);
	}
	
	public boolean isRelated(OWLClass A, String rel, OWLClass B){
		return delegate.isRelated(A, rel, B);
	}
	
	public void removeRelated(OWLClass A, String rel, OWLClass B){
		delegate.removeRelated(A, rel, B);
	}
	
	public Map<OWLRelation, List<OWLClass>> getRelationToClassMap(OWLClass A){
		return delegate.getRelationToClassMap(A);
	}
	
	public void addRelated(OWLClass A, String rel, OWLClass B){
		delegate.addRelated(A,rel,B);
	}
	
	public void printAllRelations(){
		delegate.printAllRelations();
	}
	
	public Set<OWLClass> getAllOwlClasses(OWLClass A){
		return delegate.getAllOwlClasses(A);
	}

	
	public Map<String,String> getEdgeLabelMap(OWLClass A){
		return delegate.getEdgeLabelMap(A);
	}
	
	public List<OWLRelation> getAllRelations(){
		return delegate.getAllRelations();
	}
	
	public void addRelationChangeListner(OWLRelationChangeListener l){
		delegate.addRelationChangeListner(l);
	}
	
	public void removeRelationChangeListner(OWLRelationChangeListener l){
		delegate.removeRelationChangeListner(l);
	}

As you can see in all implementations we are simply passing execution to delegate which is our original OWLOntologyImpl object.

⚠️ **GitHub.com Fallback** ⚠️