Class XmlFeatureWrapper
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.extension.xml253.XmlFeatureWrapper
-
- All Implemented Interfaces:
FileSourceContext,Feature<ModelledEntity,ModelledFeature>,ModelledFeature,ExtendedPsiXmlFeature<ModelledEntity,ModelledFeature>
public class XmlFeatureWrapper extends Object implements ModelledFeature, ExtendedPsiXmlFeature<ModelledEntity,ModelledFeature>, FileSourceContext
Xml wrapper for basic features- Since:
30/10/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from interface psidev.psi.mi.jami.model.Feature
ALLOSTERIC_PTM, ALLOSTERIC_PTM_MI, BINDING_SITE, BINDING_SITE_MI, BIOLOGICAL_FEATURE, BIOLOGICAL_FEATURE_MI, DECREASING_PTM, DECREASING_PTM_MI, DIRECT_BINDING, DIRECT_BINDING_MI, DISRUPTING_PTM, DISRUPTING_PTM_MI, EXPERIMENTAL_FEATURE, EXPERIMENTAL_FEATURE_MI, INCREASING_PTM, INCREASING_PTM_MI, MUTATION, MUTATION_MI, OBSERVED_PTM, OBSERVED_PTM_MI, PREREQUISITE_PTM, PREREQUISITE_PTM_MI, RESULTING_CLEAVAGE, RESULTING_CLEAVAGE_MI, RESULTING_PTM, RESULTING_PTM_MI, SUFFICIENT_BINDING, SUFFICIENT_BINDING_MI, VARIANT, VARIANT_MI
-
-
Constructor Summary
Constructors Constructor Description XmlFeatureWrapper(ExtendedPsiXmlFeature part, ModelledEntity parent)Constructor for XmlFeatureWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Alias>getAliases()Collection of aliases for a feature.Collection<Annotation>getAnnotations()Collection of annotations which describe the feature The set cannot be null.StringgetFullName()The full name that describes the feature.intgetId()getId.Collection<Xref>getIdentifiers()Collection of External identifiers which describes this feature.StringgetInterpro()The interpro identifier if it exists, null otherwise.Collection<ModelledFeature>getLinkedFeatures()The other features that can bind to this feature.ModelledEntitygetParticipant()The participant to which the feature is attached.Collection<Range>getRanges()The ranges which locate the feature in the interactor sequence/structure.CvTermgetRole()The effect of this feature on the interaction where the feature has been reported or the interaction dependency between the interaction reporting this feature and this feature.StringgetShortName()The short name of a feature.FileSourceLocatorgetSourceLocator()The locator of a position in a file.CvTermgetType()The type for this feature.ExtendedPsiXmlFeature<Participant,Feature>getWrappedFeature()getWrappedFeature.Collection<Xref>getXrefs()Collection of cross references which give more information about the feature.protected voidinitialiseLinkedFeatures()initialiseLinkedFeatures.voidsetFullName(String name)Sets the full name that describes the moleculevoidsetId(int id)setId.voidsetInterpro(String interpro)Sets the interpro identifier.voidsetParticipant(ModelledEntity participant)Sets the participant.voidsetParticipantAndAddFeature(ModelledEntity participant)Sets the participant and add this feature to its list of features.voidsetRole(CvTerm effect)Sets the interaction effect/role for this feature.voidsetShortName(String name)Sets the short name of the featurevoidsetSourceLocator(FileSourceLocator locator)Sets the source locatorvoidsetType(CvTerm type)Sets the feature type.StringtoString()toString
-
-
-
Constructor Detail
-
XmlFeatureWrapper
public XmlFeatureWrapper(ExtendedPsiXmlFeature part, ModelledEntity parent)
Constructor for XmlFeatureWrapper.
- Parameters:
part- aExtendedPsiXmlFeatureobject.parent- aModelledEntityobject.
-
-
Method Detail
-
getShortName
public String getShortName()
The short name of a feature. It can be null Ex: region, SH3 domains- Specified by:
getShortNamein interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the short name
-
setShortName
public void setShortName(String name)
Sets the short name of the feature- Specified by:
setShortNamein interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
name- : short name
-
getFullName
public String getFullName()
The full name that describes the feature. It can be null. Ex: SWIB/MDM2 domain (IPR003121)- Specified by:
getFullNamein interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the full name
-
setFullName
public void setFullName(String name)
Sets the full name that describes the molecule- Specified by:
setFullNamein interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
name- : full name
-
getInterpro
public String getInterpro()
The interpro identifier if it exists, null otherwise. It is a shortcut to the first interpro identifier in the list of identifiers.- Specified by:
getInterproin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the interpro identifier if it exists.
-
setInterpro
public void setInterpro(String interpro)
Sets the interpro identifier. It will remove the old interpro identifier and add a new interpro identity Xref in the list of identifiers. If interpro is null, it will remove all existing interpro Xref in the list of identifiers.- Specified by:
setInterproin interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
interpro- : the new interpro identifier
-
getIdentifiers
public Collection<Xref> getIdentifiers()
Collection of External identifiers which describes this feature. The Collection cannot be null and if the feature is not described in an external databases, the method should return an empty Collection. Ex: interpro:IPR003121- Specified by:
getIdentifiersin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the identifier
-
getXrefs
public Collection<Xref> getXrefs()
Collection of cross references which give more information about the feature. The set cannot be null. If the feature does not have any other xrefs, the method should return an empty Collection. Ex: GO xrefs to give information about process or function- Specified by:
getXrefsin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the xrefs
-
getAnnotations
public Collection<Annotation> getAnnotations()
Collection of annotations which describe the feature The set cannot be null. If the feature does not have any annotations, the method should return an empty Collection. Ex: observed ptm, cautions, comments, ...- Specified by:
getAnnotationsin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the annotations
-
getType
public CvTerm getType()
The type for this feature. It is a controlled vocabulary term and can be null. Ex: fluorophore, tag, mutation, ...- Specified by:
getTypein interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- The feature type
-
setType
public void setType(CvTerm type)
Sets the feature type.- Specified by:
setTypein interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
type- : feature type
-
getRanges
public Collection<Range> getRanges()
The ranges which locate the feature in the interactor sequence/structure. The collection cannot be null. If the feature does not have any ranges, the method should return an empty collection- Specified by:
getRangesin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- a collection of ranges
-
getRole
public CvTerm getRole()
The effect of this feature on the interaction where the feature has been reported or the interaction dependency between the interaction reporting this feature and this feature. It can be null if the feature does not have any effects on the interaction or it is not relevant Ex: increasing interaction, decreasing interaction, disrupting interaction, etc. Ex: resulting-ptm,prerequisite-ptm ...- Specified by:
getRolein interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the effect of this feature on the interaction
-
setRole
public void setRole(CvTerm effect)
Sets the interaction effect/role for this feature.- Specified by:
setRolein interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
effect- : the feature role
-
getParticipant
public ModelledEntity getParticipant()
The participant to which the feature is attached. It can be any entity (participant, participant pool, participant candidate, etc.) It can be null if the feature is not attached to any participants.- Specified by:
getParticipantin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the participant
-
setParticipant
public void setParticipant(ModelledEntity participant)
Sets the participant.- Specified by:
setParticipantin interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
participant- : participant
-
setParticipantAndAddFeature
public void setParticipantAndAddFeature(ModelledEntity participant)
Sets the participant and add this feature to its list of features. If participant is null, it will remove this feature from the previous participant attached to this feature- Specified by:
setParticipantAndAddFeaturein interfaceFeature<ModelledEntity,ModelledFeature>- Parameters:
participant- : participant
-
getAliases
public Collection<Alias> getAliases()
Collection of aliases for a feature. The Collection cannot be null and if the experiment does not have any aliases, the method should return an empty Collection.- Specified by:
getAliasesin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the aliases
-
getLinkedFeatures
public Collection<ModelledFeature> getLinkedFeatures()
The other features that can bind to this feature. The collection cannot be null. If the feature does not bind with any other features, the method should return an empty collection- Specified by:
getLinkedFeaturesin interfaceFeature<ModelledEntity,ModelledFeature>- Returns:
- the binding features
-
getWrappedFeature
public ExtendedPsiXmlFeature<Participant,Feature> getWrappedFeature()
getWrappedFeature.
- Returns:
- a
ExtendedPsiXmlFeatureobject.
-
getSourceLocator
public FileSourceLocator getSourceLocator()
The locator of a position in a file. It can be null- Specified by:
getSourceLocatorin interfaceFileSourceContext- Returns:
- the file locator
-
setSourceLocator
public void setSourceLocator(FileSourceLocator locator)
Sets the source locator- Specified by:
setSourceLocatorin interfaceFileSourceContext- Parameters:
locator- : the file locator
-
toString
public String toString()
toString
- Specified by:
toStringin interfaceFileSourceContext- Overrides:
toStringin classObject- Returns:
- the file source context as a String. If the source locator is not null, it should give the source locator properties
-
initialiseLinkedFeatures
protected void initialiseLinkedFeatures()
initialiseLinkedFeatures.
-
getId
public int getId()
getId.
- Specified by:
getIdin interfaceExtendedPsiXmlFeature<ModelledEntity,ModelledFeature>- Returns:
- a int.
-
setId
public void setId(int id)
setId.
- Specified by:
setIdin interfaceExtendedPsiXmlFeature<ModelledEntity,ModelledFeature>- Parameters:
id- a int.
-
-