Package slash.navigation.datasources
Class DataSourceManager
java.lang.Object
slash.navigation.datasources.DataSourceManager
Encapsulates access to the download of the DataSource XMLs.
- Author:
- Christian Pesch
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringServer backward-compat (RouteConverter 3.3): the server strips<source>from/v1/datasources/<id>.xmlby default to keep older JAXB bindings happy.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()voiddownloadDataSources(List<DataSource> dataSources, File directory) voiddownloadEditions(List<Edition> editions, File directory) voiddownloadRoot(String url, File directory) voidinitialize(String editionId, File directory) static DataSourceServiceloadAllDataSources(File directory) queueForDownload(DataSource dataSource, Downloadable downloadable) voidvoid
-
Field Details
-
V1
- See Also:
-
DATASOURCES_URI
- See Also:
-
FORMAT_XML
- See Also:
-
INCLUDE_SOURCE_PROPERTY
Server backward-compat (RouteConverter 3.3): the server strips<source>from/v1/datasources/<id>.xmlby default to keep older JAXB bindings happy. Server-side tools (SnapshotCatalog, UpdateCatalog, MigrateCatalogSources) set the system propertyrc.includeSource=trueso the URL builder appends&includeSource=trueand the server returns the full document. Seedownload-tools/SCAN_CLIENT.md→ "Server backward-compat".- See Also:
-
DOT_MAP
- See Also:
-
DOT_MBTILES
- See Also:
-
DOT_XML
- See Also:
-
DOT_ZIP
- See Also:
-
-
Constructor Details
-
Method Details
-
getDataSourceService
-
getDownloadManager
-
dispose
public void dispose() -
initialize
public void initialize(String editionId, File directory) throws IOException, jakarta.xml.bind.JAXBException - Throws:
IOExceptionjakarta.xml.bind.JAXBException
-
update
public void update(String editionId, String url, File directory) throws IOException, jakarta.xml.bind.JAXBException - Throws:
IOExceptionjakarta.xml.bind.JAXBException
-
downloadRoot
-
downloadEditions
-
downloadDataSources
-
loadAllDataSources
public static DataSourceService loadAllDataSources(File directory) throws IOException, jakarta.xml.bind.JAXBException - Throws:
IOExceptionjakarta.xml.bind.JAXBException
-
scanForFilesMissingInQueue
- Throws:
IOException
-