Class AbstractObjectModelReader
- java.lang.Object
-
- org.nuiton.eugene.ModelReader<ObjectModel>
-
- org.nuiton.eugene.models.object.reader.AbstractObjectModelReader
-
- Direct Known Subclasses:
FriendObjectModelReader,XmlObjectModelReader,YamlObjectModelReader
public abstract class AbstractObjectModelReader extends ModelReader<ObjectModel>
Abstract object model reader.- Since:
- 2.6.3
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
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 voidaddAllSubPackages(ObjectModelImpl model)Add all missing sub packages in a model.protected voidaddSubPackages(ObjectModelImpl model, String aPackageName)protected voidbeforeReadFile(File... files)StringgetModelType()Gets the type of model.ObjectModelread(File... files)Read files to produce a memory model.protected abstract voidreadFileToModel(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:ModelReaderGets the type of model.- Specified by:
getModelTypein 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:ModelReaderRead files to produce a memory model.- Specified by:
readin 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)
-
-