Index: lutingenerator/src/java/org/codelutin/generator/models/state/StateModelSimpleState.java diff -u /dev/null lutingenerator/src/java/org/codelutin/generator/models/state/StateModelSimpleState.java:1.1 --- /dev/null Fri May 25 16:20:13 2007 +++ lutingenerator/src/java/org/codelutin/generator/models/state/StateModelSimpleState.java Fri May 25 16:20:08 2007 @@ -0,0 +1,45 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.generator.models.state; + +/** + * StateModelSimpleState + * + * A simple state. + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/25 16:20:08 $ + * By : $Author: chatellier $ + */ +public interface StateModelSimpleState extends StateModelState { + + /** + * State final status + * @return true il the state is final + */ + public boolean isFinal(); + + /** + * State initial status + * @return true if the state is initial + */ + public boolean isInitial(); +} Index: lutingenerator/src/java/org/codelutin/generator/models/state/StateModelTransition.java diff -u /dev/null lutingenerator/src/java/org/codelutin/generator/models/state/StateModelTransition.java:1.1 --- /dev/null Fri May 25 16:20:13 2007 +++ lutingenerator/src/java/org/codelutin/generator/models/state/StateModelTransition.java Fri May 25 16:20:08 2007 @@ -0,0 +1,45 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.generator.models.state; + +/** + * StateModelTransition + * + * A transition points to a state and has an avent. + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/25 16:20:08 $ + * By : $Author: chatellier $ + */ +public interface StateModelTransition { + + /** + * Return the destination state + * @return a state + */ + public StateModelState getDestinationState(); + + /** + * Return the event name + * @return the event name + */ + public String getEvent(); +} Index: lutingenerator/src/java/org/codelutin/generator/models/state/StateModel.java diff -u /dev/null lutingenerator/src/java/org/codelutin/generator/models/state/StateModel.java:1.1 --- /dev/null Fri May 25 16:20:13 2007 +++ lutingenerator/src/java/org/codelutin/generator/models/state/StateModel.java Fri May 25 16:20:08 2007 @@ -0,0 +1,47 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.generator.models.state; + +import java.util.List; + +/** + * StateModel + * + * Model root element. + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/25 16:20:08 $ + * By : $Author: chatellier $ + */ +public interface StateModel { + + /** + * Get model name + * @return model name + */ + public abstract String getName(); + + /** + * Return the collection of charts + * @return collection of charts + */ + public abstract List getStateCharts(); +} Index: lutingenerator/src/java/org/codelutin/generator/models/state/StateModelComplexState.java diff -u /dev/null lutingenerator/src/java/org/codelutin/generator/models/state/StateModelComplexState.java:1.1 --- /dev/null Fri May 25 16:20:14 2007 +++ lutingenerator/src/java/org/codelutin/generator/models/state/StateModelComplexState.java Fri May 25 16:20:08 2007 @@ -0,0 +1,56 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.generator.models.state; + +import java.util.Collection; + +/** + * StateModelComplexeState + * + * Represents a complex state that can be composed with a set of states. + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/25 16:20:08 $ + * By : $Author: chatellier $ + */ +public interface StateModelComplexState extends StateModelState { + + /** + * Return the states set + * @return a collection of states + */ + public Collection getStates(); + + /** + * Return the non initial state pointed by the initial state of the state + * set. + * + * Exemple : + * myComplexeState = ( + * init1 -> state2 -> state3 -> final4 + * ) + * + * myComplexeState.getInitialState() will return state2. + * + * @return a state + */ + public StateModelState getInitialState(); +} Index: lutingenerator/src/java/org/codelutin/generator/models/state/StateModelState.java diff -u /dev/null lutingenerator/src/java/org/codelutin/generator/models/state/StateModelState.java:1.1 --- /dev/null Fri May 25 16:20:14 2007 +++ lutingenerator/src/java/org/codelutin/generator/models/state/StateModelState.java Fri May 25 16:20:08 2007 @@ -0,0 +1,56 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.generator.models.state; + +import java.util.List; + +/** + * StateModelState.java + * + * A state, that can be simple or complexe + * + * @see org.codelutin.generator.models.state.StateModelSimpleState + * @see org.codelutin.generator.models.state.StateModelComplexState + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/25 16:20:08 $ + * By : $Author: chatellier $ + */ +public interface StateModelState { + + /** + * Get the state name + * @return + */ + public String getName(); + + /** + * Return the state's transition set + * @return a list of transition + */ + public List getTransitions(); + + /** + * State complex status + * @return true if the state is complex + */ + public boolean isComplex(); +} Index: lutingenerator/src/java/org/codelutin/generator/models/state/StateModelStateChart.java diff -u /dev/null lutingenerator/src/java/org/codelutin/generator/models/state/StateModelStateChart.java:1.1 --- /dev/null Fri May 25 16:20:14 2007 +++ lutingenerator/src/java/org/codelutin/generator/models/state/StateModelStateChart.java Fri May 25 16:20:08 2007 @@ -0,0 +1,40 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.generator.models.state; + +/** + * StateModelStateChart + * + * A chart is, like ComplexState, a set of state. + * He got a package name. + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/25 16:20:08 $ + * By : $Author: chatellier $ + */ +public interface StateModelStateChart extends StateModelComplexState { + + /** + * Get package name + * @return package name + */ + public String getPackageName(); +}