de.cau.cs.kieler.kex.model.plugin
Class PluginExampleCollector

java.lang.Object
  extended by de.cau.cs.kieler.kex.model.ExampleCollector
      extended by de.cau.cs.kieler.kex.model.plugin.PluginExampleCollector

public class PluginExampleCollector
extends ExampleCollector

Contains all methods to collect example of plugin projects.

Rating red

Constructor Summary
PluginExampleCollector()
          Constructor for PluginExampleCollector.
 
Method Summary
 void collectCategory(IConfigurationElement categoryElement)
          Collects all categories of plugin-projects.
 List<String> getCategories()
          Returns the categorypool if it is not empty, otherwise loads categories.
static Example getExample(String exampleTitle)
           
 Map<String,Example> getExamplePool()
          Returns the loaded examplePool.
 SourceType getSourceType()
          Getter for SourceType.
 void load()
          Loads examples of extenders.
static Example toExample(IConfigurationElement exampleElement)
          filters out of a IConfigurationElement a Example.
 
Methods inherited from class de.cau.cs.kieler.kex.model.ExampleCollector
getExamplesAsStrings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginExampleCollector

public PluginExampleCollector()
Constructor for PluginExampleCollector.

Method Detail

load

public void load()
          throws KielerException
Loads examples of extenders.

Specified by:
load in class ExampleCollector
Throws:
KielerException - , if toExample(...) throws it.

collectCategory

public void collectCategory(IConfigurationElement categoryElement)
Collects all categories of plugin-projects.

Parameters:
categoryElement - , IConfigurationElement

getExamplePool

public Map<String,Example> getExamplePool()
Description copied from class: ExampleCollector
Returns the loaded examplePool.

Specified by:
getExamplePool in class ExampleCollector
Returns:
a Map with exampleId as key and example as value.

getCategories

public List<String> getCategories()
Returns the categorypool if it is not empty, otherwise loads categories.

Returns:
List of String

getSourceType

public SourceType getSourceType()
Description copied from class: ExampleCollector
Getter for SourceType. Every collector should have one.

Specified by:
getSourceType in class ExampleCollector
Returns:
SourceType

toExample

public static Example toExample(IConfigurationElement exampleElement)
filters out of a IConfigurationElement a Example.

Parameters:
exampleElement - , IConfigurationElement
Returns:
Example

getExample

public static Example getExample(String exampleTitle)
                          throws KielerException
Parameters:
exampleTitle - , String
Returns:
Example
Throws:
KielerException - , if a InvalidRegistryObjectException or a IllegalArgumentException has been thrown.