~hjd/ubuntu/wily/xmlgraphics-commons/debian-merged

« back to all changes in this revision

Viewing changes to src/java/org/apache/xmlgraphics/xmp/XMPStructure.java

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Fourmond
  • Date: 2011-02-11 14:15:14 UTC
  • mfrom: (8.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110211141514-h67achft6x31gju1
Tags: 1.4.dfsg-3
Uploading to unstable, hoping we won't break too many things ;-)...

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 * limitations under the License.
16
16
 */
17
17
 
18
 
/* $Id: XMPStructure.java 606564 2007-12-23 15:42:28Z jeremias $ */
 
18
/* $Id: XMPStructure.java 888794 2009-12-09 13:21:04Z jeremias $ */
19
19
 
20
20
package org.apache.xmlgraphics.xmp;
21
21
 
34
34
public class XMPStructure extends XMPComplexValue implements PropertyAccess {
35
35
 
36
36
    private Map properties = new java.util.HashMap();
37
 
    
 
37
 
38
38
    /**
39
39
     * Main constructor
40
40
     */
41
41
    public XMPStructure() {
42
42
    }
43
 
    
 
43
 
44
44
    /** {@inheritDoc} */
45
45
    public Object getSimpleValue() {
46
46
        return null;
50
50
    public void setProperty(XMPProperty prop) {
51
51
        properties.put(prop.getName(), prop);
52
52
    }
53
 
    
 
53
 
54
54
    /** {@inheritDoc} */
55
55
    public XMPProperty getProperty(String uri, String localName) {
56
56
        return getProperty(new QName(uri, localName));
57
57
    }
58
 
    
 
58
 
59
59
    /** {@inheritDoc} */
60
60
    public XMPProperty getValueProperty() {
61
61
        return getProperty(XMPConstants.RDF_VALUE);
62
62
    }
63
 
    
 
63
 
64
64
    /** {@inheritDoc} */
65
65
    public XMPProperty getProperty(QName name) {
66
66
        XMPProperty prop = (XMPProperty)properties.get(name);
67
67
        return prop;
68
68
    }
69
 
    
 
69
 
 
70
    /** {@inheritDoc} */
 
71
    public XMPProperty removeProperty(QName name) {
 
72
        return (XMPProperty)properties.remove(name);
 
73
    }
 
74
 
70
75
    /** {@inheritDoc} */
71
76
    public int getPropertyCount() {
72
77
        return this.properties.size();
73
78
    }
74
 
    
 
79
 
75
80
    /** {@inheritDoc} */
76
81
    public Iterator iterator() {
77
82
        return this.properties.keySet().iterator();
82
87
        AttributesImpl atts = new AttributesImpl();
83
88
        atts.clear();
84
89
        handler.startElement(XMPConstants.RDF_NAMESPACE, "RDF", "rdf:Description", atts);
85
 
        
 
90
 
86
91
        Iterator props = properties.values().iterator();
87
92
        while (props.hasNext()) {
88
93
            XMPProperty prop = (XMPProperty)props.next();
98
103
        return "XMP structure: " + getPropertyCount();
99
104
    }
100
105
 
101
 
    
 
106
 
102
107
}