- All Known Implementing Classes:
DSLClassProvider,DSLJarProvider,DSLSourceProvider
public interface DSLKnowledgeProvider
DSLKnowledgeProvider is an interface that provides methods to create Knowledge instances from various types of resources.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Knowledgecreate(KnowledgeService service, File... files) default Knowledgecreate(KnowledgeService service, InputStream... streams) default Knowledgecreate(KnowledgeService service, Reader... streams) default Knowledgecreate(KnowledgeService service, URL... resources) Given the sources' URLs, the DSL implementation must return a new Knowledge instance.default Knowledgecreate(KnowledgeService service, TypeResolver resolver, File... files) create(KnowledgeService service, TypeResolver typeResolver, InputStream... streams) default Knowledgecreate(KnowledgeService service, TypeResolver typeResolver, Reader... streams) default Knowledgecreate(KnowledgeService service, TypeResolver typeResolver, URL... resources) Given the sources' URLs, the DSL implementation must return a new Knowledge instance.getName()Returns the name of the DSL knowledge provider.
-
Method Details
-
getName
String getName()Returns the name of the DSL knowledge provider.- Returns:
- the name of the provider
-
create
Given the sources' URLs, the DSL implementation must return a new Knowledge instance. Depending on the DSL implementation, URLs may refer to plain text resources, Java classes/archives, JDBC connection strings, files, etc.- Parameters:
service- Knowledge service.resources- remote or local resources to apply.- Returns:
- new Knowledge instance.
- Throws:
IOException- if an error occurs when reading the data sources.
-
create
default Knowledge create(KnowledgeService service, TypeResolver typeResolver, URL... resources) throws IOException Given the sources' URLs, the DSL implementation must return a new Knowledge instance. Depending on the DSL implementation, URLs may refer to plain text resources, Java classes/archives, JDBC connection strings, files, etc.
- Parameters:
resources- remote or local resources to applytypeResolver- TypeResolver to use.service- Knowledge service.- Returns:
- new Knowledge instance
- Throws:
IOException- if an error occurs when reading the data sources.
-
create
- Parameters:
streams- remote or local resources to applyservice- Knowledge service.- Returns:
- new Knowledge instance
- Throws:
IOException- if an error occurs when reading the data sources.- See Also:
-
create
default Knowledge create(KnowledgeService service, TypeResolver resolver, File... files) throws IOException - Parameters:
files- file resourcesservice- Knowledge service.resolver- Type resolver- Returns:
- new Knowledge instance
- Throws:
IOException- if an error occurs when reading the data sources.- See Also:
-
create
- Parameters:
files- file resourcesservice- Knowledge service.- Returns:
- new Knowledge instance
- Throws:
IOException- if an error occurs when reading the data sources.- See Also:
-
create
Knowledge create(KnowledgeService service, TypeResolver typeResolver, InputStream... streams) throws IOException - Parameters:
streams- remote or local resources to applyservice- Knowledge service.typeResolver- TypeResolver to use.- Returns:
- new Knowledge instance
- Throws:
IOException- if an error occurs when reading the data sources.- See Also:
-
create
- Parameters:
streams- remote or local resources to applyservice- Knowledge service.- Returns:
- new Knowledge instance
- Throws:
IOException- if resources can not be readUnsupportedOperationException- if this method is not supported by the implementation- See Also:
-
create
default Knowledge create(KnowledgeService service, TypeResolver typeResolver, Reader... streams) throws IOException - Parameters:
streams- remote or local resources to applyservice- Knowledge service.typeResolver- TypeResolver to use.- Returns:
- new Knowledge instance
- Throws:
IOException- if resources can not be readUnsupportedOperationException- if this method is not supported by the implementation- See Also:
-