public static Bibref createBibref(String publicationId, String dbAc, String dbName) { DbReference dbReference = createDbReference(publicationId, dbAc, dbName, "MI:0358", "primary-reference"); Xref xref = new Xref(dbReference); return new Bibref(xref); }
public psidev.psi.mi.xml.model.Bibref fromJaxb( psidev.psi.mi.xml254.jaxb.Bibref jBibref ) { if ( jBibref == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Bibref." ); } psidev.psi.mi.xml.model.Bibref mBibref = new psidev.psi.mi.xml.model.Bibref(); // 1. set attributes // 2. set encapsulated objects boolean foundAttributeList = false; boolean foundXref = false; if ( jBibref.getAttributeList() != null ) { foundAttributeList = true; for ( psidev.psi.mi.xml254.jaxb.Attribute jAttribute : jBibref.getAttributeList().getAttributes() ) { mBibref.getAttributes().add( attributeConverter.fromJaxb( jAttribute ) ); } } if ( jBibref.getXref() != null ) { foundXref = true; mBibref.setXref( xrefConverter.fromJaxb( jBibref.getXref() ) ); } if( foundAttributeList && foundXref ) { throw new IllegalArgumentException( "When defining a <bibref>, you must give as a child tag either an <xref> or an <attributeList>." ); } return mBibref; }
public psidev.psi.mi.xml.model.Bibref fromJaxb( psidev.psi.mi.xml253.jaxb.BibrefType jBibref ) { if ( jBibref == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Bibref." ); } psidev.psi.mi.xml.model.Bibref mBibref = new psidev.psi.mi.xml.model.Bibref(); // 1. set attributes // 2. set encapsulated objects boolean foundAttributeList = false; boolean foundXref = false; if ( jBibref.getAttributeList() != null ) { foundAttributeList = true; for ( psidev.psi.mi.xml253.jaxb.AttributeListType.Attribute jAttribute : jBibref.getAttributeList().getAttributes() ) { mBibref.getAttributes().add( attributeConverter.fromJaxb( jAttribute ) ); } } if ( jBibref.getXref() != null ) { foundXref = true; mBibref.setXref( xrefConverter.fromJaxb( jBibref.getXref() ) ); } if( foundAttributeList && foundXref ) { throw new IllegalArgumentException( "When defining a <bibref>, you must give as a child tag either an <xref> or an <attributeList>." ); } return mBibref; }
public Bibref fromMitab( CrossReference ref ) { Bibref bibref = null; if (ref != null && ref.getIdentifier() != null && ref.getDatabase() != null){ String db = ref.getDatabase(); String id = ref.getIdentifier(); DbReference primaryRef = new DbReference(id, db); primaryRef.setRefType("primary-reference"); primaryRef.setRefTypeAc("MI:0358"); if (db.equals("pubmed")) primaryRef.setDbAc("MI:0446"); Xref xref = new Xref(primaryRef); bibref = new Bibref(xref); } return bibref; }
experimentDescription = new ExperimentDescription(new Bibref(imexPrimary), detectionMethod); experimentDescription.setId(IdentifierGenerator.getInstance().nextId()); } else { experimentDescription = new ExperimentDescription(new Bibref(ref), detectionMethod); experimentDescription.setId(IdentifierGenerator.getInstance().nextId()); } else if (imexPrimary == null) {
PsiConverterUtils.populateAttributes(intactObject, source, annotationConverter); Bibref bibref = new Bibref();
Bibref bibref = new Bibref(); boolean isBibRefSet = false;