@Test public void testGetMediaInfoId() throws IOException, MediaWikiApiErrorException { Map<String, String> parameters = new HashMap<>(); parameters.put("action", "query"); parameters.put("format", "json"); parameters.put("titles", "File:Albert Einstein Head.jpg"); con.setWebResourceFromPath(parameters, getClass(), "/query-Albert Einstein Head.jpg.json", CompressionType.NONE); MediaInfoIdValue result = wdf.getMediaInfoIdByFileName("File:Albert Einstein Head.jpg"); assertEquals("M925243", result.getId()); }
public MediaInfoIdValue getMediaInfoIdByFileName(String fileName) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(fileName).get(fileName); }
WikibaseDataFetcher { public MediaInfoIdValue getMediaInfoIdByFileName(String fileName) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(fileName).get(fileName); } }
WikibaseDataFetcher { public MediaInfoIdValue getMediaInfoIdByFileName(String fileName) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(fileName).get(fileName); } WikibaseDataFetcher(ApiConnection connection, String siteUri); }
WikibaseDataFetcher { public MediaInfoIdValue getMediaInfoIdByFileName(String fileName) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(fileName).get(fileName); } 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 MediaInfoIdValue getMediaInfoIdByFileName(String fileName) throws IOException, MediaWikiApiErrorException { return getMediaInfoIdsByFileName(fileName).get(fileName); } 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);  }