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.String
getFullName()
The full name that describes the feature.int
getId()
getId.Collection<Xref>
getIdentifiers()
Collection of External identifiers which describes this feature.String
getInterpro()
The interpro identifier if it exists, null otherwise.Collection<ModelledFeature>
getLinkedFeatures()
The other features that can bind to this feature.ModelledEntity
getParticipant()
The participant to which the feature is attached.Collection<Range>
getRanges()
The ranges which locate the feature in the interactor sequence/structure.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.String
getShortName()
The short name of a feature.FileSourceLocator
getSourceLocator()
The locator of a position in a file.CvTerm
getType()
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 void
initialiseLinkedFeatures()
initialiseLinkedFeatures.void
setFullName(String name)
Sets the full name that describes the moleculevoid
setId(int id)
setId.void
setInterpro(String interpro)
Sets the interpro identifier.void
setParticipant(ModelledEntity participant)
Sets the participant.void
setParticipantAndAddFeature(ModelledEntity participant)
Sets the participant and add this feature to its list of features.void
setRole(CvTerm effect)
Sets the interaction effect/role for this feature.void
setShortName(String name)
Sets the short name of the featurevoid
setSourceLocator(FileSourceLocator locator)
Sets the source locatorvoid
setType(CvTerm type)
Sets the feature type.String
toString()
toString
-
-
-
Constructor Detail
-
XmlFeatureWrapper
public XmlFeatureWrapper(ExtendedPsiXmlFeature part, ModelledEntity parent)
Constructor for XmlFeatureWrapper.
- Parameters:
part
- aExtendedPsiXmlFeature
object.parent
- aModelledEntity
object.
-
-
Method Detail
-
getShortName
public String getShortName()
The short name of a feature. It can be null Ex: region, SH3 domains- Specified by:
getShortName
in interfaceFeature<ModelledEntity,ModelledFeature>
- Returns:
- the short name
-
setShortName
public void setShortName(String name)
Sets the short name of the feature- Specified by:
setShortName
in 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:
getFullName
in interfaceFeature<ModelledEntity,ModelledFeature>
- Returns:
- the full name
-
setFullName
public void setFullName(String name)
Sets the full name that describes the molecule- Specified by:
setFullName
in 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:
getInterpro
in 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:
setInterpro
in 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:
getIdentifiers
in 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:
getXrefs
in 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:
getAnnotations
in 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:
getType
in interfaceFeature<ModelledEntity,ModelledFeature>
- Returns:
- The feature type
-
setType
public void setType(CvTerm type)
Sets the feature type.- Specified by:
setType
in 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:
getRanges
in 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:
getRole
in 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:
setRole
in 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:
getParticipant
in interfaceFeature<ModelledEntity,ModelledFeature>
- Returns:
- the participant
-
setParticipant
public void setParticipant(ModelledEntity participant)
Sets the participant.- Specified by:
setParticipant
in 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:
setParticipantAndAddFeature
in 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:
getAliases
in 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:
getLinkedFeatures
in interfaceFeature<ModelledEntity,ModelledFeature>
- Returns:
- the binding features
-
getWrappedFeature
public ExtendedPsiXmlFeature<Participant,Feature> getWrappedFeature()
getWrappedFeature.
- Returns:
- a
ExtendedPsiXmlFeature
object.
-
getSourceLocator
public FileSourceLocator getSourceLocator()
The locator of a position in a file. It can be null- Specified by:
getSourceLocator
in interfaceFileSourceContext
- Returns:
- the file locator
-
setSourceLocator
public void setSourceLocator(FileSourceLocator locator)
Sets the source locator- Specified by:
setSourceLocator
in interfaceFileSourceContext
- Parameters:
locator
- : the file locator
-
toString
public String toString()
toString
- Specified by:
toString
in interfaceFileSourceContext
- Overrides:
toString
in 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:
getId
in interfaceExtendedPsiXmlFeature<ModelledEntity,ModelledFeature>
- Returns:
- a int.
-
setId
public void setId(int id)
setId.
- Specified by:
setId
in interfaceExtendedPsiXmlFeature<ModelledEntity,ModelledFeature>
- Parameters:
id
- a int.
-
-