Importer
From DISMARC Help
Importer are the components of the application that are responsible for converting one's archive native data into the DISMARC compliant format.
The importer consists of three sub components.
Contents |
Settings
Actually, the Importer is just some lines of XML which contain the information about what files shall be imported from where with what Reader and what Mapper in what encoding.
<Importer active="true" db="0" archive="ARCHIVE" id="ARCHIVE_NATIVE_TO_DMOAP" description="Default Archive importer" indexAfterSave="true"> <Reader class="importparser.recordreaders.DummyReader" /> <Mapper class="importparser.mapper.DummyMapper" /> <DefaultEncoding>utf-8</DefaultEncoding> <NewFilesDir pattern="/xml/">Archive/newfiles</NewFilesDir> <RepositoryDir>Archive/repository</RepositoryDir> <LogFile>Archive/Archive.log</LogFile> <ContactMail>someone@archive.local</ContactMail> </Importer>
Classes
The Reader and the Mapper elements provide the path and classname of the proper reader and mapper
Importer
- @active
- When run as a cronjob, shall this importer be used.
- @db
- What Database to use
- @archive
- To what archive does this importer belong to
- @id
- What's the ID of the mapper.
- @description
- Some description of what the importer is about
- @indexAfterSave
- shall the records be indexed right after they have been saved? This is only used during the automated import.
DefaultEncoding
This is the encoding the files is written in. Use UTF-8 for XML.
NewFilesDir
Where can the importer find new files when used during the automated import. This directory will be read recursive.
- @pattern
- What pattern the files have to match.
RepositoryDir
Where to put the files form the NewfileDir. Do not put the files into a subdirectory of NewfileDir for there can be a endless loop
ContactMail
Whenever an automated import is done, where shall the import summary will be sent to?
Importing process
...