public interface ResourceHelper
Modifier and Type | Field and Description |
---|---|
static Pattern |
TEXT_TYPE_EXTENSIONS |
static org.apache.tika.Tika |
TIKA |
Modifier and Type | Method and Description |
---|---|
default Optional<info.magnolia.resourceloader.Resource> |
getFirstResource(info.magnolia.resourceloader.Resource resource) |
default Optional<javax.jcr.Node> |
getJcrNode(info.magnolia.resourceloader.Resource resource) |
default boolean |
isTextMediaType(String filename)
Checks whether the file name mimeType detected by
Tika.detect(String) is one of the
following. |
static final Pattern TEXT_TYPE_EXTENSIONS
static final org.apache.tika.Tika TIKA
default Optional<info.magnolia.resourceloader.Resource> getFirstResource(info.magnolia.resourceloader.Resource resource)
default Optional<javax.jcr.Node> getJcrNode(info.magnolia.resourceloader.Resource resource)
default boolean isTextMediaType(String filename)
Tika.detect(String)
is one of the
following.
TEXT_TYPE_EXTENSIONS
filename
- The name of the file.IllegalArgumentException
- if filename is null.Copyright © 2020 Magnolia International Ltd.. All rights reserved.