public Publication createPublicationById( String identifier ) throws ImexCentralException { Publication p = new Publication(); final Identifier i = new Identifier(); i.setAc( identifier ); i.setNs("pmid"); p.getIdentifier().add(i); p.setImexAccession( "N/A" ); allPublications.add( p ); return p; }
public void addPublication( String identifier, String imexAccession, String status, String owner ) { Publication p = new Publication(); final Identifier id = new Identifier(); id.setAc( identifier ); p.getIdentifier().add(id); p.setImexAccession( ( imexAccession == null ? "N/A" : imexAccession ) ); p.setStatus( status ); p.setOwner( owner ); allPublications.add( p ); }
private Identifier buildIdentifier( String identifier, String source ) { final Identifier id = new ObjectFactory().createIdentifier(); id.setAc( identifier ); // IMEx identifier if( source.equals("imex") && identifier.startsWith( "IM-" ) ) { // this will enable searching for publication by IMEx id ... not obvious but it works ... id.setNs( "imex" ); } // valid pubmed identifier else if (source.equals("pubmed") && Pattern.matches(pubmed_regexp.toString(), identifier)) { // fallback namespace id.setNs( "pmid" ); } // unassigned publication = internal identifier or internal identifiers else if (source.equals("pubmed")){ id.setNs( "jint" ); } // doi number else if (source.equals("doi")){ id.setNs("doi"); } else{ id.setNs( "jint" ); } return id; } }
protected static Identifier buildIdentifier( String identifier ) { final Identifier id = new ObjectFactory().createIdentifier(); id.setAc( identifier ); // IMEx identifier if( identifier.startsWith( "IM-" ) ) { // this will enable searching for publication by IMEx id ... not obvious but it works ... id.setNs( "imex" ); } // valid pubmed identifier else if (Pattern.matches(pubmed_regexp.toString(), identifier)) { // fallback namespace id.setNs( "pmid" ); } // unassigned publication = internal identifier else if (identifier.startsWith("unassigned")){ id.setNs( "jint" ); } // doi number else { id.setNs("doi"); } return id; } }
protected static Identifier buildIdentifier( String identifier ) { final Identifier id = new ObjectFactory().createIdentifier(); id.setAc( identifier ); // IMEx identifier if( identifier.startsWith( "IM-" ) ) { // this will enable searching for publication by IMEx id ... not obvious but it works ... id.setNs( "imex" ); } // valid pubmed identifier else if (Pattern.matches(pubmed_regexp.toString(), identifier)) { // fallback namespace id.setNs( "pmid" ); } // unassigned publication = internal identifier else if (identifier.startsWith("unassigned")){ id.setNs( "jint" ); } // doi number else { id.setNs("doi"); } return id; }
public void addPublication( String identifier, String imexAccession, String status, String owner ) { Publication p = new Publication(); final Identifier id = new Identifier(); id.setAc( identifier ); p.getIdentifier().add(id); p.setImexAccession( ( imexAccession == null ? "N/A" : imexAccession ) ); p.setStatus( status ); p.setOwner( owner ); allPublications.add( new ImexPublication(p)); }
id.setAc(id.getAc()); updated = true;