if (!mBibref.getAttributes().isEmpty()){ psidev.psi.mi.xml253.jaxb.AttributeListType attributeList = jBibref.getAttributeList(); if ( attributeList == null ) { for ( psidev.psi.mi.xml.model.Attribute mAttribute : mBibref.getAttributes() ) { attributeList.getAttributes().add( attributeConverter.toJaxb( mAttribute ) );
if (!mBibref.getAttributes().isEmpty()){ psidev.psi.mi.xml254.jaxb.AttributeList attributeList = jBibref.getAttributeList(); if (attributeList == null){ for ( psidev.psi.mi.xml.model.Attribute mAttribute : mBibref.getAttributes() ) { attributeList.getAttributes().add( attributeConverter.toJaxb( mAttribute ) );
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; }