public abstract class AbstractFeature<S extends AbstractSequence<C>,C extends Compound> extends Object implements FeatureInterface<S,C>
Modifier and Type | Field and Description |
---|---|
static Comparator<FeatureInterface<?,?>> |
LENGTH
Sort features by length.
|
static Comparator<FeatureInterface<?,?>> |
LOCATION_LENGTH
Sort features by start position and then longest length.
|
static Comparator<FeatureInterface<?,?>> |
TYPE
Sort features by type
|
Constructor and Description |
---|
AbstractFeature(String type,
String source)
A feature has a type and a source
|
Modifier and Type | Method and Description |
---|---|
void |
addQualifier(String key,
Qualifier qualifier)
Add a qualifier
|
List<FeatureInterface<S,C>> |
getChildrenFeatures()
Get the children features
|
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
|
Map<String,List<Qualifier>> |
getQualifiers()
Get the qualifiers for this feature
|
String |
getShortDescription()
Get the short description that can be used to describe the feature
|
String |
getSource()
The feature source
|
String |
getType()
The feature type
|
Object |
getUserObject() |
void |
setChildrenFeatures(List<FeatureInterface<S,C>> features)
Set the children features
|
void |
setDescription(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(Map<String,List<Qualifier>> qualifiers)
Set the qualifiers
|
void |
setShortDescription(String shortDescription)
Set the short description that can be used to describe the feature
|
void |
setSource(String source)
Set the feature source
|
void |
setType(String type)
Set the feature type
|
void |
setUserObject(Object userObject)
Allow the user to associate an object with the feature.
|
public static final Comparator<FeatureInterface<?,?>> LOCATION_LENGTH
public static final Comparator<FeatureInterface<?,?>> LENGTH
public static final Comparator<FeatureInterface<?,?>> TYPE
public AbstractFeature(String type, 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 String getType()
getType
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setType(String type)
setType
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
type
- public String getSource()
getSource
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setSource(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 List<FeatureInterface<S,C>> getChildrenFeatures()
getChildrenFeatures
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setChildrenFeatures(List<FeatureInterface<S,C>> features)
setChildrenFeatures
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
features
- public String getDescription()
FeatureInterface
getDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setDescription(String description)
FeatureInterface
setDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
description
- the description to setpublic String getShortDescription()
FeatureInterface
getShortDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setShortDescription(String shortDescription)
FeatureInterface
setShortDescription
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
shortDescription
- the shortDescription to setpublic Object getUserObject()
getUserObject
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setUserObject(Object userObject)
setUserObject
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
userObject
- the userObject to setpublic Map<String,List<Qualifier>> getQualifiers()
FeatureInterface
getQualifiers
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void setQualifiers(Map<String,List<Qualifier>> qualifiers)
FeatureInterface
setQualifiers
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
public void addQualifier(String key, Qualifier qualifier)
FeatureInterface
addQualifier
in interface FeatureInterface<S extends AbstractSequence<C>,C extends Compound>
Copyright © 2000–2019 BioJava. All rights reserved.