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; }
if ("source reference:label".equals(attr.getName())) { text = attr.getValue(); break; if ("author-list".equals(attribute.getName())) { authorName = attribute.getValue(); authorName = authorName.split(" ")[0].concat(" et al"); } else if ("publication year".equals(attribute.getName())) { pubYear = "(" + attribute.getValue() + ")"; String name = attribute.getName(); String text = attribute.getValue(); if (checksumNames.contains(name.toLowerCase())) {
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; }
String key = attribute.getName(); //may be reset below String value = (attribute.hasValue()) ? attribute.getValue() : ""; if(key.equalsIgnoreCase(BIOGRID_EVIDENCE_CODE)
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 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 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; }
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); } }
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; } }
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(" ");