You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2012/05/17 18:33:44 UTC
svn commit: r1339695 - in
/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata: MSOffice.java
Office.java TikaCoreProperties.java
Author: nick
Date: Thu May 17 16:33:44 2012
New Revision: 1339695
URL: http://svn.apache.org/viewvc?rev=1339695&view=rev
Log:
TIKA-929 Bring some of the key parts of the Office metadata into TikaCoreProperties, with composites to support the previous (now deprecated) ones in MSOffice
Modified:
tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/MSOffice.java
tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/Office.java
tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java
Modified: tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/MSOffice.java
URL: http://svn.apache.org/viewvc/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/MSOffice.java?rev=1339695&r1=1339694&r2=1339695&view=diff
==============================================================================
--- tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/MSOffice.java (original)
+++ tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/MSOffice.java Thu May 17 16:33:44 2012
@@ -24,11 +24,11 @@ package org.apache.tika.metadata;
*/
public interface MSOffice {
- String KEYWORDS = "Keywords";
+ @Deprecated String KEYWORDS = "Keywords";
String COMMENTS = "Comments";
- String LAST_AUTHOR = "Last-Author";
+ @Deprecated String LAST_AUTHOR = "Last-Author";
String APPLICATION_NAME = "Application-Name";
@@ -108,15 +108,15 @@ public interface MSOffice {
String EDIT_TIME = "Edit-Time";
/** When was the document created? */
- Property CREATION_DATE =
+ @Deprecated Property CREATION_DATE =
Property.internalDate("Creation-Date");
/** When was the document last saved? */
- Property LAST_SAVED =
+ @Deprecated Property LAST_SAVED =
Property.internalDate("Last-Save-Date");
/** When was the document last printed? */
- Property LAST_PRINTED =
+ @Deprecated Property LAST_PRINTED =
Property.internalDate("Last-Printed");
/**
Modified: tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/Office.java
URL: http://svn.apache.org/viewvc/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/Office.java?rev=1339695&r1=1339694&r2=1339695&view=diff
==============================================================================
--- tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/Office.java (original)
+++ tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/Office.java Thu May 17 16:33:44 2012
@@ -58,6 +58,7 @@ public interface Office {
Property LAST_AUTHOR = Property.internalText(
PREFIX_DOC_META + Metadata.PREFIX_DELIMITER + "last-author");
+
/** When was the document created? */
Property CREATION_DATE = Property.internalDate(
PREFIX_DOC_META + Metadata.PREFIX_DELIMITER + "creation-date");
Modified: tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java
URL: http://svn.apache.org/viewvc/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java?rev=1339695&r1=1339694&r2=1339695&view=diff
==============================================================================
--- tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java (original)
+++ tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java Thu May 17 16:33:44 2012
@@ -64,6 +64,17 @@ public interface TikaCoreProperties {
public static final Property CREATOR = Property.composite(DublinCore.CREATOR,
new Property[] { Property.internalText(Metadata.CREATOR) });
+ /**
+ * @see Office#INITIAL_AUTHOR
+ */
+ public static final Property INITIAL_AUTHOR = Office.INITIAL_AUTHOR;
+
+ /**
+ * @see Office#LAST_AUTHOR
+ */
+ public static final Property LAST_AUTHOR = Property.composite(Office.LAST_AUTHOR,
+ new Property[] { Property.internalText(MSOffice.LAST_AUTHOR) });
+
/**
* @see DublinCore#LANGUAGE
*/
@@ -121,6 +132,12 @@ public interface TikaCoreProperties {
public static final Property SUBJECT = Property.composite(DublinCore.SUBJECT,
new Property[] { Property.internalText(Metadata.SUBJECT) });
+ /**
+ * @see Office#KEYWORDS
+ */
+ public static final Property KEYWORDS = Property.composite(Office.KEYWORDS,
+ new Property[] { Property.internalTextBag(MSOffice.KEYWORDS) });
+
// Date related properties
@@ -136,7 +153,17 @@ public interface TikaCoreProperties {
public static final Property MODIFIED = Property.composite(DublinCore.MODIFIED,
new Property[] { Property.internalText(Metadata.MODIFIED) });
- // TODO Bring across additional date properties from MSOffice, once they're namespaced
+ /** @see Office#CREATION_DATE */
+ public static final Property CREATION_DATE = Property.composite(Office.CREATION_DATE,
+ new Property[] { MSOffice.CREATION_DATE });
+
+ /** @see Office#SAVE_DATE */
+ public static final Property SAVE_DATE = Property.composite(Office.SAVE_DATE,
+ new Property[] { MSOffice.LAST_SAVED });
+
+ /** @see Office#PRINT_DATE */
+ public static final Property PRINT_DATE = Property.composite(Office.PRINT_DATE,
+ new Property[] { MSOffice.LAST_PRINTED });
// Geographic related properties