public String getOwner() { return this.delegate.getOwner(); }
public List<Publication> getPublicationByOwner( String owner, int first, int max) throws ImexCentralException { List<Publication> publications = new ArrayList<Publication>( ); for ( int i = first; i <= max; i++ ) { Publication p = allPublications.get(i); if( owner.equals(p.getOwner()) ) { publications.add( p ); } } return publications; }
private String showPublication( Publication p ) { StringBuilder sb = new StringBuilder( 128 ); sb.append( "Publication[" ); sb.append( "Identifier: " ).append( p.getIdentifier() ).append( ", " ); sb.append( "Owner: " ).append( p.getOwner() ); sb.append( "]" ); return sb.toString(); }
private static void print( Publication p ) { System.out.println( "-- " + p.getIdentifier().size() + " identifiers ------------------------" ); System.out.println( "Author: " + p.getAuthor() ); System.out.println( "Title: " + p.getTitle() ); System.out.println( "IMEx id: " + p.getImexAccession() ); System.out.println( "Owner: " + p.getOwner() ); System.out.println( "Status: " + p.getStatus() ); System.out.println( "Release date: " + p.getReleaseDate() ); } }
public static void main( String[] args ) throws Exception { if ( args.length < 3 ) { System.err.println( "Usage: java " + "-Djavax.net.ssl.trustStore=<path.to.keystore> " + "-Djavax.net.ssl.keyStorePassword=<password> " + "Playground <imexcentral.username> <imexcentral.password> <pmid>" ); System.exit( 1 ); } final String icUsername = args[0]; final String icPassword = args[1]; final String pmid = args[2]; ImexCentralClient client = new DefaultImexCentralClient( icUsername, icPassword, DefaultImexCentralClient.IC_TEST ); final Publication publication = client.getPublicationById( pmid ); if( publication == null ) { System.err.println( "Could not find this publication in IMExCentral." ); } else { System.out.println( "Identifier: " + publication.getIdentifier() ); System.out.println( "Title: " + publication.getTitle() ); System.out.println( "IMEx ID: " + publication.getImexAccession() ); System.out.println( "Owner: " + publication.getOwner() ); System.out.println( "Status: " + publication.getStatus() ); } } }