public abstract class AbstractFeature<S extends AbstractSequence<C>,C extends Compound> extends java.lang.Object implements FeatureInterface<S,C>
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<FeatureInterface<?,?>> |
LENGTH
Sort features by length.
|
static java.util.Comparator<FeatureInterface<?,?>> |
LOCATION_LENGTH
Sort features by start position and then longest length.
|
Constructor and Description |
---|
AbstractFeature(java.lang.String type,
java.lang.String source)
A feature has a type and a source
|
Modifier and Type | Method and Description |
---|---|
void |
addQualifier(java.lang.String key,
Qualifier qualifier)
Add a qualifier
|
java.util.List<FeatureInterface<S,C>> |
getChildrenFeatures()
Get the children features
|
java.lang.String |
getDescription()
Get the description that can be used to describe the feature
|
SequenceLocation<S,C> |
getLocations()
A feature could be a single sequence position like a mutation or a post translational modification of an amino acid.
|
FeatureInterface<S,C> |
getParentFeature()
Get the parent Feature
|
java.util.HashMap<java.lang.String,Qualifier> |
getQualifiers()
Get the qualifiers for this feature
|
java.lang.String |
getShortDescription()
Get the short description that can be used to describe the feature
|
java.lang.String |
getSource()
The feature source
|
java.lang.String |
getType()
The feature type
|
java.lang.Object |
getUserObject() |
void |
setChildrenFeatures(java.util.List<FeatureInterface<S,C>> features)
Set the children features
|
void |
setDescription(java.lang.String description)
Set the description that can be used to describe the feature
|
void |
setLocation(SequenceLocation<S,C> loc)
A feature could be a single sequence position like a mutation or a post translational modification of an amino acid.
|
void |
setParentFeature(FeatureInterface<S,C> feature)
A feature can be the child or contained by a parent feature.
|
void |
setQualifiers(java.util.HashMap<java.lang.String,Qualifier> qualifiers)
Set the qualifiers
|
void |
setShortDescription(java.lang.String shortDescription)
Set the short description that can be used to describe the feature
|
void |
setSource(java.lang.String source)
Set the feature source
|
void |
setType(java.lang.String type)
Set the feature type
|
void |
setUserObject(java.lang.Object userObject)
Allow the user to associate an object with the feature.
|
public static final java.util.Comparator<FeatureInterface<?,?>> LOCATION_LENGTH
public static final java.util.Comparator<FeatureInterface<?,?>> LENGTH
public AbstractFeature(java.lang.String type, java.lang.String source)
type
- source
- public SequenceLocation<S,C> getLocations()
getLocations
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setLocation(SequenceLocation<S,C> loc)
setLocation
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
loc
- public java.lang.String getType()
getType
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setType(java.lang.String type)
setType
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
type
- public java.lang.String getSource()
getSource
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setSource(java.lang.String source)
setSource
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
source
- public void setParentFeature(FeatureInterface<S,C> feature)
setParentFeature
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
feature
- public FeatureInterface<S,C> getParentFeature()
getParentFeature
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public java.util.List<FeatureInterface<S,C>> getChildrenFeatures()
getChildrenFeatures
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setChildrenFeatures(java.util.List<FeatureInterface<S,C>> features)
setChildrenFeatures
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
features
- public java.lang.String getDescription()
FeatureInterface
getDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setDescription(java.lang.String description)
FeatureInterface
setDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
description
- the description to setpublic java.lang.String getShortDescription()
FeatureInterface
getShortDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setShortDescription(java.lang.String shortDescription)
FeatureInterface
setShortDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
shortDescription
- the shortDescription to setpublic java.lang.Object getUserObject()
getUserObject
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setUserObject(java.lang.Object userObject)
setUserObject
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
userObject
- the userObject to setpublic java.util.HashMap<java.lang.String,Qualifier> getQualifiers()
FeatureInterface
getQualifiers
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setQualifiers(java.util.HashMap<java.lang.String,Qualifier> qualifiers)
FeatureInterface
setQualifiers
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void addQualifier(java.lang.String key, Qualifier qualifier)
FeatureInterface
addQualifier
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>