@@ -0,0 +1,2926 @@
+/**%0A * %0A */%0Apackage com.github.podd.prototype;%0A%0Aimport org.semanticweb.owlapi.model.IRI;%0Aimport org.semanticweb.owlapi.model.OWLOntologyID;%0A%0A/**%0A * Extends the OWLOntologyID class to provide for another variable to track the inferred ontology%0A * IRI that matches this ontology ID.%0A * %0A * @author Peter Ansell p_ansell@yahoo.com%0A * %0A */%0Apublic class InferredOWLOntologyID extends OWLOntologyID%0A%7B%0A    private static final long serialVersionUID = 30402L;%0A    %0A    private IRI inferredOntologyIRI;%0A    %0A    /**%0A     * %0A     */%0A    public InferredOWLOntologyID(final IRI baseOntologyIRI, final IRI baseOntologyVersionIRI,%0A            final IRI inferredOntologyIRI)%0A    %7B%0A        super(baseOntologyIRI, baseOntologyVersionIRI);%0A        %0A        this.inferredOntologyIRI = inferredOntologyIRI;%0A        %0A        // Override hashcode if inferredOntologyIRI is not null, otherwise leave the hashcode to%0A        // match upstream%0A        if(inferredOntologyIRI != null)%0A        %7B%0A            // super uses 37, so to be distinct we need to use a different prime number here, ie, 41%0A            this.hashCode += 41 * inferredOntologyIRI.hashCode();%0A        %7D%0A    %7D%0A    %0A    @Override%0A    public boolean equals(final Object obj)%0A    %7B%0A        // super must be equals or we cannot be equals, which also takes into account anonymous%0A        // ontologies%0A        if(!super.equals(obj))%0A        %7B%0A            return false;%0A        %7D%0A        %0A        // make sure that we can still be equal to OWLOntologyID instances if we did not get an%0A        // InferredOntologyIRI%0A        if(obj instanceof InferredOWLOntologyID)%0A        %7B%0A            final InferredOWLOntologyID other = (InferredOWLOntologyID)obj;%0A            if(this.inferredOntologyIRI == null)%0A            %7B%0A                if(other.inferredOntologyIRI == null)%0A                %7B%0A                    return true;%0A                %7D%0A                else%0A                %7B%0A                    return false;%0A                %7D%0A            %7D%0A            else if(other.inferredOntologyIRI == null)%0A            %7B%0A                return false;%0A            %7D%0A            else%0A            %7B%0A                return this.inferredOntologyIRI.equals(other.inferredOntologyIRI);%0A            %7D%0A        %7D%0A        else%0A        %7B%0A            // if the other object was not an InferredOWLOntogyID then we will only be equal if we%0A            // do not have an inferred ontologyIRI ourselves%0A            return this.inferredOntologyIRI == null;%0A        %7D%0A        %0A    %7D%0A    %0A    /**%0A     * @return the inferredOntologyIRI%0A     */%0A    public IRI getInferredOntologyIRI()%0A    %7B%0A        return this.inferredOntologyIRI;%0A    %7D%0A    %0A    @Override%0A    public String toString()%0A    %7B%0A        if(this.inferredOntologyIRI == null)%0A        %7B%0A            return super.toString();%0A        %7D%0A        else%0A        %7B%0A            return super.toString() + this.inferredOntologyIRI.toQuotedString();%0A        %7D%0A    %7D%0A    %0A%7D%0A

add first version of InferredOWLOntologyID