public Names getNames() { return organism.getNames(); }
public int getNcbiTaxId() { return organism.getNcbiTaxId(); }
public static Organism createOrganism(int taxid, String name) { Organism organism = new Organism(); organism.setNames(createNames(name, null)); organism.setNcbiTaxId(taxid); return organism; }
jOrganism.setNcbiTaxId( mOrganism.getNcbiTaxId() ); if ( mOrganism.hasNames() ) { jOrganism.setNames( namesConverter.toJaxb( mOrganism.getNames() ) ); if ( mOrganism.hasCellType() ) { jOrganism.setCellType( openCvTypeConverter.toJaxb( mOrganism.getCellType() ) ); if ( mOrganism.hasCompartment() ) { jOrganism.setCompartment( openCvTypeConverter.toJaxb( mOrganism.getCompartment() ) ); if ( mOrganism.hasTissue() ) { jOrganism.setTissue( openCvTypeConverter.toJaxb( mOrganism.getTissue() ) );
public psidev.psi.mi.xml.model.Organism fromJaxb( psidev.psi.mi.xml254.jaxb.BioSource jOrganism ) throws ConverterException { if ( jOrganism == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Organism." ); } psidev.psi.mi.xml.model.Organism mOrganism = new psidev.psi.mi.xml.model.Organism(); // Initialise the model reading the Jaxb object // 1. set attributes mOrganism.setNcbiTaxId( jOrganism.getNcbiTaxId() ); // 2. set encapsulated objects // names if ( jOrganism.getNames() != null ) { mOrganism.setNames( namesConverter.fromJaxb( jOrganism.getNames() ) ); } // cell type if ( jOrganism.getCellType() != null ) { mOrganism.setCellType( openCvTypeConverter.fromJaxb( jOrganism.getCellType(), CellType.class ) ); } // compartment if ( jOrganism.getCompartment() != null ) { mOrganism.setCompartment( openCvTypeConverter.fromJaxb( jOrganism.getCompartment(), Compartment.class ) ); } // tissue if ( jOrganism.getTissue() != null ) { mOrganism.setTissue( openCvTypeConverter.fromJaxb( jOrganism.getTissue(), Tissue.class ) ); } return mOrganism; }
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; }
CellVocabulary cellType = findOrCreateControlledVocabulary(organism.getCellType(), CellVocabulary.class); TissueVocabulary tissue = findOrCreateControlledVocabulary(organism.getTissue(), TissueVocabulary.class); String ncbiId = Integer.toString(organism.getNcbiTaxId()); String name = null; if (organism.hasNames()) { name = getName(organism.getNames());
psidev.psi.mi.xml.model.Organism o = xmlInteractor.getOrganism(); List<CrossReference> organismXrefs = new ArrayList<CrossReference>(); String taxId = String.valueOf(o.getNcbiTaxId()); if (o.hasNames()) { String shortLabel = o.getNames().getShortLabel(); if (shortLabel != null) { organismXrefs.add(new CrossReferenceImpl("taxid", taxId, shortLabel)); String fullName = o.getNames().getFullName(); if (fullName != null && !shortLabel.equalsIgnoreCase(fullName)) { organismXrefs.add(new CrossReferenceImpl("taxid", taxId, fullName));
public Organism intactToPsi(BioSource intactObject) { intactStartConversation(intactObject); Organism organism = new Organism(); // populates names // Set id, annotations, xrefs and aliases PsiConverterUtils.populateNames(intactObject, organism, aliasConverter); // taxId if (intactObject.getTaxId() != null){ organism.setNcbiTaxId(Integer.valueOf(intactObject.getTaxId())); } else { log.error("BioSource without taxId : " + intactObject.getShortLabel()); } // cell type final CvCellType intactCellType = intactObject.getCvCellType(); if (intactCellType != null) { CellType psiCellType = cellTypeConverter.intactToPsi(intactCellType); organism.setCellType(psiCellType); } // tissue final CvTissue intactTissue = intactObject.getCvTissue(); if (intactTissue != null) { Tissue psiTissue = tissueConverter.intactToPsi(intactTissue); organism.setTissue(psiTissue); } intactEndConversion(intactObject); return organism; }
final Integer taxID = org.getNcbiTaxId(); mapNames(nodeTable, node.getSUID(), org.getNames(), "Species ");
if((interactor.hasOrganism() && interactor.getOrganism().hasCompartment())) { cellularLocation = findOrCreateControlledVocabulary( interactor.getOrganism().getCompartment(), CellularLocationVocabulary.class);
/** * Check if the optional compartment is defined. * * @return true if defined, false otherwise. */ public boolean hasCompartment() { return organism.getCompartment() != null; }
/** * Check if the optional cellType is defined. * * @return true if defined, false otherwise. */ public boolean hasCellType() { return organism.getCellType() != null; }
/** * Check if the optional tissue is defined. * * @return true if defined, false otherwise. */ public boolean hasTissue() { return organism.getTissue() != null; }
public void setNames( Names value ) { organism.setNames( value ); }
public void setNcbiTaxId( int value ) { organism.setNcbiTaxId( value ); }
jOrganism.setNcbiTaxId( mOrganism.getNcbiTaxId() ); if ( mOrganism.hasNames() ) { jOrganism.setNames( namesConverter.toJaxb( mOrganism.getNames() ) ); if ( mOrganism.hasCellType() ) { jOrganism.setCellType( openCvTypeConverter.toJaxb( mOrganism.getCellType() ) ); if ( mOrganism.hasCompartment() ) { jOrganism.setCompartment( openCvTypeConverter.toJaxb( mOrganism.getCompartment() ) ); if ( mOrganism.hasTissue() ) { jOrganism.setTissue( openCvTypeConverter.toJaxb( mOrganism.getTissue() ) );
public psidev.psi.mi.xml.model.Organism fromJaxb( psidev.psi.mi.xml253.jaxb.BioSourceType jOrganism ) throws ConverterException { if ( jOrganism == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Organism." ); } psidev.psi.mi.xml.model.Organism mOrganism = new psidev.psi.mi.xml.model.Organism(); // Initialise the model reading the Jaxb object // 1. set attributes mOrganism.setNcbiTaxId( jOrganism.getNcbiTaxId() ); // 2. set encapsulated objects // names if ( jOrganism.getNames() != null ) { mOrganism.setNames( namesConverter.fromJaxb( jOrganism.getNames() ) ); } // cell type if ( jOrganism.getCellType() != null ) { mOrganism.setCellType( openCvTypeConverter.fromJaxb( jOrganism.getCellType(), CellType.class ) ); } // compartment if ( jOrganism.getCompartment() != null ) { mOrganism.setCompartment( openCvTypeConverter.fromJaxb( jOrganism.getCompartment(), Compartment.class ) ); } // tissue if ( jOrganism.getTissue() != null ) { mOrganism.setTissue( openCvTypeConverter.fromJaxb( jOrganism.getTissue(), Tissue.class ) ); } return mOrganism; }
if (organism != null) { HostOrganism hostOrganism = new HostOrganism(); hostOrganism.setNcbiTaxId(organism.getNcbiTaxId()); hostOrganism.setNames(organism.getNames()); hostOrganism.setCellType(organism.getCellType()); hostOrganism.setCompartment(organism.getCompartment()); hostOrganism.setTissue(organism.getTissue());
public Compartment getCompartment() { return organism.getCompartment(); }