Java Software Development Kit

Download the SDK

Requirements

  • JDK 1.7 and above
  • Apache Maven 3.5+
  • IEEE Xplore API Access Key

Source Setup

  • Import the contents of the attached zip file as a maven project in your favorite java editor like eclipse.
  • If you want to run the app from the command line then ensure Java and Maven are in your Path and run mvn: clean package
  • The project has an application.properties file. The API URI and the API Access Key are configured in there.
  • If you run into any issues with the JDK Path in eclipse, try this:
    • In Eclipse, open Window | Preferences | Java | Installed JREs, make sure there's a JDK (and not just a JRE) for Java 1.7, then go to the submenu Execution Environments and mark this JDK as compatible with JavaSE-1.7 or higher. After that, Maven | Update Project should work as desired.

Methods Overview

Note: Parameters are usually strings so they should have quotes around them.

Query Methods

Class: org.ieee.ieeexplore.service.ApiClientService

Method Parameter(s) Usage
findByAbstractText() One parameter: the abstract text Queries text in abstracts.
findByAffiliationText() One parameter: the affiliation text Queries text in affiliation data field.
findByArticleNumber() One parameter: article number Creates a query using IEEE’s unique article identifier.

Note: when used all other query methods are ignored.
findByArticleTitle() One parameter: article title Queries based on the title of an individual document.

Can be used with other query methods, except for findByArticleNumber().
findByAuthorFacetText() One parameter: author facet text Queries text in Open Author Facet data field.
findByAuthorText() One parameter: author text Queries text in author data field.
findByBooleanText() One parameter: boolean query Creates a boolean query against all configured metadata fields, abstract, and document text. Do not include parentheses.
findByContentTypeFacetText() One parameter: content type facet text Queries text in Open Content Type Facet data field.
findByDigitalObjectIdentifier() One parameter: digital object identifier Creates a query using IEEE’s unique digital object identifier.

Note: when used all other query methods are ignored, except for findByArticleNumber(), which overrides the digital object identifier.
findByFacetText() One parameter: facet text Queries text in Open/Facet data field.
findByIndexTerms() One parameter: index terms text Queries text in Author Keywords, IEEE Terms, and Mesh Terms.

Note: include no more than two wildcard words. Each wildcard word must have a minimum of three characters preceding the wildcard (*).
findByIsbn() One parameter: isbn number Queries based on International Standard Book Number.
findByIssn() One parameter: issn number Queries based on International Standard Serial Number.
findByIssueNumber() One parameter: issue number Queries based on Journal Issue Number.
findByMetaDataText() One parameter: meta data text Queries text in configured metadata fields and abstracts.

Note: include no more than two wildcard words. Each wildcard word must have a minimum of three characters preceding the wildcard (*).
findByPublicationFacetText() One parameter: publication facet text Queries text in Open Publication Facet data field.
findByPublisherFacetText() One parameter: publisher facet text Queries text in Open Publisher’s Facet data field.
findByPublicationTitle() One parameter: publication title text Queries text in the title of a publication (Journal, Conferences, or Standard).
findByPublicationYear() One parameter: publication year Queries against the publication year data field.

Note: the format of this data varies by publication.
findByThesaurusTerms() One parameter: thesaurus terms (IEEE terms) text Queries keywords assigned to IEEE journal articles and conference papers from a controlled vocabulary created by the IEEE.

Note: include no more than two wildcard words. Each wildcard word must have a minimum of three characters preceding the wildcard (*).
callAPI() Takes the ApiRequest as a parameter. Returns the ApiResponse.
formatApiResponseAsJson() Takes the ApiRequest as a parameter. Returns the ApiResponse as a JSON string.
formatApiResponseAsXml() Takes the ApiRequest as a parameter. Returns the ApiResponse as an XML string.

Filter and Sort Methods

Method Parameter(s) Usage
setMaxRecords() Configured in the ApiRequest. Sets the maximum size of the result set returned.

Defaults to 25 and has a max of 200.
setResultsFilter() Configured in the ApiRequest.

Accepted keys to the Map are:

"content_type"
"end_year"
"open_access"
"publication_number"
"publisher"
"start_year"

 

Reduces the result set based on the parameter matching the value passed.

Multiple filters can be in place, but only one filter per type (for example, only one end_year filter can be used for filtering).

See the Filtering Parameters for the accepted values.
setSortByField() Configured in the ApiRequest.

Accepted values are:

"author"
"article_number"
"article_title"
"publication_title"
"publication_year"
Sets the field used for sorting.
setSortOrder() Configured in the ApiRequest.

Accepted values are:

"asc"
"desc"
Sets the direction of the sorting.
setStartRecord() Configured in the ApiRequest. Sets the starting position in the set of results (for example, starting at the third result).

Results Method

Method Parameter(s) Usage
setDataType() Configured in the ApiRequest.

One parameter is passed for the data type; the accepted values are:

"json"
"xml"
Sets the data type for the results; defaults to JSON.

Running the Query and Getting Results

Method Parameter(s) Usage
callAPI() Can be called from the Service class ApiClientService.

The method takes ApiRequest as an argument. All the API search configuration can be handled in that class. Documentation is included in the SDK.
Returns the search results bound to an ApiResponse class. If you want raw results, you can call the methods below in the service class:

formatApiResponseAsXml()
formatApiResponseAsJson()

Defaults

  • Data type defaults to JSON.
  • Position 1 in the set of results is the starting position.
  • Results sort by Article Title and in ascending order (A-Z) by default; if the Content Type is set to ‘Standards’ then sorting is by Publication Year because Standards do not have some of the other sorting fields.
  • Maximum number of results returned defaults to 25.

Examples

Italicized text in the examples below should be replaced with your desired values.

Query by Abstract Text

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByAbstractText("query”);

Query by Affiliation

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByAffiliationText("query”);

Query by Article Number

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByArticleNumber("article_number”);

Query by Article Title

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByArticleTitle("query”);

Query by Author Facet

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByAuthorFacetText("query”);

Query by Author Name

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByAuthorName("query”);

Boolean Query

Searches all configured metadata fields, abstract, and document text.

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByBooleanText("boolean_query_without_parentheses");

Query by Open Content Type Facet

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByContentTypeFacetText(“query”);

Query by DOI (Digital Object Identifier)

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByDigitalObjectIdentifier(“query”);

Query by Open/Facet Value

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByFacetText(“query”);

Query by Index Terms

Queries text in Author Keywords, IEEE Terms, and Mesh Terms.

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByIndexTerms(“query”);

Query by ISBN

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByIsbn(“query”);

Query by ISSN

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByIssn(“query”);

Query by Issue Number

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByIssueNumber(“query”);

Query by Meta Data

Queries text in configured metadata fields and abstracts.

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByMetaDataText(“query”);

Query by Publication Facet

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByPublicationFacetText(“query”);

Query by Publisher Facet

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByPublisherFacetText(“query”);

Query by Publication Title

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByPublicationTitle(“query”);

Query by Publication Year

Note: Depending on publication the format of the year may vary.

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByPublicationYear(“year”);

Query by Meta Data, Abstract, or Document Text

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByMetaDataText(“query”);

Query by Thesaurus Terms

Note: Thesaurus Terms are also called IEEE Terms.

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByThesaurusTerms(“query”);

Query Involving a Wildcard

Note: include no more than two wildcard words. Each wildcard word must have a minimum of three characters preceding the wildcard (*).

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByWildcard(“query*”);

Query Involving Multiple Data Fields

ApiClientService service = new ApiClientServiceImpl();
ApiRequest request = new ApiRequest();
request.setAffiliationText(“query”);
// add more search parameters
ApiResponse response = service.callAPI(request);
System.out.println(org.ieee.ieeexplore.util.JsonUtils.marshall(ApiResponse.class, response));

Query Involving Filtering and Sorting of Results

Note: Multiple filters can be added as long as a different data field is specified as its first parameter.

ApiClientService service = new ApiClientServiceImpl();
ApiRequest request = new ApiRequest();
Map<String, String> filterMap = new HashMap<>();
// add filtering criteria to filterMap
request.setResultsFilter(filterMap);
ApiResponse response = service.callAPI(request);
System.out.println(org.ieee.ieeexplore.util.JsonUtils.marshall(ApiResponse.class, response));

Query with XML Object as Data Output

ApiClientService service = new ApiClientServiceImpl();
ApiRequest request = new ApiRequest();
request.setDataType(“xml”);
// add search parameters
ApiResponse response = service.callAPI(request);
System.out.println(org.ieee.ieeexplore.util.JsonUtils.marshall(ApiResponse.class, response));

Query with JSON Object as Data Output

Note: Data type defaults to JSON.

ApiClientService service = new ApiClientServiceImpl();
ApiResponse response = service.findByAbstractText(“query”);
System.out.println(org.ieee.ieeexplore.util.JsonUtils.marshall(ApiResponse.class, response));

Error Messages

Message Text Trigger
No search criteria provided No query methods were used.
Wildcard word {word} has fewer than 3 valid characters (only for search). Wildcard words (word*) must have at least three characters preceding *. Wildcard character (*) used in words with too few characters.
Query contains more than 2 wildcard words (only for search). Wildcard character (*) used too often in a query.
Service Not Found API error; returns HTTP Status Code 500.
Internal Server Error API error; returns HTTP Status Code 596 or HTTP Status Code 500.