/** * Creates a valid BioSource (ie a source organism) instance. A valid instance must have at least a non-null * shortLabel specified. A side-effect of this constructor is to set the <code>created</code> and * <code>updated</code> fields of the instance to the current time. * * @param shortLabel The label used to identify this instance * @param taxId the NCBI taxId, which must be unique if defined (may be null) * @param owner The <code>Institution</code> which 'owns' this BioSource * * @throws NullPointerException thrown if either no shortLabel or Institution specified. */ public BioSource( Institution owner, String shortLabel, String taxId ) { //super call sets up a valid AnnotatedObject super( shortLabel, owner ); setTaxId( taxId ); }
/** * Creates a valid BioSource (ie a source organism) instance. A valid instance must have at least a non-null * shortLabel specified. A side-effect of this constructor is to set the <code>created</code> and * <code>updated</code> fields of the instance to the current time. * * @param shortLabel The label used to identify this instance * @param taxId the NCBI taxId, which must be unique if defined (may be null) * * @throws NullPointerException thrown if either no shortLabel or Institution specified. */ public BioSource( String shortLabel, String taxId ) { //super call sets up a valid AnnotatedObject super( shortLabel ); setTaxId( taxId ); }
/** * Creates a valid BioSource (ie a source organism) instance. A valid instance must have at least a non-null * shortLabel specified. A side-effect of this constructor is to set the <code>created</code> and * <code>updated</code> fields of the instance to the current time. * * @param shortLabel The label used to identify this instance * @param taxId the NCBI taxId, which must be unique if defined (may be null) * * @throws NullPointerException thrown if either no shortLabel or Institution specified. */ public BioSource( String shortLabel, String taxId ) { //super call sets up a valid AnnotatedObject super( shortLabel ); setTaxId( taxId ); }
public BioSource cloneBioSource(BioSource bioSource) throws IntactClonerException { if (bioSource == null) return null; BioSource clone = new BioSource(); clonerManager.addClone(bioSource, clone); clone.setTaxId(bioSource.getTaxId()); clone.setCvCellType(clone(bioSource.getCvCellType())); clone.setCvTissue(clone(bioSource.getCvTissue())); return clone; }
public BioSource cloneBioSource(BioSource bioSource) throws IntactClonerException { if (bioSource == null) return null; BioSource clone = new BioSource(); clonerManager.addClone(bioSource, clone); clone.setTaxId(bioSource.getTaxId()); clone.setCvCellType(clone(bioSource.getCvCellType())); clone.setCvTissue(clone(bioSource.getCvTissue())); return clone; }
public BioSource psiToIntact(Organism psiObject) { if (psiObject == null) return null; psiStartConversion(psiObject); int taxId = psiObject.getNcbiTaxId(); BioSource bioSource = new BioSource(); bioSource.setTaxId(String.valueOf(taxId)); bioSource.setOwner(getInstitution()); IntactConverterUtils.populateNames(psiObject.getNames(), bioSource, aliasConverter); // cell type final CellType cellType = psiObject.getCellType(); if (cellType != null) { CvCellType intactCellType = cellTypeConverter.psiToIntact(cellType); bioSource.setCvCellType(intactCellType); } // tissue final Tissue tissue = psiObject.getTissue(); if (tissue != null) { CvTissue intactTissue = tissueConverter.psiToIntact(tissue); bioSource.setCvTissue(intactTissue); } if (psiObject.getCompartment() != null){ log.warn("Organism having a compartment : "+psiObject.getNcbiTaxId()+". Compartment is not converted in IntAct and is ignored."); } psiEndConversion(psiObject); return bioSource; }
bs.setTaxId( String.valueOf( taxon.getTaxid() ) );
bioSource.setTaxId( newtTaxid ); log.debug( "Obsolete taxid: taxid " + bioSource.getTaxId() + " becomes " + newtTaxid );