/// <summary>Merges the set options of a another options object with this.</summary> /// <remarks> /// Merges the set options of a another options object with this. /// If the other options set is null, this objects stays the same. /// </remarks> /// <param name="options">other options</param> /// <exception cref="Com.Adobe.Xmp.XMPException">If illegal options are provided</exception> public void MergeWith(Com.Adobe.Xmp.Options.PropertyOptions options) { if (options != null) { SetOptions(GetOptions() | options.GetOptions()); } }
/// <summary>Appends a qualifier to the qualifier list and sets respective options.</summary> /// <param name="qualNode">a qualifier node.</param> /// <exception cref="Com.Adobe.Xmp.XMPException"></exception> public virtual void AddQualifier(Com.Adobe.Xmp.Impl.XMPNode qualNode) { AssertQualifierNotExisting(qualNode.GetName()); qualNode.SetParent(this); qualNode.GetOptions().SetQualifier(true); GetOptions().SetHasQualifiers(true); // contraints if (qualNode.IsLanguageNode()) { // "xml:lang" is always first and the option "hasLanguage" is set options.SetHasLanguage(true); GetQualifier().Add(0, qualNode); } else { if (qualNode.IsTypeNode()) { // "rdf:type" must be first or second after "xml:lang" and the option "hasType" is set options.SetHasType(true); GetQualifier().Add(!options.GetHasLanguage() ? 0 : 1, qualNode); } else { // other qualifiers are appended GetQualifier().Add(qualNode); } } }