
edu.stanford.protege.webprotege.project.AutoValue_Ontology Maven / Gradle / Ivy
The newest version!
package edu.stanford.protege.webprotege.project;
import com.google.common.collect.ImmutableSet;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;
import org.semanticweb.owlapi.model.OWLAnnotation;
import org.semanticweb.owlapi.model.OWLAxiom;
import org.semanticweb.owlapi.model.OWLImportsDeclaration;
import org.semanticweb.owlapi.model.OWLOntologyID;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Ontology extends Ontology {
private final OWLOntologyID ontologyId;
private final ImmutableSet importsDeclarations;
private final ImmutableSet annotations;
private final ImmutableSet axioms;
AutoValue_Ontology(
OWLOntologyID ontologyId,
ImmutableSet importsDeclarations,
ImmutableSet annotations,
ImmutableSet axioms) {
if (ontologyId == null) {
throw new NullPointerException("Null ontologyId");
}
this.ontologyId = ontologyId;
if (importsDeclarations == null) {
throw new NullPointerException("Null importsDeclarations");
}
this.importsDeclarations = importsDeclarations;
if (annotations == null) {
throw new NullPointerException("Null annotations");
}
this.annotations = annotations;
if (axioms == null) {
throw new NullPointerException("Null axioms");
}
this.axioms = axioms;
}
@Nonnull
@Override
public OWLOntologyID getOntologyId() {
return ontologyId;
}
@Nonnull
@Override
public ImmutableSet getImportsDeclarations() {
return importsDeclarations;
}
@Nonnull
@Override
public ImmutableSet getAnnotations() {
return annotations;
}
@Nonnull
@Override
public ImmutableSet getAxioms() {
return axioms;
}
@Override
public String toString() {
return "Ontology{"
+ "ontologyId=" + ontologyId + ", "
+ "importsDeclarations=" + importsDeclarations + ", "
+ "annotations=" + annotations + ", "
+ "axioms=" + axioms
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Ontology) {
Ontology that = (Ontology) o;
return this.ontologyId.equals(that.getOntologyId())
&& this.importsDeclarations.equals(that.getImportsDeclarations())
&& this.annotations.equals(that.getAnnotations())
&& this.axioms.equals(that.getAxioms());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= ontologyId.hashCode();
h$ *= 1000003;
h$ ^= importsDeclarations.hashCode();
h$ *= 1000003;
h$ ^= annotations.hashCode();
h$ *= 1000003;
h$ ^= axioms.hashCode();
return h$;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy