Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #199: Config Mapping update #201

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
import java.util.Map;
import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;

/**
* Tika parser configuration
*/
@ConfigMapping(prefix = "quarkus.tika")
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
public class TikaConfiguration {
public interface TikaConfiguration {
/**
* The resource path within the application artifact to the {@code tika-config.xml} file.
*/
@ConfigItem
public Optional<String> tikaConfigPath;
Optional<String> tikaConfigPath;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Optional<String> tikaConfigPath;
Optional<String> tikaConfigPath();


/**
* Comma separated list of the parsers which must be supported.
Expand All @@ -40,8 +41,7 @@ public class TikaConfiguration {
*
* This property will have no effect if the `tikaConfigPath' property has been set.
*/
@ConfigItem
public Optional<String> parsers;
Optional<String> parsers;

/**
* Configuration of the individual parsers.
Expand All @@ -51,8 +51,7 @@ public class TikaConfiguration {
* quarkus.tika.parsers = pdf,odf
* quarkus.tika.parser-options.pdf.sort-by-position = true
*/
@ConfigItem
public Map<String, Map<String, String>> parserOptions;
Map<String, Map<String, String>> parserOptions;

/**
* Full parser class name for a given parser abbreviation.
Expand All @@ -62,15 +61,14 @@ public class TikaConfiguration {
* quarkus.tika.parsers = classparser
* quarkus.tika.parser.classparser = org.apache.tika.parser.asm.ClassParser
*/
@ConfigItem
public Map<String, String> parser;
Map<String, String> parser;

/**
* Controls how the content of the embedded documents is parsed.
* By default it is appended to the main document content.
* Setting this property to false makes the content of each of the embedded documents
* available separately.
*/
@ConfigItem(defaultValue = "true")
public boolean appendEmbeddedContent;
@WithDefault("true")
boolean appendEmbeddedContent;
}
Loading