DataPropertyAtomImpl.java revision 38
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen * Created on Dec 28, 2004
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen * @author Evren Sirin
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainenpublic class DataPropertyAtomImpl extends AtomImpl implements DataPropertyAtom {
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen public DataPropertyAtomImpl(OWLIndividual ind) {
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen public OWLDataProperty getPropertyPredicate() {
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen return (OWLDataProperty) getPropertyAs(SWRL.propertyPredicate, OWLDataProperty.class);
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen public void setPropertyPredicate(OWLDataProperty p) {
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen setProperty(SWRL.propertyPredicate, (OWLIndividual) p.castTo(OWLIndividual.class));
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen return (SWRLIndividualObject) getPropertyAs(SWRL.argument1, SWRLIndividualObject.class);
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen SWRLDataObject arg = (SWRLDataVariable) getPropertyAs(SWRL.argument2, SWRLDataVariable.class);
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen arg = (SWRLDataValue) getPropertyAs(SWRL._argument2, SWRLDataValue.class);
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen throw new IndexOutOfBoundsException("Illegal argument index: "+index+" for a DataPropertyAtom");
c6a57378d3c54988f525f81e19c0c5d132a0770dTimo Sirainen public void setArgument(int index, SWRLObject obj) {
f7539a17ea306191b53b8f5e752e228937df9ec3Timo Sirainen throw new IndexOutOfBoundsException("Illegal argument index: "+index+" for a DataPropertyAtom");
f7539a17ea306191b53b8f5e752e228937df9ec3Timo Sirainen "First argument of a DataPropertyAtom should be an SWRLIndividiualObject");
adb6413686e52e00dded4932babcc08ff041876bTimo Sirainen "Second argument of a DataPropertyAtom should be an SWRLDataObject");
f7539a17ea306191b53b8f5e752e228937df9ec3Timo Sirainen public void setArgument1(SWRLIndividualObject obj) {
0a3b01714dadf97dcc7439ad4eeba690ab044966Timo Sirainen public void setArgument2(SWRLDataObject obj) {
b42697a5749b85659a24316d97f1c208d469e4e8Timo Sirainen setProperty(SWRL.argument2, (SWRLDataVariable) obj);
b42697a5749b85659a24316d97f1c208d469e4e8Timo Sirainen OWLIndividual value = values.getIndividualValue((Variable) subject);