2ronwalf/*
2ronwalf * Created on Jan 4, 2005
2ronwalf */
22daenzeroramapackage impl.owls.process.constructs;
2ronwalf
2ronwalfimport org.mindswap.owl.OWLIndividual;
2ronwalfimport org.mindswap.owls.process.ControlConstruct;
2ronwalfimport org.mindswap.owls.process.ForEach;
2ronwalfimport org.mindswap.owls.process.Local;
2ronwalfimport org.mindswap.owls.process.Parameter;
2ronwalfimport org.mindswap.owls.process.Perform;
2ronwalfimport org.mindswap.owls.process.ValueOf;
2ronwalfimport org.mindswap.owls.vocabulary.OWLS;
2ronwalf
2ronwalf/**
2ronwalf * @author Evren Sirin
2ronwalf *
2ronwalf */
2ronwalfpublic class ForEachImpl extends IterateImpl implements ForEach {
2ronwalf public ForEachImpl(OWLIndividual ind) {
2ronwalf super(ind);
2ronwalf }
2ronwalf
2ronwalf public ValueOf getListValue() {
2ronwalf return (ValueOf) getPropertyAs(OWLS.Process.theList, ValueOf.class);
2ronwalf }
2ronwalf
2ronwalf public void setListValue(ValueOf value) {
2ronwalf setProperty(OWLS.Process.theList, value);
2ronwalf }
2ronwalf
2ronwalf public Local getLoopVar() {
2ronwalf return (Local) getPropertyAs(OWLS.Process.theLoopVar, Local.class);
2ronwalf }
2ronwalf
2ronwalf public void setLoopVar(Local var) {
2ronwalf setProperty(OWLS.Process.theLoopVar, var);
2ronwalf }
2ronwalf
2ronwalf public ControlConstruct getComponent() {
2ronwalf return (ControlConstruct) getPropertyAs(OWLS.Process.iterateBody, ControlConstruct.class);
2ronwalf }
2ronwalf
2ronwalf public void setComponent(ControlConstruct component) {
2ronwalf setProperty(OWLS.Process.iterateBody, component);
2ronwalf }
2ronwalf
2ronwalf public void setListValue(Perform perform, Parameter parameter) {
2ronwalf ValueOf valueOf = getOntology().createValueOf();
2ronwalf valueOf.setPerform(perform);
2ronwalf valueOf.setParameter(parameter);
2ronwalf
2ronwalf setListValue(valueOf);
2ronwalf }
2ronwalf
2ronwalf public String getConstructName() {
2ronwalf return "For-Each";
2ronwalf }
18daenzerorama
18daenzerorama public void removeComponent() {
18daenzerorama if (hasProperty(OWLS.Process.iterateBody))
18daenzerorama removeProperties(OWLS.Process.iterateBody);
16daenzerorama }
2ronwalf}