I
- input symbol typeSP
- state property typeTP
- transition property typeA
- automaton typepublic class DOTMutableAutomatonParser<I,SP,TP,A extends MutableAutomaton<?,I,?,SP,TP>> extends Object implements InputModelDeserializer<I,A>
MutableAutomaton
s.Constructor and Description |
---|
DOTMutableAutomatonParser(AutomatonCreator<A,I> creator,
Function<Map<String,String>,SP> nodeParser,
Function<Map<String,String>,Pair<I,TP>> edgeParser,
Collection<String> initialNodeIds,
boolean fakeInitialNodeIds)
Parser for arbitrary
MutableAutomaton s with a custom automaton instance, custom node and edge attributes
and custom labels for the initial nodes. |
Modifier and Type | Method and Description |
---|---|
InputModelData<I,A> |
readModel(InputStream is)
Reads the contents from the given input stream and de-serializes it into a model instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readModel, readModel, readModel
public DOTMutableAutomatonParser(AutomatonCreator<A,I> creator, Function<Map<String,String>,SP> nodeParser, Function<Map<String,String>,Pair<I,TP>> edgeParser, Collection<String> initialNodeIds, boolean fakeInitialNodeIds)
MutableAutomaton
s with a custom automaton instance, custom node and edge attributes
and custom labels for the initial nodes.creator
- a creator that is used to instantiate the returned automatonnodeParser
- a node parser that extracts from a property map of a node the state propertyedgeParser
- an edge parser that extracts from a property map of an edge the input symbol and transition propertyinitialNodeIds
- the ids of the initial nodesfakeInitialNodeIds
- a flag indicating whether or not the initialNodeIds
are artificial or not. If true
, the
nodes matching the initialNodeIds
will not be added to the automaton. Instead, their direct
successors will be initial states instead. This may be useful for instances where there are artificial
nodes used to display in incoming arrow for the actual initial states. If false
, the nodes
matching the initialNodeIds
will be used as initial nodes.public InputModelData<I,A> readModel(InputStream is) throws IOException
ModelDeserializer
Note: the input stream will not be closed.
readModel
in interface ModelDeserializer<InputModelData<I,A extends MutableAutomaton<?,I,?,SP,TP>>>
is
- the input stream to read data fromIOException
- if an error occurred while reading from the streamCopyright © 2020. All rights reserved.