Class DOTMutableAutomatonParser<S,I,SP,TP,A extends MutableAutomaton<S,I,?,SP,TP>>
- java.lang.Object
-
- net.automatalib.serialization.dot.DOTMutableAutomatonParser<S,I,SP,TP,A>
-
- Type Parameters:
S- automaton state typeI- input symbol typeSP- state property typeTP- transition property typeA- automaton type
- All Implemented Interfaces:
DOTInputModelDeserializer<S,I,A>,InputModelDeserializer<I,A>,ModelDeserializer<InputModelData<I,A>>
public class DOTMutableAutomatonParser<S,I,SP,TP,A extends MutableAutomaton<S,I,?,SP,TP>> extends Object implements DOTInputModelDeserializer<S,I,A>
General-purpose DOT parser forMutableAutomatons.
-
-
Constructor Summary
Constructors Constructor 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 arbitraryMutableAutomatons with a custom automaton instance, custom node and edge attributes and custom labels for the initial nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DOTInputModelData<S,I,A>readModel(InputStream is)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.serialization.dot.DOTInputModelDeserializer
readModel, readModel, readModel
-
-
-
-
Constructor Detail
-
DOTMutableAutomatonParser
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)
Parser for arbitraryMutableAutomatons with a custom automaton instance, custom node and edge attributes and custom labels for the initial nodes.- Parameters:
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 theinitialNodeIdsare artificial or not. Iftrue, the nodes matching theinitialNodeIdswill 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. Iffalse, the nodes matching theinitialNodeIdswill be used as initial nodes.
-
-
Method Detail
-
readModel
public DOTInputModelData<S,I,A> readModel(InputStream is) throws IOException
- Specified by:
readModelin interfaceDOTInputModelDeserializer<S,I,SP>- Specified by:
readModelin interfaceModelDeserializer<S>- Throws:
IOException
-
-