public psidev.psi.mi.xml254.jaxb.Attribute toJaxb( psidev.psi.mi.xml.model.Attribute mAttribute ) { if ( mAttribute == null ) { throw new IllegalArgumentException( "You must give a non null model attribute." ); } psidev.psi.mi.xml254.jaxb.Attribute jAttribute = new psidev.psi.mi.xml254.jaxb.Attribute(); // Initialise the JAXB object reading the model // 1. set attributes jAttribute.setName( mAttribute.getName() ); jAttribute.setNameAc( mAttribute.getNameAc() ); jAttribute.setValue( mAttribute.getValue() ); return jAttribute; } }
public psidev.psi.mi.xml.model.Attribute fromJaxb( psidev.psi.mi.xml254.jaxb.Attribute jAttribute ) { if ( jAttribute == null ) { throw new IllegalArgumentException( "You must give a non null JAXB attribute." ); } psidev.psi.mi.xml.model.Attribute mAttribute = new psidev.psi.mi.xml.model.Attribute(); // Initialise the model reading the Jaxb object // 1. set attributes mAttribute.setName( jAttribute.getName() ); mAttribute.setNameAc( jAttribute.getNameAc() ); mAttribute.setValue( jAttribute.getValue() ); return mAttribute; }
private Set<String> getAttributes(Collection<Attribute> attributes) { // set to return Set<String> toReturn = new HashSet<String>(); // iterate over the attributes for (Attribute attribute : attributes) { String attributeStr = ""; if (attribute.hasValue()) { attributeStr = attribute.getValue(); } String name = attribute.getName(); attributeStr = (name != null) ? attributeStr += " " + name : attributeStr; if (attribute.hasNameAc()) { attributeStr += " " + attribute.getNameAc(); } if (attributeStr.length() > 0) toReturn.add(attributeStr); } return toReturn; }
public static Collection<Attribute> extractAuthorConfidencesFrom(Collection<Attribute> attributes){ if (attributes != null && !attributes.isEmpty()){ Collection<Attribute> attributesConf = new ArrayList<Attribute>(attributes.size()); for (Attribute att : attributes){ if (att.getNameAc() != null){ if (att.getNameAc().equals(AUTH_CONF_MI)){ attributesConf.add(att); } } else if (att.getName() != null){ if (att.getName().equals(AUTH_CONF)){ attributesConf.add(att); } } } return attributesConf; } return Collections.EMPTY_LIST; }
Collection<Attribute> xmlInteractorAttributes = xmlInteractor.getAttributes(); for (Attribute xmlInteractorAttribute : xmlInteractorAttributes) { String name = xmlInteractorAttribute.getName(); String text = xmlInteractorAttribute.getValue(); if (checksumNames.contains(name.toLowerCase())) { Collection<Attribute> xmlParticipantAttributes = xmlParticipant.getAttributes(); for (Attribute xmlParticipantAttribute : xmlParticipantAttributes) { String name = xmlParticipantAttribute.getName(); String text = xmlParticipantAttribute.getValue(); if (checksumNames.contains(name.toLowerCase())) { if (attribute.getName().equals("comment") || attribute.getNameAc().equals("MI:0612")) { if (attribute.getValue() != null && attribute.getValue().contains("Stoichiometry:")) { String[] s = attribute.getValue().split(" "); try { if (s.length == 2) { log.error("The stoichiometry can not be converted, " + attribute.toString(),e);
if ("source reference:label".equals(attr.getName())) { text = attr.getValue(); break; if ("author-list".equals(attribute.getName())) { authorName = attribute.getValue(); } else if ("publication year".equals(attribute.getName())) { pubYear = "(" + attribute.getValue() + ")"; String name = attribute.getName(); String text = attribute.getValue(); if (checksumNames.contains(name.toLowerCase())) {
public static Attribute createAttribute(String name, String value) { return new Attribute(name, value); }
String value = authorConf.getValue(); ComponentConfidence confidence = confConverter.newConfidenceInstance(value);
pro.addComment(attr.toString());
public Collection<Attribute> extractPublicationAttributesFromExperiment(ExperimentDescription expDesc){ if (!expDesc.hasAttributes()){ return Collections.EMPTY_LIST; } Collection<Attribute> attributes = new ArrayList<Attribute>(expDesc.getAttributes().size()); for (Attribute attr : expDesc.getAttributes()){ if (attr.getNameAc() != null){ if (publicationTopicsMi.contains(attr.getNameAc())){ attributes.add(attr); } } else if (attr.getName() != null){ if (publicationTopics.contains(attr.getName().toLowerCase())){ attributes.add(attr); } } } return attributes; }
Attribute attribute = new Attribute(nameAc, name, intactObject.getAnnotationText());
public psidev.psi.mi.xml253.jaxb.AttributeListType.Attribute toJaxb( psidev.psi.mi.xml.model.Attribute mAttribute ) { if ( mAttribute == null ) { throw new IllegalArgumentException( "You must give a non null model attribute." ); } psidev.psi.mi.xml253.jaxb.AttributeListType.Attribute jAttribute = new psidev.psi.mi.xml253.jaxb.AttributeListType.Attribute(); // Initialise the JAXB object reading the model // 1. set attributes jAttribute.setName( mAttribute.getName() ); jAttribute.setNameAc( mAttribute.getNameAc() ); jAttribute.setValue( mAttribute.getValue() ); return jAttribute; } }
public psidev.psi.mi.xml.model.Attribute fromJaxb( psidev.psi.mi.xml253.jaxb.AttributeListType.Attribute jAttribute ) { if ( jAttribute == null ) { throw new IllegalArgumentException( "You must give a non null JAXB attribute." ); } psidev.psi.mi.xml.model.Attribute mAttribute = new psidev.psi.mi.xml.model.Attribute(); // Initialise the model reading the Jaxb object // 1. set attributes mAttribute.setName( jAttribute.getName() ); mAttribute.setNameAc( jAttribute.getNameAc() ); mAttribute.setValue( jAttribute.getValue() ); return mAttribute; }
public Annotation psiToIntact(Attribute psiObject) { psiStartConversion(psiObject); CvTopic cvTopic = new CvTopic(getInstitution(), psiObject.getName()); // all name Acs should be from psi mi controlled vocabularies if (psiObject.getNameAc() != null) { cvTopic.setIdentifier(psiObject.getNameAc()); psiMiPopulator.populateWithPsiMi(cvTopic, psiObject.getNameAc()); } Annotation annotation = new Annotation(getInstitution(), cvTopic, psiObject.getValue()); psiEndConversion(psiObject); return annotation; }
if (!annotations.isEmpty()) { for (Annotation annotation : annotations) { Attribute attribute = new Attribute(annotation.getTopic(), annotation.getText()); interaction.getAttributes().add(attribute); if (!checksums.isEmpty()) { for (Checksum checksum : checksums) { Attribute attribute = new Attribute(checksum.getMethodName(), checksum.getChecksum()); interaction.getAttributes().add(attribute);
private void mapAttributes(final Collection<Attribute> attrs, final CyTable table, final Long suid) { for(Attribute attr: attrs) { final String name = attr.getName(); if(table.getColumn(name) == null) table.createListColumn(name, String.class, false); final CyRow row = table.getRow(suid); List<String> list = row.getList(name, String.class); if(list == null) list = new ArrayList<String>(); final String nameAc = attr.getNameAc(); final String value = attr.getValue(); list.add(value); row.set(name, list); } }
Attribute authConf = new Attribute(IntactConverterUtils.AUTH_CONF_MI, IntactConverterUtils.AUTH_CONF, conf.getValue());
if (a.getNameAc() != null){ if (a.getNameAc().equals(CvTopic.COMMENT_MI_REF) && a.getValue() != null){ if (a.getValue().startsWith(STOICHIOMETRY_PREFIX)){ try { float stoichio = Float.parseFloat(a.getValue().substring(a.getValue().indexOf(STOICHIOMETRY_PREFIX) + STOICHIOMETRY_PREFIX.length())); component.setStoichiometry(stoichio); else if (a.getName() != null){ if (a.getName().equalsIgnoreCase(CvTopic.COMMENT) && a.getValue() != null){ if (a.getValue().startsWith(STOICHIOMETRY_PREFIX)){ try { float stoichio = Float.parseFloat(a.getValue().substring(a.getValue().indexOf(STOICHIOMETRY_PREFIX) + STOICHIOMETRY_PREFIX.length())); component.setStoichiometry(stoichio);