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; } }
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; } }
for (Attribute a : participant.getAttributes()){ 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); 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);
for (Attribute xmlInteractorAttribute : xmlInteractorAttributes) { String name = xmlInteractorAttribute.getName(); String text = xmlInteractorAttribute.getValue(); if (checksumNames.contains(name.toLowerCase())) { for (Attribute xmlParticipantAttribute : xmlParticipantAttributes) { String name = xmlParticipantAttribute.getName(); String text = xmlParticipantAttribute.getValue(); if (checksumNames.contains(name.toLowerCase())) { if (attribute.getValue() != null && attribute.getValue().contains("Stoichiometry:")) { String[] s = attribute.getValue().split(" "); try { if (s.length == 2) {
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; }
for (Attribute attribute : interaction.getAttributes()) { String value = (attribute.hasValue()) ? attribute.getValue() : ""; if(key.equalsIgnoreCase(BIOGRID_EVIDENCE_CODE) && GENETIC_INTERACTIONS.contains(value))
String value = authorConf.getValue(); ComponentConfidence confidence = confConverter.newConfidenceInstance(value);