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 00:37:19 UTC
svn commit: r1339404 -
/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java
Author: nick
Date: Wed May 16 22:37:19 2012
New Revision: 1339404
URL: http://svn.apache.org/viewvc?rev=1339404&view=rev
Log:
TIKA-928 Patch from Ray Gauss (plus extra JavaDocs) - start to define the set of common consistent metadata that all parsers will try to provide, no matter what their individual file format may term things
Added:
tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java
Added: 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=1339404&view=auto
==============================================================================
--- tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java (added)
+++ tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/TikaCoreProperties.java Wed May 16 22:37:19 2012
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tika.metadata;
+
+/**
+ * Contains a core set of basic Tika metadata properties, which all parsers
+ * will attempt to supply (where the file format permits). These are all
+ * defined in terms of other standard namespaces.
+ *
+ * Users of Tika who wish to have consistent metadata across file formats
+ * can make use of these Properties, knowing that where present they will
+ * have consistent semantic meaning between different file formats. (No
+ * matter if one file format calls it Title, another Long-Title and another
+ * Long-Name, if they all mean the same thing as defined by
+ * {@link DublinCore#TITLE} then they will all be present as such)
+ *
+ * For now, most of these properties are composite ones including the deprecated
+ * non-prefixed String properties from the Metadata class. In Tika 2.0, most
+ * of these will revert back to simple assignments.
+ */
+@SuppressWarnings("deprecation")
+public interface TikaCoreProperties {
+ /**
+ * @see DublinCore#FORMAT
+ */
+ public static final Property FORMAT = Property.composite(DublinCore.FORMAT,
+ new Property[] { Property.internalText(Metadata.FORMAT) });
+
+ /**
+ * @see DublinCore#IDENTIFIER
+ */
+ public static final Property IDENTIFIER = Property.composite(DublinCore.IDENTIFIER,
+ new Property[] { Property.internalText(Metadata.IDENTIFIER) });
+
+ /**
+ * @see DublinCore#MODIFIED
+ */
+ public static final Property MODIFIED = Property.composite(DublinCore.MODIFIED,
+ new Property[] { Property.internalText(Metadata.MODIFIED) });
+
+ /**
+ * @see DublinCore#CONTRIBUTOR
+ */
+ public static final Property CONTRIBUTOR = Property.composite(DublinCore.CONTRIBUTOR,
+ new Property[] { Property.internalText(Metadata.CONTRIBUTOR) });
+
+ /**
+ * @see DublinCore#COVERAGE
+ */
+ public static final Property COVERAGE = Property.composite(DublinCore.COVERAGE,
+ new Property[] { Property.internalText(Metadata.COVERAGE) });
+
+ /**
+ * @see DublinCore#CREATOR
+ */
+ public static final Property CREATOR = Property.composite(DublinCore.CREATOR,
+ new Property[] { Property.internalText(Metadata.CREATOR) });
+
+ /**
+ * @see DublinCore#DATE
+ */
+ public static final Property DATE = Property.composite(DublinCore.DATE,
+ new Property[] { Metadata.DATE });
+
+ /**
+ * @see DublinCore#DESCRIPTION
+ */
+ public static final Property DESCRIPTION = Property.composite(DublinCore.DESCRIPTION,
+ new Property[] { Property.internalText(Metadata.DESCRIPTION) });
+
+ /**
+ * @see DublinCore#LANGUAGE
+ */
+ public static final Property LANGUAGE = Property.composite(DublinCore.LANGUAGE,
+ new Property[] { Property.internalText(Metadata.LANGUAGE) });
+
+ /**
+ * @see DublinCore#PUBLISHER
+ */
+ public static final Property PUBLISHER = Property.composite(DublinCore.PUBLISHER,
+ new Property[] { Property.internalText(Metadata.PUBLISHER) });
+
+ /**
+ * @see DublinCore#RELATION
+ */
+ public static final Property RELATION = Property.composite(DublinCore.RELATION,
+ new Property[] { Property.internalText(Metadata.RELATION) });
+
+ /**
+ * @see DublinCore#RIGHTS
+ */
+ public static final Property RIGHTS = Property.composite(DublinCore.RIGHTS,
+ new Property[] { Property.internalText(Metadata.RIGHTS) });
+
+ /**
+ * @see DublinCore#SOURCE
+ */
+ public static final Property SOURCE = Property.composite(DublinCore.SOURCE,
+ new Property[] { Property.internalText(Metadata.SOURCE) });
+
+ /**
+ * @see DublinCore#SUBJECT
+ */
+ public static final Property SUBJECT = Property.composite(DublinCore.SUBJECT,
+ new Property[] { Property.internalText(Metadata.SUBJECT) });
+
+ /**
+ * @see DublinCore#TITLE
+ */
+ public static final Property TITLE = Property.composite(DublinCore.TITLE,
+ new Property[] { Property.internalText(Metadata.TITLE) });
+
+ /**
+ * @see DublinCore#TYPE
+ */
+ public static final Property TYPE = Property.composite(DublinCore.TYPE,
+ new Property[] { Property.internalText(Metadata.TYPE) });
+}