public static Names createNames(String name, String description) { Names names = new Names(); names.setShortLabel(name); names.setFullName(description); return names; }
/** * @param interaction * @return names of these interaction. */ private Names getInteractionName(Interaction interaction) { Names interactionName = null; Collection<Participant> participants = interaction.getParticipants(); for (Participant participant : participants) { if (interactionName != null) { String shortLabel = interactionName.getShortLabel().concat("-"); shortLabel = shortLabel.concat(participant.getInteractor().getNames().getShortLabel().split("_")[0]); interactionName.setShortLabel(shortLabel); } if (interactionName == null) { interactionName = new Names(); interactionName.setShortLabel(participant.getInteractor().getNames().getShortLabel().split("_")[0]); } } if (interactionName == null) { log.warn("Interaction don't have a name"); } return interactionName; }
public psidev.psi.mi.xml.model.Names fromJaxb( psidev.psi.mi.xml253.jaxb.NamesType jNames ) { if ( jNames == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Names." ); } psidev.psi.mi.xml.model.Names mNames = new psidev.psi.mi.xml.model.Names(); // Initialise the model reading the Jaxb object // 1. set attributes // shortlabel mNames.setShortLabel( jNames.getShortLabel() ); // fullname mNames.setFullName( jNames.getFullName() ); // 2. set encapsulated objects // aliases for ( NamesType.Alias jAlias : jNames.getAlias() ) { mNames.getAliases().add( aliasConverter.fromJaxb( jAlias ) ); } return mNames; }
public psidev.psi.mi.xml.model.Names fromJaxb( psidev.psi.mi.xml254.jaxb.Names jNames ) { if ( jNames == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Names." ); } psidev.psi.mi.xml.model.Names mNames = new psidev.psi.mi.xml.model.Names(); // Initialise the model reading the Jaxb object // 1. set attributes // shortlabel mNames.setShortLabel( jNames.getShortLabel() ); // fullname mNames.setFullName( jNames.getFullName() ); // 2. set encapsulated objects // aliases for ( Alias jAlias : jNames.getAlias() ) { mNames.getAliases().add( aliasConverter.fromJaxb( jAlias ) ); } return mNames; }
interactorName.setShortLabel(shortLabel); } else { log.debug("No valid uniprot interactorName found. default : 1.interactor identifier of db = "+interactor.getIdentifiers().iterator().next().getDatabase()); interactorName.setShortLabel(interactor.getIdentifiers().iterator().next().getIdentifier());
private static <T extends CvType> T createUnspecifiedRole( Class<T> roleClass ) { T role; try { role = roleClass.newInstance(); } catch ( Exception e ) { throw new RuntimeException( e ); } Names names = new Names(); names.setShortLabel(CvExperimentalRole.UNSPECIFIED); names.setFullName(CvExperimentalRole.UNSPECIFIED); role.setNames( names ); Xref xref = new Xref(); String unspecifiedRoleMiRef = CvExperimentalRole.UNSPECIFIED_PSI_REF; DbReference dbRef = new DbReference( unspecifiedRoleMiRef, CvDatabase.PSI_MI ); dbRef.setRefType( CvXrefQualifier.IDENTITY ); dbRef.setRefTypeAc( CvXrefQualifier.IDENTITY_MI_REF ); dbRef.setDbAc( CvDatabase.PSI_MI_MI_REF ); xref.setPrimaryRef( dbRef ); role.setXref( xref ); return role; }
interactorName.setShortLabel( interactorId + "_" + organismName );
names.setShortLabel(IntactConverterUtils.AUTH_CONF_MI);
String shortLabel = tabCv.getText(); names = new Names(); names.setShortLabel(shortLabel);
names.setShortLabel(shortLabel); experimentDescription.setNames(names); Attribute authorList = new Attribute("author-list", firstAuthor); names.setShortLabel(shortlabel); } else { switch (ncbiTaxId) { case -1: names.setShortLabel("in vitro"); break; case -2: names.setShortLabel("chemical synthesis"); break; case -3: names.setShortLabel("unknown"); break; case -4: names.setShortLabel("in vivo"); break; case -5: names.setShortLabel("in silico"); break; default: names.setShortLabel(String.valueOf(ncbiTaxId));
names.setShortLabel("range"); names.setFullName("range"); names.setShortLabel("greater-than"); names.setFullName("greater-than"); names.setShortLabel("less-than"); names.setFullName("less-than"); names.setShortLabel("n-term range"); names.setFullName("n-terminal range"); names.setShortLabel("c-term range"); names.setFullName("c-terminal range"); names.setShortLabel("undetermined"); names.setFullName("undetermined sequence position"); names.setShortLabel("certain"); names.setFullName("certain sequence position");
organism.setNames(names); if (shortlabel != null) { names.setShortLabel(shortlabel); } else { switch (ncbiTaxId) { case -1: names.setShortLabel("in vitro"); break; case -2: names.setShortLabel("chemical synthesis"); break; case -3: names.setShortLabel("unknown"); break; case -4: names.setShortLabel("in vivo"); break; case -5: names.setShortLabel("in silico"); break; default: names.setShortLabel(String.valueOf(ncbiTaxId)); interactorTypeName.setShortLabel("protein"); interactorTypeName.setFullName("protein"); } else if (id.equals("MI:0328")) { interactorTypeName.setShortLabel("small molecule"); interactorTypeName.setFullName("small molecule"); } else if (id.equals("MI:0317")) {
protected static void populateNames( AnnotatedObject<?, ?> annotatedObject, NamesContainer namesContainer ) { Names names = namesContainer.getNames(); if ( names == null ) { names = new Names(); } String shortLabel = annotatedObject.getShortLabel(); String fullName = annotatedObject.getFullName(); names.setShortLabel( shortLabel ); names.setFullName( fullName ); if ( !ConverterContext.getInstance().getInteractorConfig().isExcludeInteractorAliases() ) { AliasConverter aliasConverter = new AliasConverter( annotatedObject.getOwner(), AnnotatedObjectUtils.getAliasClassType( annotatedObject.getClass() ) ); for ( Alias alias : IntactCore.ensureInitializedAliases(annotatedObject)) { names.getAliases().add( aliasConverter.intactToPsi( alias ) ); } } namesContainer.setNames( names ); }
String shortLabel = interactionName.getShortLabel().concat("-".concat(String.valueOf(numberOfInteraction))); numberOfInteraction++; interactionName.setShortLabel(shortLabel); interaction.setNames(interactionName); Unit unit = new Unit(); unit.setNames(new Names()); unit.getNames().setShortLabel(tabConfidence.getType()); if (tabConfidence.getText() != null) unit.getNames().setFullName(tabConfidence.getText());
names.setShortLabel(crossReference.getText());
source.setReleaseDate(date); Names names = new Names(); names.setShortLabel(UNKNOWN); names.setShortLabel(label);
String type = getName(p.getInteractor().getInteractorType().getNames()); if("gene".equalsIgnoreCase(type)) { p.getInteractor().getInteractorType().getNames().setShortLabel("dna");
public static void populateNames( AnnotatedObject<?, ?> annotatedObject, NamesContainer namesContainer, AliasConverter aliasConverter ) { Names names = namesContainer.getNames(); if ( names == null ) { names = new Names(); } String shortLabel = annotatedObject.getShortLabel(); String fullName = annotatedObject.getFullName(); names.setShortLabel( shortLabel ); names.setFullName( fullName ); if ( !ConverterContext.getInstance().getInteractorConfig().isExcludeInteractorAliases() ) { Collection<? extends Alias> aliases; if (aliasConverter.isCheckInitializedCollections()){ aliases = IntactCore.ensureInitializedAliases(annotatedObject); } else { aliases = annotatedObject.getAliases(); } for ( Alias alias : aliases) { names.getAliases().add( aliasConverter.intactToPsi( alias ) ); } } namesContainer.setNames( names ); }
names.setShortLabel("unspecified role"); names.setFullName("unspecified role"); names.setShortLabel("unspecified role"); names.setFullName("unspecified role"); featureTypeNames.setShortLabel(mitabFeature.getFeatureType()); featureTypeNames.setFullName(mitabFeature.getFeatureType()); names.setShortLabel(participantIdentificationMethod.getText());