[
https://issues.apache.org/jira/browse/TIKA-4762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18095712#comment-18095712
]
Carl Eric Codere commented on TIKA-4762:
----------------------------------------
[~tallison] : Actually i have created, quite a while back, a generic plugin
system for metadata modification and extraction, and i was looking at the Tika
infrastructure, and wanted to see if i could use your Property class and extend
it as a base class for a Metadata attribute definition, as some of the items
are similar, see my fields below. But after looking more closely at Property
class it would require several changes on your side and would probably not be
worth for TIKA. Because in LDAP/JNDI and other type system the type system is
open, hence ValueType could not be closed which yours is based on XMP which is
ok for your intended main needs i guess.
{noformat}
/** Type name or OID (bare, without any {@code {n}} suffix) - Equivalent to
your valueType */
String typeName
/** One of the {@code VALUE_TYPE_*} constants. Never {@code null} - equivalent
to your PropertyType. */
String valueType;
/**
* Context type identifier. Non-null only when {@link #valueType} is
* {@link #VALUE_TYPE_ALT}.
*/
String contextType;
/** {@code true} if values are system-only (NO-USER-MODIFICATION). Similar to
internal in XMP and TIKA */
boolean readOnly;
long maxValueLength;
Set<String> choices;
/** OID or other standardised identifier. May be {@code null}. */
String oid;
/** Namespace URI. {@code null} means no namespace. */
String namespaceURI;
/** Local name. Never {@code null} or empty. */
String localName;
/** Human-readable description. May be {@code null}. */
String description;
/**
* Origin of this definition (e.g. {@code "RFC 4519"}). May be {@code null}.
*/
String origin;
/** Whether this definition is obsolete. Defaults to {@code false}. */
boolean obsolete;
{noformat}
{code:java}
{code}
> Make Property class non-final
> -----------------------------
>
> Key: TIKA-4762
> URL: https://issues.apache.org/jira/browse/TIKA-4762
> Project: Tika
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.3.0
> Reporter: Carl Eric Codere
> Priority: Minor
>
> h2. Problem description
> The Property class is {{final}} in {{tika-core}} and constructors are
> private, which makes subclassing or inheriting from this class impossible.
> h2. How to resolve
> Make the property class non-final and optionally, make the constructors
> protected
--
This message was sent by Atlassian Jira
(v8.20.10#820010)