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.
|
static java.util.Comparator<FeatureInterface<?,?>> |
TYPE
Sort features by type
|
| 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
|
AbstractLocation |
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.Map<java.lang.String,java.util.List<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(AbstractLocation 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.Map<java.lang.String,java.util.List<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 static final java.util.Comparator<FeatureInterface<?,?>> TYPE
public AbstractFeature(java.lang.String type,
java.lang.String source)
type - source - public AbstractLocation getLocations()
getLocations in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>public void setLocation(AbstractLocation 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()
FeatureInterfacegetDescription in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>public void setDescription(java.lang.String description)
FeatureInterfacesetDescription in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>description - the description to setpublic java.lang.String getShortDescription()
FeatureInterfacegetShortDescription in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>public void setShortDescription(java.lang.String shortDescription)
FeatureInterfacesetShortDescription 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.Map<java.lang.String,java.util.List<Qualifier>> getQualifiers()
FeatureInterfacegetQualifiers in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>public void setQualifiers(java.util.Map<java.lang.String,java.util.List<Qualifier>> qualifiers)
FeatureInterfacesetQualifiers in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>public void addQualifier(java.lang.String key,
Qualifier qualifier)
FeatureInterfaceaddQualifier in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>