if( response != null)
{
log.debug("message is: " + response.marshall());
// iterate over the data and output it
SWORDEntry entry = response.getEntry();
System.out.println("Id: " + entry.getId());
Title title = entry.getTitle();
if( title != null )
{
System.out.print("Title: " + title.getContent() + " type: " );
if( title.getType() != null )
{
System.out.println(title.getType().toString());
}
else
{
System.out.println("Not specified.");
}
}
// process the authors
Iterator<Author> authors = entry.getAuthors();
while( authors.hasNext() )
{
Author author = authors.next();
System.out.println("Author - " + author.toString() );
}
Iterator<String> categories = entry.getCategories();
while( categories.hasNext() )
{
System.out.println("Category: " + categories.next());
}
Iterator<Contributor> contributors = entry.getContributors();
while( contributors.hasNext() )
{
Contributor contributor = contributors.next();
System.out.println("Contributor - " + contributor.toString());
}
Iterator<Link> links = entry.getLinks();
while( links.hasNext() )
{
Link link = links.next();
System.out.println(link.toString());
}
Generator generator = entry.getGenerator();
if( generator != null )
{
System.out.println("Generator - " + generator.toString());
}
else
{
System.out.println("There is no generator");
}
System.out.println( "Published: " + entry.getPublished());
Content content = entry.getContent();
if( content != null )
{
System.out.println(content.toString());
}
else
{
System.out.println("There is no content element.");
}
Rights right = entry.getRights();
if( right != null )
{
System.out.println(right.toString());
}
else
{
System.out.println("There is no right element.");
}
Summary summary = entry.getSummary();
if( summary != null )
{
System.out.println(summary.toString());
}
else
{
System.out.println("There is no summary element.");
}
System.out.println("Update: " + entry.getUpdated() );
System.out.println("Published: " + entry.getPublished());
System.out.println("Verbose Description: " + entry.getVerboseDescription());
System.out.println("Treatment: " + entry.getTreatment());
System.out.println("Packaging: " + entry.getPackaging());
if( entry.isNoOpSet() )
{
System.out.println("NoOp: " + entry.isNoOp());
}
}
else
{
System.out.println("No valid Entry document was received from the server");