org.topbraid.strings
Interface ICompletionManager

All Known Implementing Classes:
ClassExpressionsCompletionManager, RangeCompletionManager

public interface ICompletionManager

An object that can narrow the auto-completion box for text completion.

Author:
Holger Knublauch

Method Summary
 java.util.Set<com.hp.hpl.jena.rdf.model.Resource> filterValidResources(com.hp.hpl.jena.rdf.model.Statement statement, java.util.Set<com.hp.hpl.jena.rdf.model.Resource> lexicallyMatchingResources)
          Removes those resources from the list of suggestions that are invalid to insert at the given context.
 boolean isSuitable(com.hp.hpl.jena.rdf.model.Statement s)
          Checks whether this completion manager can handle completing values in the given Statement context.
 

Method Detail

filterValidResources

java.util.Set<com.hp.hpl.jena.rdf.model.Resource> filterValidResources(com.hp.hpl.jena.rdf.model.Statement statement,
                                                                       java.util.Set<com.hp.hpl.jena.rdf.model.Resource> lexicallyMatchingResources)
Removes those resources from the list of suggestions that are invalid to insert at the given context.

Parameters:
s - the Statement (may very well be an EmptyObjectStatement)
resources - the set of all lexically matching resources
Returns:
the valid resources (may be the same as the input Set)

isSuitable

boolean isSuitable(com.hp.hpl.jena.rdf.model.Statement s)
Checks whether this completion manager can handle completing values in the given Statement context. For example, implementations would test whether the predicate is SWRL.body or the former object is a class etc. If the method returns true then the filter method will be invoked (and the method must be prepared to handle the input timely).

Parameters:
s - the Statement (may very well be an EmptyObjectStatement)
Returns:
true if this is able to handle the input
See Also:
EmptyObjectStatement