@Test public void testGetMediaInfoIdDuplicated2() throws IOException, MediaWikiApiErrorException { Map<String, String> parameters = new HashMap<>(); parameters.put("action", "query"); parameters.put("format", "json"); parameters.put("titles", "File:Cat.jpg|File:Cat.jpg"); con.setWebResourceFromPath(parameters, getClass(), "/query-Cat.jpg.json", CompressionType.NONE); Map<String, MediaInfoIdValue> result = wdf.getMediaInfoIdsByFileName("Cat.jpg", "File:Cat.jpg"); assertEquals(result.size(), 2); assertEquals("M32455073", result.get("Cat.jpg").getId()); assertEquals("M32455073", result.get("File:Cat.jpg").getId()); }
public Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(Arrays.asList(fileNames)); }
WikibaseDataFetcher { public Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(Arrays.asList(fileNames)); } }
WikibaseDataFetcher { public Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(Arrays.asList(fileNames)); } WikibaseDataFetcher(ApiConnection connection, String siteUri); }
WikibaseDataFetcher { public Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(Arrays.asList(fileNames)); } WikibaseDataFetcher(ApiConnection connection, String siteUri); static WikibaseDataFetcher getWikidataDataFetcher(); static WikibaseDataFetcher getWikimediaCommonsDataFetcher(); DocumentDataFilter getFilter(); EntityDocument getEntityDocument(String entityId); Map<String, EntityDocument> getEntityDocuments(String... entityIds); Map<String, EntityDocument> getEntityDocuments(List<String> entityIds); EntityDocument getEntityDocumentByTitle(String siteKey, String title); Map<String, EntityDocument> getEntityDocumentsByTitle(
			String siteKey, String... titles); Map<String, EntityDocument> getEntityDocumentsByTitle(
			String siteKey, List<String> titles); MediaInfoIdValue getMediaInfoIdByFileName(String fileName); Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames); Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(List<String> fileNames); List<WbSearchEntitiesResult> searchEntities(String search); List<WbSearchEntitiesResult> searchEntities(String search, String language); List<WbSearchEntitiesResult> searchEntities(String search, Long limit); List<WbSearchEntitiesResult> searchEntities(String search, String language, Long limit); List<WbSearchEntitiesResult> searchEntities(WbGetEntitiesSearchData properties); }
WikibaseDataFetcher { public Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(Arrays.asList(fileNames)); } WikibaseDataFetcher(ApiConnection connection, String siteUri); static WikibaseDataFetcher getWikidataDataFetcher(); static WikibaseDataFetcher getWikimediaCommonsDataFetcher(); DocumentDataFilter getFilter(); EntityDocument getEntityDocument(String entityId); Map<String, EntityDocument> getEntityDocuments(String... entityIds); Map<String, EntityDocument> getEntityDocuments(List<String> entityIds); EntityDocument getEntityDocumentByTitle(String siteKey, String title); Map<String, EntityDocument> getEntityDocumentsByTitle(
			String siteKey, String... titles); Map<String, EntityDocument> getEntityDocumentsByTitle(
			String siteKey, List<String> titles); MediaInfoIdValue getMediaInfoIdByFileName(String fileName); Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(String... fileNames); Map<String, MediaInfoIdValue> getMediaInfoIdsByFileName(List<String> fileNames); List<WbSearchEntitiesResult> searchEntities(String search); List<WbSearchEntitiesResult> searchEntities(String search, String language); List<WbSearchEntitiesResult> searchEntities(String search, Long limit); List<WbSearchEntitiesResult> searchEntities(String search, String language, Long limit); List<WbSearchEntitiesResult> searchEntities(WbGetEntitiesSearchData properties);  }