01: /*
02: * Bossa Workflow System
03: *
04: * $Id: Place.java,v 1.8 2004/01/15 22:13:32 gdvieira Exp $
05: *
06: * Copyright (C) 2003,2004 OpenBR Sistemas S/C Ltda.
07: *
08: * This file is part of Bossa.
09: *
10: * Bossa is free software; you can redistribute it and/or modify it
11: * under the terms of version 2 of the GNU General Public License as
12: * published by the Free Software Foundation.
13: *
14: * This program is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * General Public License for more details.
18: *
19: * You should have received a copy of the GNU General Public
20: * License along with this program; if not, write to the
21: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22: * Boston, MA 02111-1307, USA.
23: */
24:
25: package com.bigbross.bossa.wfnet;
26:
27: import java.io.Serializable;
28:
29: /**
30: * This class represents a place. <p>
31: *
32: * @author <a href="http://www.bigbross.com">BigBross Team</a>
33: */
34: public class Place implements Serializable {
35:
36: private int index;
37:
38: private String id;
39:
40: private int initialMarking;
41:
42: /**
43: * Creates a new place. <p>
44: *
45: * @param index the index of this place in the marking array.
46: * @param id the id of this place.
47: * @param initialMarking the initial marking, the number of tokens in
48: * this place when a new case starts.
49: */
50: Place(int index, String id, int initialMarking) {
51: this .index = index;
52: this .id = id;
53: this .initialMarking = initialMarking;
54: }
55:
56: /**
57: * Returns the index of this place. <p>
58: *
59: * @return the index of this place.
60: */
61: public int getIndex() {
62: return index;
63: }
64:
65: /**
66: * Returns the id of this place. <p>
67: *
68: * @return the id of this place.
69: */
70: public String getId() {
71: return id;
72: }
73:
74: /**
75: * Returns the initial marking of this place. <p>
76: *
77: * @return the initial marking of this place.
78: */
79: public int getInitialMarking() {
80: return initialMarking;
81: }
82: }
|