org.apache.stanbol.reasoners.web.input.impl
Class SimpleInputManager

java.lang.Object
  extended by org.apache.stanbol.reasoners.web.input.impl.SimpleInputManager
All Implemented Interfaces:
ReasoningServiceInputManager

public class SimpleInputManager
extends java.lang.Object
implements ReasoningServiceInputManager

Simple implementation of ReasoningServiceInputManager. This class embeds a list of ReasoningServiceInputProviders; When the getInputData(Class) method is called, it iterates over all providers which support the given Class as type of the collection item.

Author:
enridaga

Constructor Summary
SimpleInputManager()
          Constructor
 
Method Summary
 void addInputProvider(ReasoningServiceInputProvider provider)
          Adds a ReasoningServiceInputProvider
<T> java.util.Iterator<T>
getInputData(java.lang.Class<T> type)
          Returns the Iterator which will embed all available data to be processed.
 java.util.List<ReasoningServiceInputProvider> getProviders()
          Get the unmodifiable list of ReasoningServiceInputProvider
 void removeInputProvider(ReasoningServiceInputProvider provider)
          Removes a ReasoningServiceInputProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleInputManager

public SimpleInputManager()
Constructor

Method Detail

addInputProvider

public void addInputProvider(ReasoningServiceInputProvider provider)
Adds a ReasoningServiceInputProvider

Specified by:
addInputProvider in interface ReasoningServiceInputManager
Parameters:
provider -

removeInputProvider

public void removeInputProvider(ReasoningServiceInputProvider provider)
Removes a ReasoningServiceInputProvider

Specified by:
removeInputProvider in interface ReasoningServiceInputManager
Parameters:
provider -

getInputData

public <T> java.util.Iterator<T> getInputData(java.lang.Class<T> type)
Returns the Iterator which will embed all available data to be processed. If a provider cannot adapt to "type", it is ignored.

Specified by:
getInputData in interface ReasoningServiceInputManager
Parameters:
type -

getProviders

public java.util.List<ReasoningServiceInputProvider> getProviders()
Get the unmodifiable list of ReasoningServiceInputProvider

Specified by:
getProviders in interface ReasoningServiceInputManager
Returns:
List


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.