|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | +package org.apache.tika.metadata; |
| 18 | + |
| 19 | +/** |
| 20 | + * Metadata keys for values that derive strictly from the XMP {@code tiff:} / {@code exif:} |
| 21 | + * schemas, mirroring {@link TIFF}. Tika folds these into the canonical {@link TIFF} keys, where |
| 22 | + * the same value can also arrive from binary EXIF; these parallel keys preserve provenance so a |
| 23 | + * consumer can distinguish an XMP-sourced value from a binary one. |
| 24 | + * <p> |
| 25 | + * Same pattern as {@link XMPDC}. Deliberately not implemented by {@link Metadata}; reference it |
| 26 | + * directly. |
| 27 | + */ |
| 28 | +public interface XMPTIFF { |
| 29 | + |
| 30 | + String PREFIX_TIFF = "xmp" + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "tiff"; |
| 31 | + String PREFIX_EXIF = "xmp" + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "exif"; |
| 32 | + |
| 33 | + Property EQUIPMENT_MAKE = Property.internalText( |
| 34 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "Make"); |
| 35 | + |
| 36 | + Property EQUIPMENT_MODEL = Property.internalText( |
| 37 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "Model"); |
| 38 | + |
| 39 | + Property SOFTWARE = Property.internalText( |
| 40 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "Software"); |
| 41 | + |
| 42 | + Property IMAGE_WIDTH = Property.internalInteger( |
| 43 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "ImageWidth"); |
| 44 | + |
| 45 | + Property IMAGE_LENGTH = Property.internalInteger( |
| 46 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "ImageLength"); |
| 47 | + |
| 48 | + Property BITS_PER_SAMPLE = Property.internalIntegerSequence( |
| 49 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "BitsPerSample"); |
| 50 | + |
| 51 | + Property SAMPLES_PER_PIXEL = Property.internalInteger( |
| 52 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "SamplesPerPixel"); |
| 53 | + |
| 54 | + Property ORIENTATION = Property.internalText( |
| 55 | + PREFIX_TIFF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "Orientation"); |
| 56 | + |
| 57 | + Property ORIGINAL_DATE = Property.internalDate( |
| 58 | + PREFIX_EXIF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "DateTimeOriginal"); |
| 59 | + |
| 60 | + Property ISO_SPEED_RATINGS = Property.internalIntegerSequence( |
| 61 | + PREFIX_EXIF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "IsoSpeedRatings"); |
| 62 | + |
| 63 | + /** Valid image width; folded into canonical {@link TIFF#IMAGE_WIDTH}. */ |
| 64 | + Property PIXEL_X_DIMENSION = Property.internalInteger( |
| 65 | + PREFIX_EXIF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "PixelXDimension"); |
| 66 | + |
| 67 | + /** Valid image height; folded into canonical {@link TIFF#IMAGE_LENGTH}. */ |
| 68 | + Property PIXEL_Y_DIMENSION = Property.internalInteger( |
| 69 | + PREFIX_EXIF + TikaCoreProperties.NAMESPACE_PREFIX_DELIMITER + "PixelYDimension"); |
| 70 | +} |
0 commit comments