org.carrot2.core
Class ProcessingComponentSuite

java.lang.Object
  extended by org.carrot2.core.ProcessingComponentSuite

public class ProcessingComponentSuite
extends Object

A set of IProcessingComponents used in Carrot2 applications.


Constructor Summary
ProcessingComponentSuite()
           
ProcessingComponentSuite(ArrayList<DocumentSourceDescriptor> sources, ArrayList<ProcessingComponentDescriptor> algorithms)
           
 
Method Summary
static ProcessingComponentSuite deserialize(IResource resource, ResourceLookup resourceLookup)
          Deserializes component suite information from an XML stream.
 List<ProcessingComponentDescriptor> getAlgorithms()
          Returns the internal list of algorithms.
 ProcessingComponentConfiguration[] getComponentConfigurations()
          Returns all processing component configurations available in this suite.
 List<ProcessingComponentDescriptor> getComponents()
          Returns all components available in this suite, including data sources, algorithms and any other types.
 List<DocumentSourceDescriptor> getSources()
          Returns the internal list of document sources.
 List<ProcessingComponentDescriptor> removeUnavailableComponents()
          Remove components marked as unavailable from the suite.
 void serialize(OutputStream stream)
          Serializes this component suite as an UTF-8 encoded XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessingComponentSuite

public ProcessingComponentSuite()

ProcessingComponentSuite

public ProcessingComponentSuite(ArrayList<DocumentSourceDescriptor> sources,
                                ArrayList<ProcessingComponentDescriptor> algorithms)
Method Detail

getSources

public List<DocumentSourceDescriptor> getSources()
Returns the internal list of document sources. Changes to this list will affect the suite.


getAlgorithms

public List<ProcessingComponentDescriptor> getAlgorithms()
Returns the internal list of algorithms. Changes to this list will affect the suite.


getComponents

public List<ProcessingComponentDescriptor> getComponents()
Returns all components available in this suite, including data sources, algorithms and any other types.


deserialize

public static ProcessingComponentSuite deserialize(IResource resource,
                                                   ResourceLookup resourceLookup)
                                            throws Exception
Deserializes component suite information from an XML stream.

Parameters:
resource - The resource to be deserialized (must not be null).
resourceLookup - Resource lookup utilities for potential included resources.
Throws:
Exception

serialize

public void serialize(OutputStream stream)
               throws Exception
Serializes this component suite as an UTF-8 encoded XML.

Throws:
Exception

removeUnavailableComponents

public List<ProcessingComponentDescriptor> removeUnavailableComponents()
Remove components marked as unavailable from the suite.

See Also:
ProcessingComponentDescriptor.isComponentAvailable()

getComponentConfigurations

public ProcessingComponentConfiguration[] getComponentConfigurations()
Returns all processing component configurations available in this suite.

See Also:
Controller.init(Map, ProcessingComponentConfiguration...)


Copyright (c) Dawid Weiss, Stanislaw Osinski