XMPMetadata extends Metadata { @Override public void set(String name, String value) { checkKey( name ); String[] keyParts = splitKey( name ); String ns = registry.getNamespaceURI( keyParts[0] ); if (ns != null) { try { xmpData.setProperty( ns, keyParts[1], value ); } catch (XMPException e) { } } } XMPMetadata();  XMPMetadata(Metadata meta);  XMPMetadata(Metadata meta, String mimetype); void process(Metadata meta); void process(Metadata meta, String mimetype); XMPMeta getXMPData(); static String registerNamespace(String namespaceURI, String suggestedPrefix); static String getNamespacePrefix(String namespaceURI); static String getNamespaceURI(String namespacePrefix); @SuppressWarnings("unchecked") static Map<String, String> getNamespaces(); @SuppressWarnings("unchecked") static Map<String, String> getPrefixes(); static void deleteNamespace(String namespaceURI); @Override boolean isMultiValued(Property property); @Override boolean isMultiValued(String name); @Override String[] names(); @Override String get(String name); @Override String get(Property property); @Override Integer getInt(Property property); @Override Date getDate(Property property); @Override String[] getValues(Property property); @Override String[] getValues(String name); @Override void add(String name, String value); @Override void set(String name, String value); @Override void set(Property property, String value); @Override void set(Property property, int value); @Override void set(Property property, double value); @Override void set(Property property, Date date); @Override void set(Property property, String[] values); @Override void setAll(Properties properties); void remove(Property property); @Override void remove(String name); @Override int size(); @Override boolean equals(Object o); @Override String toString();  }
@Test(expected = PropertyTypeException.class) public void set_nullInput_throw() { String notInitialized = null; xmpMeta.set( notInitialized, "value" ); }
@Test(expected = PropertyTypeException.class) public void set_notQualifiedKey_throw() { xmpMeta.set( "wrongKey", "value" ); }
@Test(expected = PropertyTypeException.class) public void set_unknownPrefixKey_throw() { xmpMeta.set( "unknown:key", "value" ); }
@Test(expected = PropertyTypeException.class) public void set_simplePropWithMultipleValues_throw() { xmpMeta.set( TikaCoreProperties.FORMAT, new String[] { "value1", "value2" } ); }