Skip to content

openaire/openaire-funders-jaxb-model

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAIRE Funders Model

This repository contains the data model used in the OpenAIRE Funders API.

Use this JAR as a dependency in projects for marshalling and unmarshalling OpenAIRE Funders API.

Usage examples

InputStream is = getClass().getClassLoader().getResourceAsStream("example.xml");

Response response = OpenAIREHandler.unmarshal(is);
is.close();

//We can have multiple results, let's pick the first one
Result result = response.getResults().getResult().get(0);

assertNotNull(result);
assertNotNull(result.getMetadata().getEntity().getProject());

ProjectHelper projectHelper = new ProjectHelper(
		result.getMetadata().getEntity().getProject().getCodeOrTitleOrAcronym());

		
// get the first item (according to the model can have multiple)
System.out.println ("Project Code: " + projectHelper.getCodes().stream().findFirst().get());

// get all titles in a project
for (String title : projectHelper.getTitles()) {
	System.out.println("Title: " + title);
}

About

OpenAIRE Funders API Jaxb model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%