Package org.ctan.site.services.catalogue
Class PkgsImportService
java.lang.Object
org.ctan.site.services.catalogue.AbstractImportService<PkgStore>
org.ctan.site.services.catalogue.PkgsImportService
This service deals with the packages from a file.
The file encoding is UTF-8.
<entry id="the-key" > <name>...</name> ... </entry>
- The root node is
entry
.
-
Field Summary
Fields inherited from class org.ctan.site.services.catalogue.AbstractImportService
entries, store
-
Constructor Summary
ConstructorsConstructorDescriptionPkgsImportService
(@NonNull File entries, @NonNull PkgStore store, @NonNull AuthorStore authorStore, @NonNull TopicStore topicsStore, @NonNull LicenseStore licenseStore) This is the constructor forPkgsImportService
. -
Method Summary
Methods inherited from class org.ctan.site.services.catalogue.AbstractImportService
neq
-
Constructor Details
-
PkgsImportService
public PkgsImportService(@NonNull @NonNull File entries, @NonNull @NonNull PkgStore store, @NonNull @NonNull AuthorStore authorStore, @NonNull @NonNull TopicStore topicsStore, @NonNull @NonNull LicenseStore licenseStore) This is the constructor forPkgsImportService
.- Parameters:
entries
- the entries directorystore
- the package storeauthorStore
- the author storetopicsStore
- the topic storelicenseStore
- the license store
-
-
Method Details
-
drop
The methoddrop
provides means to drop some packages.- Parameters:
pkgsToBeDropped
- the packages to be dropped
-
updateExisting
The methodupdateExisting
provides means to parse an XML file and add the entries found to the database. As a side effect a list of packages is collected which are not in the XML files.- Returns:
- the packages to be dropped
- Throws:
IOException
- in case of an I/O error
-