Class DatasetIDExtractorUrlPrefixMap
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_base.multisource.DatasetIDExtractorUrlPrefixMap
- All Implemented Interfaces:
DatasetIDExtractor
Extracts the dataset id given a map of URL prefixes and corresponding dataset ID.
The prefix is case dependent and have to be a the start of the url (be sure to include e.g. http://).
-
Field Summary
Fields inherited from interface de.uni_mannheim.informatik.dws.melt.matching_base.multisource.DatasetIDExtractor
CONFERENCE_TRACK_EXTRACTOR, KG_TRACK_EXTRACTOR, LARGE_BIO_TRACK_EXTRACTOR
-
Constructor Summary
ConstructorDescriptionDatasetIDExtractorUrlPrefixMap
(String... prefixesAndIds) Needs the prefix and dataset id in the given order.DatasetIDExtractorUrlPrefixMap
(Map<String, String> prefixMap) Needs the map of prefix to datasetid -
Method Summary
Modifier and TypeMethodDescriptiongetDatasetID
(String uri) Extracts from an URI the corresponding source / dataset identifier (which needs to be included in the URI like a specific domain etc).
-
Field Details
-
prefixMap
-
-
Constructor Details
-
DatasetIDExtractorUrlPrefixMap
Needs the map of prefix to datasetid- Parameters:
prefixMap
- map of prefix to dataset id.
-
DatasetIDExtractorUrlPrefixMap
Needs the prefix and dataset id in the given order. Meaning: prefix1, id1, prefix2, id2 etc. Throws IllegalArgumentException in case the number of arguments is odd.- Parameters:
prefixesAndIds
- prefix and dataset ids in an order
-
-
Method Details
-
getDatasetID
Description copied from interface:DatasetIDExtractor
Extracts from an URI the corresponding source / dataset identifier (which needs to be included in the URI like a specific domain etc).- Specified by:
getDatasetID
in interfaceDatasetIDExtractor
- Parameters:
uri
- the uri which should contain any dataset specific component which is extracted.- Returns:
- the dataset identifier as string
-