public abstract class KDDStrategy extends java.lang.Object implements IAnalysisAsset
KDDStrategy is the top-level abstraction for a Strategy design pattern used for running various families of clustering and anomaly detection algorithms. Subclasses simply implement the executeStrategy method with their specific clustering or anomaly detection algorithm. Additionally, KDDStrategy is a realization of the IAnalysisAsset interface, and as such, must produce a URI of the data it represents to be displayed to the user.
Constructor and Description |
---|
KDDStrategy()
The constructor.
|
KDDStrategy(java.lang.String name)
The constructor, with name injection.
|
KDDStrategy(java.lang.String name,
java.util.ArrayList<IDataProvider> data)
The constructor, takes an array of IDataProviders.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
executeStrategy()
This method allows subclasses to implement a unique clustering or anomaly
detection algorithm and produce a KDDAnalysisAsset for clients to display
and manipulate.
|
java.lang.String |
getName()
This operation returns the name of the asset.
|
java.util.Properties |
getProperties()
This operation returns the entire list of properties for this
IAnalysisAsset as an instance of Java's Properties class.
|
java.util.ArrayList<Entry> |
getPropertiesAsEntryList()
This operation returns the asset's properties as a list of Entry objects.
|
java.lang.String |
getProperty(java.lang.String key)
This operation returns the value of one of the assets properties,
requested by a key.
|
AnalysisAssetType |
getType()
This operation returns the type of the IAnalysisAsset.
|
java.net.URI |
getURI()
This operation returns the URI of the asset.
|
void |
resetProperties()
This operations resets the properties of the asset to their default
state.
|
boolean |
setProperty(java.lang.String key,
java.lang.String value)
This operation sets the value of a property with the given key.
|
public KDDStrategy(java.lang.String name, java.util.ArrayList<IDataProvider> data) throws java.lang.IllegalArgumentException
The constructor, takes an array of IDataProviders. By convention, the first IDataProvider of that array will be the loaded data to be analyzed. Any other IDataProviders will be reference or extra data.
name
- data
- java.lang.IllegalArgumentException
public KDDStrategy()
The constructor.
public KDDStrategy(java.lang.String name)
The constructor, with name injection.
name
- public abstract boolean executeStrategy()
This method allows subclasses to implement a unique clustering or anomaly detection algorithm and produce a KDDAnalysisAsset for clients to display and manipulate.
public java.lang.String getName()
This operation returns the name of the asset.
getName
in interface IAnalysisAsset
The name
public AnalysisAssetType getType()
This operation returns the type of the IAnalysisAsset.
getType
in interface IAnalysisAsset
The type of the asset
public java.lang.String getProperty(java.lang.String key)
This operation returns the value of one of the assets properties, requested by a key. If that property does not exist, it returns null.
getProperty
in interface IAnalysisAsset
key
- The key of the property that should be retrieved.
The value or null if the key does not exist.
public boolean setProperty(java.lang.String key, java.lang.String value)
This operation sets the value of a property with the given key. It returns true if the key is in the properties list and false if not. Calling this operation will never add new properties to the list.
setProperty
in interface IAnalysisAsset
key
- The key whose value should be set.
value
- The value for the specified key. This value will only be set if the key exists.
True if the key is in the list, false otherwise.
public void resetProperties()
This operations resets the properties of the asset to their default state.
resetProperties
in interface IAnalysisAsset
public java.util.Properties getProperties()
This operation returns the entire list of properties for this IAnalysisAsset as an instance of Java's Properties class.
getProperties
in interface IAnalysisAsset
The properties of this asset or null if no properties exist.
public java.util.ArrayList<Entry> getPropertiesAsEntryList()
This operation returns the asset's properties as a list of Entry objects.
getPropertiesAsEntryList
in interface IAnalysisAsset
public java.net.URI getURI()
This operation returns the URI of the asset.
getURI
in interface IAnalysisAsset
The URI