aliasForm.toPropertyOptions(), null).getOptions()) :
new AliasOptions();
if (p.matcher(aliasProp).find() || p.matcher(actualProp).find())
{
throw new XMPException("Alias and actual property names must be simple",
XMPError.BADXPATH);
}
// check if both namespaces are registered
final String aliasPrefix = getNamespacePrefix(aliasNS);
final String actualPrefix = getNamespacePrefix(actualNS);
if (aliasPrefix == null)
{
throw new XMPException("Alias namespace is not registered", XMPError.BADSCHEMA);
}
else if (actualPrefix == null)
{
throw new XMPException("Actual namespace is not registered",
XMPError.BADSCHEMA);
}
String key = aliasPrefix + aliasProp;
// check if alias is already existing
if (aliasMap.containsKey(key))
{
throw new XMPException("Alias is already existing", XMPError.BADPARAM);
}
else if (aliasMap.containsKey(actualPrefix + actualProp))
{
throw new XMPException(
"Actual property is already an alias, use the base property",
XMPError.BADPARAM);
}
XMPAliasInfo aliasInfo = new XMPAliasInfo()