Package com.logicaldoc.ai.serializer
Class DocumentSerializer
java.lang.Object
com.logicaldoc.ai.serializer.Serializer
com.logicaldoc.ai.serializer.DocumentSerializer
An 
Serializer that uses Documents- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionRetrieves a reference (path, id or other) to a file used by the modelloadTrainedModel(AIModel<?, ?> model) loadTrainingData(AIModel<?, ?> model) voidsaveTrainedModel(AIModel<?, ?> model, InputStream data) Saves the trained model, the input stream gets closedvoidsaveTrainingData(AIModel<?, ?> model, InputStream data) Saves the training data set, the input stream gets closedMethods inherited from class com.logicaldoc.ai.serializer.SerializerexportModel, importModel
- 
Constructor Details- 
DocumentSerializerpublic DocumentSerializer()
 
- 
- 
Method Details- 
loadTrainingDatapublic InputStream loadTrainingData(AIModel<?, ?> model) throws IOException, com.logicaldoc.core.PersistenceException- Specified by:
- loadTrainingDatain class- Serializer
- Throws:
- IOException
- com.logicaldoc.core.PersistenceException
 
- 
loadTrainedModelpublic InputStream loadTrainedModel(AIModel<?, ?> model) throws IOException, com.logicaldoc.core.PersistenceException- Specified by:
- loadTrainedModelin class- Serializer
- Throws:
- IOException
- com.logicaldoc.core.PersistenceException
 
- 
saveTrainingDatapublic void saveTrainingData(AIModel<?, ?> model, InputStream data) throws IOException, com.logicaldoc.core.PersistenceExceptionDescription copied from class:SerializerSaves the training data set, the input stream gets closed- Specified by:
- saveTrainingDatain class- Serializer
- Parameters:
- model- The model
- data- The data to save
- Throws:
- IOException- Error storing the training data
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
- 
saveTrainedModelpublic void saveTrainedModel(AIModel<?, ?> model, InputStream data) throws IOException, com.logicaldoc.core.PersistenceExceptionDescription copied from class:SerializerSaves the trained model, the input stream gets closed- Specified by:
- saveTrainedModelin class- Serializer
- Parameters:
- model- The model
- data- The data to save
- Throws:
- IOException- Error storing the model
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
- 
getFilepublic String getFile(AIModel<?, ?> model, String suffix) throws IOException, com.logicaldoc.core.PersistenceExceptionDescription copied from class:SerializerRetrieves a reference (path, id or other) to a file used by the model- Specified by:
- getFilein class- Serializer
- Parameters:
- model- The model
- suffix- The file suffix
- Returns:
- the file's reference
- Throws:
- IOException- Error retrieving the file
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
 
-