View Javadoc

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   * XMP Dynamic Media schema. This is a collection of
21   * {@link Property property definition} constants for the dynamic media
22   * properties defined in the XMP standard.
23   *
24   * @since Apache Tika 0.7
25   * @see <a href="http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf"
26   *        >XMP Specification, Part 2: Standard Schemas</a>
27   */
28  public interface XMPDM {
29  
30      /**
31       * "The absolute path to the file's peak audio file. If empty, no peak
32       * file exists."
33       */
34      Property ABS_PEAK_AUDIO_FILE_PATH =
35          Property.internalURI("xmpDM:absPeakAudioFilePath");
36  
37      /**
38       * "The name of the album."
39       */
40      Property ALBUM = Property.externalText("xmpDM:album");
41  
42      /**
43       * "An alternative tape name, set via the project window or timecode
44       * dialog in Premiere. If an alternative name has been set and has not
45       * been reverted, that name is displayed."
46       */
47      Property ALT_TAPE_NAME = Property.externalText("xmpDM:altTapeName");
48  
49  //    /**
50  //     * "A timecode set by the user. When specified, it is used instead
51  //     * of the startTimecode."
52  //     */
53  //    Property ALT_TIMECODE = "xmpDM:altTimecode";
54  
55      /**
56       * "The name of the artist or artists."
57       */
58      Property ARTIST = Property.externalText("xmpDM:artist");
59  
60      /**
61       * "The date and time when the audio was last modified."
62       */
63      Property AUDIO_MOD_DATE = Property.internalDate("xmpDM:audioModDate");
64  
65      /**
66       * "The audio sample rate. Can be any value, but commonly 32000, 41100,
67       * or 48000."
68       */
69      Property AUDIO_SAMPLE_RATE =
70          Property.internalInteger("xmpDM:audioSampleRate");
71  
72      /**
73       * "The audio sample type."
74       */
75      Property AUDIO_SAMPLE_TYPE = Property.internalClosedChoise(
76              "xmpDM:audioSampleType", "8Int", "16Int", "32Int", "32Float");
77  
78      /**
79       * "The audio channel type."
80       */
81      Property AUDIO_CHANNEL_TYPE = Property.internalClosedChoise(
82              "xmpDM:audioChannelType", "Mono", "Stereo", "5.1", "7.1");
83  
84      /**
85       * "The audio compression used. For example, MP3."
86       */
87      Property AUDIO_COMPRESSOR = Property.internalText("xmpDM:audioCompressor");
88  
89  //    /**
90  //     * "Additional parameters for Beat Splice stretch mode."
91  //     */
92  //    Property BEAT_SPLICE_PARAMS = "xmpDM:beatSpliceParams";
93  
94      /**
95       * "The composer's name."
96       */
97      Property COMPOSER = Property.externalText("xmpDM:composer");
98  
99  //    /**
100 //     * "An unordered list of all media used to create this media."
101 //     */
102 //    Property CONTRIBUTED_MEDIA = "xmpDM:contributedMedia";
103 
104     /**
105      * "The copyright information."
106      */
107     Property COPYRIGHT = Property.externalText("xmpDM:copyright");
108 
109 //    /**
110 //     * "The duration of the media file."
111 //     */
112 //    Property DURATION = "xmpDM:duration";
113 
114     /**
115      * "The engineer's name."
116      */
117     Property ENGINEER = Property.externalText("xmpDM:engineer");
118 
119     /**
120      * "The file data rate in megabytes per second. For example:
121      * '36/10' = 3.6 MB/sec"
122      */
123     Property FILE_DATA_RATE = Property.internalRational("xmpDM:fileDataRate");
124 
125     /**
126      * "The name of the genre."
127      */
128     Property GENRE = Property.externalText("xmpDM:genre");
129 
130     /**
131      * "The musical instrument."
132      */
133     Property INSTRUMENT = Property.externalText("xmpDM:instrument");
134 
135 //    /**
136 //     * "The duration of lead time for queuing music."
137 //     */
138 //    Property INTRO_TIME = "xmpDM:introTime";
139 
140     /**
141      * "The audio's musical key."
142      */
143     Property KEY = Property.internalClosedChoise(
144             "xmpDM:key", "C", "C#", "D", "D#", "E", "F", "F#",
145             "G", "G#", "A", "A#", "B");
146 
147     /**
148      * "User's log comments."
149      */
150     Property LOG_COMMENT = Property.externalText("xmpDM:logComment");
151 
152     /**
153      * "When true, the clip can be looped seamlessly."
154      */
155     Property LOOP = Property.internalBoolean("xmpDM:loop");
156 
157     /**
158      * "The number of beats."
159      */
160     Property NUMBER_OF_BEATS = Property.internalReal("xmpDM:numberOfBeats");
161 
162 //    /**
163 //     * An ordered list of markers. See also {@link #TRACKS xmpDM:Tracks}.
164 //     */
165 //    Property MARKERS = "xmpDM:markers";
166 
167     /**
168      * "The date and time when the metadata was last modified."
169      */
170     Property METADATA_MOD_DATE = Property.internalDate("xmpDM:metadataModDate");
171 
172 //    /**
173 //     * "The time at which to fade out."
174 //     */
175 //    Property OUT_CUE = "xmpDM:outCue";
176 
177 //    /**
178 //     * "A reference to the project that created this file."
179 //     */
180 //    Property PROJECT_REF = "xmpDM:projectRef"; 
181 
182     /**
183      * "The sampling phase of film to be converted to video (pull-down)."
184      */
185     Property PULL_DOWN = Property.internalClosedChoise(
186             "xmpDM:pullDown", "WSSWW", "SSWWW", "SWWWS", "WWWSS", "WWSSW",
187             "WSSWW_24p", "SSWWW_24p", "SWWWS_24p", "WWWSS_24p", "WWSSW_24p");
188 
189     /**
190      * "The relative path to the file's peak audio file. If empty, no peak
191      * file exists."
192      */
193     Property RELATIVE_PEAK_AUDIO_FILE_PATH =
194         Property.internalURI("xmpDM:relativePeakAudioFilePath");
195 
196 //    /**
197 //     * "The start time of the media inside the audio project."
198 //     */
199 //    Property RELATIVE_TIMESTAMP = "xmpDM:relativeTimestamp";
200 
201     /**
202      * "The date the title was released."
203      */
204     Property RELEASE_DATE = Property.externalDate("xmpDM:releaseDate");
205 
206 //    /**
207 //     * "Additional parameters for Resample stretch mode."
208 //     */
209 //    Property RESAMPLE_PARAMS = "xmpDM:resampleParams";
210 
211     /**
212      * "The musical scale used in the music. 'Neither' is most often used
213      * for instruments with no associated scale, such as drums."
214      */
215     Property SCALE_TYPE = Property.internalClosedChoise(
216             "xmpDM:scaleType", "Major", "Minor", "Both", "Neither");
217 
218     /**
219      * "The name of the scene."
220      */
221     Property SCENE = Property.externalText("xmpDM:scene");
222 
223     /**
224      * "The date and time when the video was shot."
225      */
226     Property SHOT_DATE = Property.externalDate("xmpDM:shotDate");
227 
228     /**
229      * "The name of the location where the video was shot. For example:
230      * 'Oktoberfest, Munich, Germany'. For more accurate  positioning,
231      * use the EXIF GPS values."
232      */
233     Property SHOT_LOCATION = Property.externalText("xmpDM:shotLocation");
234 
235     /**
236      * "The name of the shot or take."
237      */
238     Property SHOT_NAME = Property.externalText("xmpDM:shotName");
239 
240     /**
241      * "A description of the speaker angles from center front in degrees.
242      * For example: 'Left = -30, Right = 30, Center = 0, LFE = 45,
243      * Left Surround = -110, Right Surround = 110'"
244      */
245     Property SPEAKER_PLACEMENT =
246         Property.externalText("xmpDM:speakerPlacement");
247 
248 //    /**
249 //     * "The timecode of the first frame of video in the file, as obtained
250 //     * from the device control."
251 //     */
252 //    Property START_TIMECODE = "xmpDM:startTimecode";
253 
254     /**
255      * "The audio stretch mode."
256      */
257     Property STRETCH_MODE = Property.internalClosedChoise(
258             "xmpDM:stretchMode", "Fixed length", "Time-Scale", "Resample",
259             "Beat Splice", "Hybrid");
260 
261     /**
262      * "The name of the tape from which the clip was captured, as set during
263      * the capture process."
264      */
265     Property TAPE_NAME = Property.externalText("xmpDM:tapeName");
266 
267     /**
268      * "The audio's tempo."
269      */
270     Property TEMPO = Property.internalReal("xmpDM:tempo");
271 
272 //    /**
273 //     * "Additional parameters for Time-Scale stretch mode."
274 //     */
275 //    Property TIME_SCALE_PARAMS = "xmpDM:timeScaleParams";
276 
277     /**
278      * "The time signature of the music."
279      */
280     Property TIME_SIGNATURE = Property.internalClosedChoise(
281             "xmpDM:timeSignature", "2/4", "3/4", "4/4", "5/4", "7/4",
282             "6/8", "9/8", "12/8", "other");
283 
284     /**
285      * "A numeric value indicating the order of the audio file within its
286      * original recording."
287      */
288     Property TRACK_NUMBER = Property.externalInteger("xmpDM:trackNumber");
289 
290 //    /**
291 //     * "An unordered list of tracks. A track is a named set of markers,
292 //     * which can specify a frame rate for all markers in the set.
293 //     * See also {@link #MARKERS xmpDM:markers}."
294 //     */
295 //    Property TRACKS = "xmpDM:Tracks";
296 
297     /**
298      * "The alpha mode."
299      */
300     Property VIDEO_ALPHA_MODE = Property.externalClosedChoise(
301             "xmpDM:videoAlphaMode", "straight", "pre-multiplied");
302 
303 //    /**
304 //     * "A color in CMYK or RGB to be used as the pre-multiple color when
305 //     * alpha mode is pre-multiplied."
306 //     */
307 //    Property VIDEO_ALPHA_PREMULTIPLE_COLOR = "xmpDM:videoAlphaPremultipleColor";
308 
309     /**
310      * "When true, unity is clear, when false, it is opaque."
311      */
312     Property VIDEO_ALPHA_UNITY_IS_TRANSPARENT =
313         Property.internalBoolean("xmpDM:videoAlphaUnityIsTransparent");
314 
315     /**
316      * "The color space."
317      */
318     Property VIDEO_COLOR_SPACE = Property.internalClosedChoise(
319             "xmpDM:videoColorSpace", "sRGB", "CCIR-601", "CCIR-709");
320 
321     /**
322      * "Video compression used. For example, jpeg."
323      */
324     Property VIDEO_COMPRESSOR = Property.internalText("xmpDM:videoCompressor");
325 
326     /**
327      * "The field order for video."
328      */
329     Property VIDEO_FIELD_ORDER = Property.internalClosedChoise(
330             "xmpDM:videoFieldOrder", "Upper", "Lower", "Progressive");
331 
332     /**
333      * "The video frame rate."
334      */
335     Property VIDEO_FRAME_RATE = Property.internalOpenChoise(
336             "xmpDM:videoFrameRate", "24", "NTSC", "PAL");
337 
338 //    /**
339 //     * "The frame size. For example: w:720, h: 480, unit:pixels"
340 //     */
341 //    Property VIDEO_FRAME_SIZE = "xmpDM:videoFrameSize";
342 
343     /**
344      * "The date and time when the video was last modified."
345      */
346     Property VIDEO_MOD_DATE = Property.internalDate("xmpDM:videoModDate");
347 
348     /**
349      * "The size in bits of each color component of a pixel. Standard
350      *  Windows 32-bit pixels have 8 bits per component."
351      */
352     Property VIDEO_PIXEL_DEPTH = Property.internalClosedChoise(
353             "xmpDM:videoPixelDepth", "8Int", "16Int", "32Int", "32Float");
354 
355     /**
356      * "The aspect ratio, expressed as wd/ht. For example: '648/720' = 0.9"
357      */
358     Property VIDEO_PIXEL_ASPECT_RATIO =
359         Property.internalRational("xmpDM:videoPixelAspectRatio");
360 
361 }