Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,15 @@
"groupId" : "org.apache.camel",
"artifactId" : "camel-test-infra-torchserve",
"version" : "4.15.0-SNAPSHOT"
}, {
"service" : "org.apache.camel.test.infra.docling.services.DoclingInfraService",
"description" : "Document processing and conversion service",
"implementation" : "org.apache.camel.test.infra.docling.services.DoclingLocalContainerInfraService",
"alias" : [ "docling" ],
"aliasImplementation" : [ ],
"groupId" : "org.apache.camel",
"artifactId" : "camel-test-infra-docling",
"version" : "4.15.0-SNAPSHOT"
}, {
"service" : "org.apache.camel.test.infra.aws.common.services.AWSInfraService",
"description" : "Local AWS Services with LocalStack",
Expand Down
14 changes: 14 additions & 0 deletions components/camel-ai/camel-docling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
<version>${jackson2-version}</version>
</dependency>

<!-- HTTP client for docling-serve API integration -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${httpclient-version}</version>
</dependency>

<!-- for testing -->
<dependency>
<groupId>org.apache.camel</groupId>
Expand All @@ -58,6 +65,13 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-infra-docling</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "contentInBody": getOrCreateConfiguration(target).setContentInBody(property(camelContext, boolean.class, value)); return true;
case "doclingcommand":
case "doclingCommand": getOrCreateConfiguration(target).setDoclingCommand(property(camelContext, java.lang.String.class, value)); return true;
case "doclingserveurl":
case "doclingServeUrl": getOrCreateConfiguration(target).setDoclingServeUrl(property(camelContext, java.lang.String.class, value)); return true;
case "enableocr":
case "enableOCR": getOrCreateConfiguration(target).setEnableOCR(property(camelContext, boolean.class, value)); return true;
case "includelayoutinfo":
Expand All @@ -52,6 +54,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "outputFormat": getOrCreateConfiguration(target).setOutputFormat(property(camelContext, java.lang.String.class, value)); return true;
case "processtimeout":
case "processTimeout": getOrCreateConfiguration(target).setProcessTimeout(property(camelContext, long.class, value)); return true;
case "usedoclingserve":
case "useDoclingServe": getOrCreateConfiguration(target).setUseDoclingServe(property(camelContext, boolean.class, value)); return true;
case "workingdirectory":
case "workingDirectory": getOrCreateConfiguration(target).setWorkingDirectory(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
Expand All @@ -68,6 +72,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "contentInBody": return boolean.class;
case "doclingcommand":
case "doclingCommand": return java.lang.String.class;
case "doclingserveurl":
case "doclingServeUrl": return java.lang.String.class;
case "enableocr":
case "enableOCR": return boolean.class;
case "includelayoutinfo":
Expand All @@ -83,6 +89,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "outputFormat": return java.lang.String.class;
case "processtimeout":
case "processTimeout": return long.class;
case "usedoclingserve":
case "useDoclingServe": return boolean.class;
case "workingdirectory":
case "workingDirectory": return java.lang.String.class;
default: return null;
Expand All @@ -100,6 +108,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "contentInBody": return getOrCreateConfiguration(target).isContentInBody();
case "doclingcommand":
case "doclingCommand": return getOrCreateConfiguration(target).getDoclingCommand();
case "doclingserveurl":
case "doclingServeUrl": return getOrCreateConfiguration(target).getDoclingServeUrl();
case "enableocr":
case "enableOCR": return getOrCreateConfiguration(target).isEnableOCR();
case "includelayoutinfo":
Expand All @@ -115,6 +125,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "outputFormat": return getOrCreateConfiguration(target).getOutputFormat();
case "processtimeout":
case "processTimeout": return getOrCreateConfiguration(target).getProcessTimeout();
case "usedoclingserve":
case "useDoclingServe": return getOrCreateConfiguration(target).isUseDoclingServe();
case "workingdirectory":
case "workingDirectory": return getOrCreateConfiguration(target).getWorkingDirectory();
default: return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "contentInBody": target.setContentInBody(property(camelContext, boolean.class, value)); return true;
case "doclingcommand":
case "doclingCommand": target.setDoclingCommand(property(camelContext, java.lang.String.class, value)); return true;
case "doclingserveurl":
case "doclingServeUrl": target.setDoclingServeUrl(property(camelContext, java.lang.String.class, value)); return true;
case "enableocr":
case "enableOCR": target.setEnableOCR(property(camelContext, boolean.class, value)); return true;
case "includelayoutinfo":
Expand All @@ -40,6 +42,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "outputFormat": target.setOutputFormat(property(camelContext, java.lang.String.class, value)); return true;
case "processtimeout":
case "processTimeout": target.setProcessTimeout(property(camelContext, long.class, value)); return true;
case "usedoclingserve":
case "useDoclingServe": target.setUseDoclingServe(property(camelContext, boolean.class, value)); return true;
case "workingdirectory":
case "workingDirectory": target.setWorkingDirectory(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
Expand All @@ -53,6 +57,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "contentInBody": return boolean.class;
case "doclingcommand":
case "doclingCommand": return java.lang.String.class;
case "doclingserveurl":
case "doclingServeUrl": return java.lang.String.class;
case "enableocr":
case "enableOCR": return boolean.class;
case "includelayoutinfo":
Expand All @@ -66,6 +72,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "outputFormat": return java.lang.String.class;
case "processtimeout":
case "processTimeout": return long.class;
case "usedoclingserve":
case "useDoclingServe": return boolean.class;
case "workingdirectory":
case "workingDirectory": return java.lang.String.class;
default: return null;
Expand All @@ -80,6 +88,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "contentInBody": return target.isContentInBody();
case "doclingcommand":
case "doclingCommand": return target.getDoclingCommand();
case "doclingserveurl":
case "doclingServeUrl": return target.getDoclingServeUrl();
case "enableocr":
case "enableOCR": return target.isEnableOCR();
case "includelayoutinfo":
Expand All @@ -93,6 +103,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "outputFormat": return target.getOutputFormat();
case "processtimeout":
case "processTimeout": return target.getProcessTimeout();
case "usedoclingserve":
case "useDoclingServe": return target.isUseDoclingServe();
case "workingdirectory":
case "workingDirectory": return target.getWorkingDirectory();
default: return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "contentInBody": target.getConfiguration().setContentInBody(property(camelContext, boolean.class, value)); return true;
case "doclingcommand":
case "doclingCommand": target.getConfiguration().setDoclingCommand(property(camelContext, java.lang.String.class, value)); return true;
case "doclingserveurl":
case "doclingServeUrl": target.getConfiguration().setDoclingServeUrl(property(camelContext, java.lang.String.class, value)); return true;
case "enableocr":
case "enableOCR": target.getConfiguration().setEnableOCR(property(camelContext, boolean.class, value)); return true;
case "includelayoutinfo":
Expand All @@ -42,6 +44,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "outputFormat": target.getConfiguration().setOutputFormat(property(camelContext, java.lang.String.class, value)); return true;
case "processtimeout":
case "processTimeout": target.getConfiguration().setProcessTimeout(property(camelContext, long.class, value)); return true;
case "usedoclingserve":
case "useDoclingServe": target.getConfiguration().setUseDoclingServe(property(camelContext, boolean.class, value)); return true;
case "workingdirectory":
case "workingDirectory": target.getConfiguration().setWorkingDirectory(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
Expand All @@ -55,6 +59,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "contentInBody": return boolean.class;
case "doclingcommand":
case "doclingCommand": return java.lang.String.class;
case "doclingserveurl":
case "doclingServeUrl": return java.lang.String.class;
case "enableocr":
case "enableOCR": return boolean.class;
case "includelayoutinfo":
Expand All @@ -70,6 +76,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "outputFormat": return java.lang.String.class;
case "processtimeout":
case "processTimeout": return long.class;
case "usedoclingserve":
case "useDoclingServe": return boolean.class;
case "workingdirectory":
case "workingDirectory": return java.lang.String.class;
default: return null;
Expand All @@ -84,6 +92,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "contentInBody": return target.getConfiguration().isContentInBody();
case "doclingcommand":
case "doclingCommand": return target.getConfiguration().getDoclingCommand();
case "doclingserveurl":
case "doclingServeUrl": return target.getConfiguration().getDoclingServeUrl();
case "enableocr":
case "enableOCR": return target.getConfiguration().isEnableOCR();
case "includelayoutinfo":
Expand All @@ -99,6 +109,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "outputFormat": return target.getConfiguration().getOutputFormat();
case "processtimeout":
case "processTimeout": return target.getConfiguration().getProcessTimeout();
case "usedoclingserve":
case "useDoclingServe": return target.getConfiguration().isUseDoclingServe();
case "workingdirectory":
case "workingDirectory": return target.getConfiguration().getWorkingDirectory();
default: return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ public class DoclingEndpointUriFactory extends org.apache.camel.support.componen
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Map<String, String> MULTI_VALUE_PREFIXES;
static {
Set<String> props = new HashSet<>(12);
Set<String> props = new HashSet<>(14);
props.add("contentInBody");
props.add("doclingCommand");
props.add("doclingServeUrl");
props.add("enableOCR");
props.add("includeLayoutInfo");
props.add("lazyStartProducer");
Expand All @@ -35,6 +36,7 @@ public class DoclingEndpointUriFactory extends org.apache.camel.support.componen
props.add("operationId");
props.add("outputFormat");
props.add("processTimeout");
props.add("useDoclingServe");
props.add("workingDirectory");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
SECRET_PROPERTY_NAMES = Collections.emptySet();
Expand Down
Loading
Loading