/** * Constructs an ontology identifier specifiying the ontology IRI and version IRI * @param ontologyIRI The ontology IRI (may be <code>null</code>) * @param versionIRI The version IRI (must be <code>null</code> if the ontologyIRI is null) */ public OWLOntologyID(IRI ontologyIRI, IRI versionIRI) { this.ontologyIRI = ontologyIRI; hashCode = 17; if (ontologyIRI != null) { internalID = null; hashCode += 37 * ontologyIRI.hashCode(); } if (versionIRI != null) { if (ontologyIRI == null) { throw new IllegalArgumentException("If the ontology IRI is null then it is not possible to specify a version IRI"); } this.versionIRI = versionIRI; hashCode += 37 * versionIRI.hashCode(); } else { this.versionIRI = null; } if (ontologyIRI == null) { internalID = ANON_PREFIX + getNextCounter(); hashCode += 37 * internalID.hashCode(); } }