OWLClassImpl.java revision 2
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/*
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen * Created on Dec 12, 2004
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen */
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenpackage impl.jena;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenimport java.util.Set;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenimport org.mindswap.owl.OWLClass;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenimport org.mindswap.owl.OWLIndividualList;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenimport org.mindswap.owl.OWLOntology;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenimport org.mindswap.owl.OWLType;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenimport com.hp.hpl.jena.rdf.model.Resource;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
77bc2bda5b781c4ffddc8a74b175cf32e9e2c2ecTimo Sirainen/**
77bc2bda5b781c4ffddc8a74b175cf32e9e2c2ecTimo Sirainen * @author Evren Sirin
77bc2bda5b781c4ffddc8a74b175cf32e9e2c2ecTimo Sirainen */
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenpublic class OWLClassImpl extends OWLEntityImpl implements OWLClass {
40a5aeebf6b4858b93f0ddff0bf12fba769cf903Timo Sirainen public OWLClassImpl(OWLOntology ont, Resource resource) {
40a5aeebf6b4858b93f0ddff0bf12fba769cf903Timo Sirainen super(ont, resource);
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public boolean isSubClassOf(OWLClass c) {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.isSubClassOf(this, c);
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public boolean isDisjoint(OWLClass c) {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.isDisjoint(this, c);
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public Set getSubClasses() {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.getSubClasses(this);
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public Set getSubClasses( boolean direct ) {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.getSubClasses( this, direct );
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public Set getSuperClasses() {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.getSuperClasses( this );
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public Set getSuperClasses( boolean direct ) {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.getSuperClasses( this, direct );
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen public Set getEquivalentClasses() {
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen return kb.getEquivalentClasses(this);
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen }
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen public OWLIndividualList getInstances() {
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen return kb.getInstances(this);
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen public boolean isDataType() {
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen return false;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen public boolean isClass() {
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Bosch return true;
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen public boolean isSubTypeOf(OWLType type) {
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen return kb.isSubTypeOf(this, type);
c147bff818798a979d93537f72f5c1f68f5d5ba8Aki Tuomi }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
23bdbb7b1831785c6ba6df190f6369da882d2b9dTimo Sirainen public boolean isEquivalent(OWLType type) {
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen return kb.isEquivalent(this, type);
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen public boolean isEnumerated() {
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen return kb.isEnumerated(this);
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen public OWLIndividualList getEnumerations() {
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen return kb.getEnumerations(this);
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen }
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen}
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen