01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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:
18: /* $Id: XMPBasicAdapter.java 426584 2006-07-28 16:01:47Z jeremias $ */
19:
20: package org.apache.xmlgraphics.xmp.schemas;
21:
22: import java.util.Date;
23:
24: import org.apache.xmlgraphics.xmp.Metadata;
25: import org.apache.xmlgraphics.xmp.XMPSchemaAdapter;
26: import org.apache.xmlgraphics.xmp.XMPSchemaRegistry;
27:
28: /**
29: * Schema adapter implementation for the XMP Basic schema.
30: */
31: public class XMPBasicAdapter extends XMPSchemaAdapter {
32:
33: /**
34: * Constructs a new adapter for XMP Basic around the given metadata object.
35: * @param meta the underlying metadata
36: */
37: public XMPBasicAdapter(Metadata meta, String namespace) {
38: super (meta, XMPSchemaRegistry.getInstance()
39: .getSchema(namespace));
40: }
41:
42: /**
43: * Sets the first known tool used to create the resource.
44: * @param value the creator tool
45: */
46: public void setCreatorTool(String value) {
47: setValue("CreatorTool", value);
48: }
49:
50: /** @return the first known tool used to create the resource */
51: public String getCreatorTool() {
52: return getValue("CreatorTool");
53: }
54:
55: /**
56: * Sets the date and time the resource was originally created.
57: * @param creationDate the creation date
58: */
59: public void setCreateDate(Date creationDate) {
60: setDateValue("CreateDate", creationDate);
61: }
62:
63: /** @return the date and time the resource was originally created */
64: public Date getCreateDate() {
65: return getDateValue("CreateDate");
66: }
67:
68: /**
69: * Sets the date and time the resource was last modified.
70: * @param modifyDate the modification date
71: */
72: public void setModifyDate(Date modifyDate) {
73: setDateValue("ModifyDate", modifyDate);
74: }
75:
76: /** @return the date and time the resource was last modified */
77: public Date getModifyDate() {
78: return getDateValue("ModifyDate");
79: }
80:
81: /**
82: * Sets the date and time any metadata for this resource was last changed.
83: * @param metadataDate the modification date for the metadata
84: */
85: public void setMetadataDate(Date metadataDate) {
86: setDateValue("MetadataDate", metadataDate);
87: }
88:
89: /** @return the date and time the resource was originally created */
90: public Date getMetadataDate() {
91: return getDateValue("MetadataDate");
92: }
93:
94: }
|