public Publication createPublication(String pmid) { Publication pub = new Publication(getInstitution(), pmid); return pub; }
public Publication createPublication(String pmid) { Publication pub = new Publication(getInstitution(), pmid); IntactContext.getCurrentInstance().getLifecycleManager().getStartStatus().create(pub, "Mock builder"); return pub; }
public Publication createPublication(String pmid) { Publication pub = new Publication(getInstitution(), pmid); IntactContext.getCurrentInstance().getLifecycleManager().getStartStatus().create(pub, "Mock builder"); return pub; }
private Publication createPublication(Bibref bibref, DbReference validPrimaryRef) { String pubId = validPrimaryRef.getId(); Publication publication = (Publication) ConversionCache.getElement("pub:"+pubId); if (publication != null) { return publication; } publication = new Publication(getInstitution(), pubId); IntactConverterUtils.populateXref(bibref.getXref(), publication, this.publicationXrefConverter); IntactConverterUtils.populateAnnotations(bibref, publication, getInstitution(), this.annotationConverter); IntactContext.getCurrentInstance().getLifecycleManager().getStartStatus().create(publication, "created by xml import"); ConversionCache.putElement("pub:"+pubId, publication); return publication; }
public Publication clonePublication(Publication publication) throws IntactClonerException { if (publication == null) return null; Publication clone = new Publication(); clonerManager.addClone(publication, clone); if (isCollectionClonable(publication.getExperiments())) { Collection<Experiment> experiments = IntactCore.ensureInitializedExperiments(publication); for (Experiment e : experiments) { clone.addExperiment(clone(e)); } } if (isCollectionClonable(publication.getLifecycleEvents())) { Collection<LifecycleEvent> events = IntactCore.ensureInitializedLifecycleEvents(publication); for (LifecycleEvent event : events) { clone.addLifecycleEvent(clone(event)); } } clone.setStatus(clone(publication.getStatus())); clone.setCurrentOwner(clone(publication.getCurrentOwner())); clone.setCurrentReviewer(clone(publication.getCurrentReviewer())); return clone; }
public Publication clonePublication(Publication publication) throws IntactClonerException { if (publication == null) return null; Publication clone = new Publication(); clonerManager.addClone(publication, clone); if (isCollectionClonable(publication.getExperiments())) { Collection<Experiment> experiments = IntactCore.ensureInitializedExperiments(publication); for (Experiment e : experiments) { clone.addExperiment(clone(e)); } } if (isCollectionClonable(publication.getLifecycleEvents())) { Collection<LifecycleEvent> events = IntactCore.ensureInitializedLifecycleEvents(publication); for (LifecycleEvent event : events) { clone.addLifecycleEvent(clone(event)); } } clone.setStatus(clone(publication.getStatus())); clone.setCurrentOwner(clone(publication.getCurrentOwner())); clone.setCurrentReviewer(clone(publication.getCurrentReviewer())); return clone; }
private Publication createUnassignedPublication(Bibref bibRef, Experiment exp) { String pubId = PublicationUtils.nextUnassignedId(IntactContext.getCurrentInstance()); Publication publication = (Publication) ConversionCache.getElement("pub:"+pubId); if (publication != null) { return publication; } publication = new Publication(getInstitution(), pubId); CvDatabase pubmed = CvObjectUtils.createCvObject(getInstitution(), CvDatabase.class, CvDatabase.PUBMED_MI_REF, CvDatabase.PUBMED); CvXrefQualifier primary = CvObjectUtils.createCvObject(getInstitution(), CvXrefQualifier.class, CvXrefQualifier.PRIMARY_REFERENCE_MI_REF, CvXrefQualifier.PRIMARY_REFERENCE); // add unassigned as primary ref publication.addXref(new PublicationXref(getInstitution(), pubmed, pubId, primary)); // add unassigned to exeriment exp.addXref(new ExperimentXref(getInstitution(), pubmed, pubId, primary)); if (bibRef != null){ IntactConverterUtils.populateXref(bibRef.getXref(), publication, this.publicationXrefConverter); IntactConverterUtils.populateAnnotations(bibRef, publication, getInstitution(), this.annotationConverter); } IntactContext.getCurrentInstance().getLifecycleManager().getStartStatus().create(publication, "created by xml import"); ConversionCache.putElement("pub:"+pubId, publication); return publication; }