Class AbstractObjectModelReader
- java.lang.Object
-
- org.nuiton.eugene.ModelReader<ObjectModel>
-
- org.nuiton.eugene.models.object.reader.AbstractObjectModelReader
-
- Direct Known Subclasses:
XmlObjectModelReader
,YamlObjectModelReader
public abstract class AbstractObjectModelReader extends ModelReader<ObjectModel>
Abstract object model reader.- Since:
- 2.6.3
- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Field Summary
-
Fields inherited from class org.nuiton.eugene.ModelReader
strictLoading, tagValueMetadatasProvider, verbose
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectModelReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addAllSubPackages(ObjectModelImpl model)
Add all missing sub packages in a model.protected void
addSubPackages(ObjectModelImpl model, String aPackageName)
protected void
beforeReadFile(File... files)
String
getModelType()
Gets the type of model.ObjectModel
read(File... files)
Read files to produce a memory model.protected abstract void
readFileToModel(File file, ObjectModel model)
-
Methods inherited from class org.nuiton.eugene.ModelReader
getInputType, isStrictLoading, isVerbose, setStrictLoading, setVerbose
-
-
-
-
Method Detail
-
getModelType
public String getModelType()
Description copied from class:ModelReader
Gets the type of model.- Specified by:
getModelType
in classModelReader<ObjectModel>
- Returns:
- the type of model.
- See Also:
ModelHelper.ModelType
-
readFileToModel
protected abstract void readFileToModel(File file, ObjectModel model) throws IOException
- Throws:
IOException
-
beforeReadFile
protected void beforeReadFile(File... files)
-
read
public ObjectModel read(File... files) throws IOException
Description copied from class:ModelReader
Read files to produce a memory model.- Specified by:
read
in classModelReader<ObjectModel>
- Parameters:
files
- files to read- Returns:
- the new model builded from files
- Throws:
IOException
- if any IO errors while reading files
-
addAllSubPackages
protected void addAllSubPackages(ObjectModelImpl model)
Add all missing sub packages in a model.- Parameters:
model
- the model to scan
-
addSubPackages
protected void addSubPackages(ObjectModelImpl model, String aPackageName)
-
-