I defined a ParentClass and two subclasses ChildClassA and ChildClassB. ParentClass has a single field, annotated with @id, whereas the child classes has no additional fields.
@OWLClass(iri = "http://www.example.org/parent")
public static class ParentClass {
@Id
private String id;
public ParentClass() {
this.id = "http://noid.org";
}
public String getId() {
return id;
}
public void setId(final String id) {
this.id = id;
}
}
@OWLClass(iri = "http://www.example.org/childa")
public static class ChildClassA extends ParentClass {
}
@OWLClass(iri = "http://www.example.org/childb")
public static class ChildClassB extends ParentClass {
}
I defined a
ParentClass
and two subclassesChildClassA
andChildClassB
.ParentClass
has a single field, annotated with@id
, whereas the child classes has no additional fields.