|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
pipe.dataLayer.DataLayer
public class DataLayer
DataLayer - Encapsulates entire Petri-Net, also contains functions to perform calculations
Field Summary | |
---|---|
static java.lang.String |
pnmlName
PNML File Name |
Constructor Summary | |
---|---|
DataLayer()
Create empty Petri-Net object |
|
DataLayer(java.io.File pnmlFile)
Create Petri-Net object from pnmlFile |
|
DataLayer(java.lang.String pnmlFileName)
Create Petri-Net object from PNML file with URI pnmlFileName |
Method Summary | |
---|---|
void |
addArc(Arc arcInput)
Add arcInput to back of the Arc ArrayList All observers are notified of this change (Model-View Architecture) |
void |
addPetriNetObject(PetriNetObject pnObject)
Add any PetriNetObject - the object will be added to the appropriate list. |
void |
createFromPNML(org.w3c.dom.Document PNMLDoc)
Create model from transformed PNML file |
Transition |
fireRandomTransition()
This method will fire a random transition, and gives precedence to immediate transitions before considering "timed" transitions. |
void |
fireRandomTransitionBackwards()
|
void |
fireTransition(Transition transition)
Fire a specified transition, no affect if transtions not enabled |
void |
fireTransitionBackwards(Transition transition)
|
Arc |
getArc(java.lang.String arcName)
Return the Arc called arcName from the Petri-Net |
Arc[] |
getArcs()
Get an List of all the Arcs objects in the Petri-Net |
int[][] |
getBackwardsIncidenceMatrix()
Return the Backward Incidence Matrix for the Petri-Net |
int[] |
getCurrentMarkupMatrix()
Return the Initial Markup Matrix for the Petri-Net |
int[][] |
getForwardsIncidenceMatrix()
Return the Foward Incidence Matrix for the Petri-Net |
int[][] |
getIncidenceMatrix()
Return the Incidence Matrix for the Petri-Net |
int[] |
getInitialMarkupMatrix()
Return the Initial Markup Matrix for the Petri-Net |
AnnotationNote[] |
getLabels()
Get a List of all the net-level NameLabel objects in the Petri-Net |
java.util.Iterator |
getPetriNetObjects()
Returns an iterator of all PetriNetObjects - the order of these cannot be guaranteed. |
Place |
getPlace(int placeNo)
Return the Place called placeName from the Petri-Net |
Place |
getPlace(java.lang.String placeName)
Return the Place called placeName from the Petri-Net |
Place[] |
getPlaces()
Get an List of all the Place objects in the Petri-Net |
int |
getPlacesCount()
|
PlaceTransitionObject |
getPlaceTransitionObject(java.lang.String ptoId)
Return the PlaceTransitionObject called ptoName from the Petri-Net |
Transition |
getTransition(int transitionNo)
Return the Transition called transitionName from the Petri-Net |
Transition |
getTransition(java.lang.String transitionName)
Return the Transition called transitionName from the Petri-Net |
Transition[] |
getTransitions()
Get an List of all the Transition objects in the Petri-Net |
int |
getTransitionsCount()
|
java.lang.String |
getURI()
Return a URI for the PNML file for the Petri-Net |
void |
print()
prints out a brief representation of the dataLayer object |
void |
removePetriNetObject(PetriNetObject pnObject)
Removes the specified object from the appropriate ArrayList of objects. |
void |
resetEnabledTransitions()
|
void |
restoreState()
Restores To previous Stored Markup |
java.util.Iterator |
returnTransitions()
|
void |
setEnabledTransitions()
Determines whether all transitions are enabled and sets the correct value of the enabled boolean |
void |
storeState()
Stores Current Markup |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String pnmlName
Constructor Detail |
---|
public DataLayer(java.lang.String pnmlFileName)
pnmlFileName
- Name of PNML Filepublic DataLayer(java.io.File pnmlFile)
pnmlFile
- PNML Filepublic DataLayer()
Method Detail |
---|
public void addArc(Arc arcInput)
arcInput
- Arc Object to addpublic void addPetriNetObject(PetriNetObject pnObject)
pnObject
- The PetriNetObject to be added.public void removePetriNetObject(PetriNetObject pnObject)
pnObject
- The PetriNetObject to be removed.public java.util.Iterator returnTransitions()
public java.util.Iterator getPetriNetObjects()
public void storeState()
public void restoreState()
public void fireTransition(Transition transition)
transition
- Reference of specifiec Transitionpublic Transition fireRandomTransition()
public void fireTransitionBackwards(Transition transition)
public void fireRandomTransitionBackwards()
public void setEnabledTransitions()
public void resetEnabledTransitions()
public Place[] getPlaces()
public int getPlacesCount()
public AnnotationNote[] getLabels()
public Transition[] getTransitions()
public int getTransitionsCount()
public Arc[] getArcs()
public Transition getTransition(java.lang.String transitionName)
transitionName
- Name of Transition object to return
public Transition getTransition(int transitionNo)
transitionNo
- No of Transition object to return
public Place getPlace(java.lang.String placeName)
placeName
- Name of Place object to return
public Place getPlace(int placeNo)
placeNo
- No of Place object to return
public Arc getArc(java.lang.String arcName)
arcName
- Name of Arc object to return
public PlaceTransitionObject getPlaceTransitionObject(java.lang.String ptoId)
ptoId
- Id of PlaceTransitionObject object to return
public int[][] getForwardsIncidenceMatrix()
public int[][] getBackwardsIncidenceMatrix()
public int[][] getIncidenceMatrix()
public int[] getInitialMarkupMatrix()
public int[] getCurrentMarkupMatrix()
public void createFromPNML(org.w3c.dom.Document PNMLDoc)
filename
- URI location of PNMLpublic java.lang.String getURI()
public void print()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |