Class OpgraphEditorModelFactory
java.lang.Object
ca.phon.app.opgraph.editor.OpgraphEditorModelFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap<Class<? extends OpgraphEditorModel>, IPluginExtensionFactory<? extends OpgraphEditorModel>> List<Class<? extends OpgraphEditorModel>> Return a list of available models types.fromGraph(ca.phon.opgraph.OpGraph graph) Create a newOpgraphEditorModelfrom the givenOpGraph.fromType(Class<? extends OpgraphEditorModel> modelType)
-
Field Details
-
MODEL_TYPE_KEY
- See Also:
-
-
Constructor Details
-
OpgraphEditorModelFactory
public OpgraphEditorModelFactory()
-
-
Method Details
-
availableModelTypes
Return a list of available models types. Each model should be a subclass ofOpgraphEditorModel. Each subclass should implement both the default constructor and theOpGraphconstructor as well as handle both cases in theIPluginExtensionFactoryimplementation.- Returns:
- list of available editor model types
-
availableFactories
public Map<Class<? extends OpgraphEditorModel>, IPluginExtensionFactory<? extends OpgraphEditorModel>> availableFactories() -
fromType
-
fromGraph
Create a newOpgraphEditorModelfrom the givenOpGraph. If theOpGraphincludes a a setting for the propertyca.phon.app.opgraph.editor.modeltypethis method will attempt to create the appropriate model using the registered factory. Otherwise aMacroOpgraphEditorModelis returned.- Parameters:
graph-- Throws:
ClassNotFoundException
-