Package org.fastnate.data.xml
Class JaxbImporter<T>
java.lang.Object
org.fastnate.data.xml.JaxbImporter<T>
- Type Parameters:
T- the type of the imported entities
Imports an entity from an XML file using
JAXB.- Author:
- Tobias Liefke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionimportFile(DataFile file) Imports the entity from the given file.
-
Constructor Details
-
JaxbImporter
Creates a newJaxbImporterinstance.- Parameters:
entityClass- The type of the imported entities.
-
-
Method Details
-
importFile
Imports the entity from the given file.- Parameters:
file- the file that contains the entity- Returns:
- the entity from that file
- Throws:
IOException- if the file was not accessibleDataImportException- if the file content was invalid
-