Exemplo n.º 1
0
        /**
         * Tests deletion of properties, array items, struct fields and qualifer.
         * @param meta a predefined <code>XmpMeta</code> object.
         */
        private static void CoverDeleteProperties(IXmpMeta meta)
        {
            writeMajorLabel("Test deleteProperty");

            meta.DeleteProperty(TestData.NS1, "Prop");
            meta.DeleteArrayItem(TestData.NS1, "Bag", 2);
            meta.DeleteStructField(TestData.NS1, "Struct", TestData.NS2, "Field1");

            printXmpMeta(meta, "Delete Prop, Bag[2], and Struct1/Field1");

            meta.DeleteQualifier(TestData.NS1, "QualProp1", TestData.NS2, "Qual1");
            meta.DeleteQualifier(TestData.NS1, "QualProp2", XmpConstants.NsXml, "lang");
            meta.DeleteQualifier(TestData.NS1, "QualProp3", TestData.NS2, "Qual");
            meta.DeleteQualifier(TestData.NS1, "QualProp4", XmpConstants.NsXml, "lang");

            printXmpMeta(meta,
                         "Delete QualProp1/?ns2:Qual1, QualProp2/?xml:lang, " +
                         "QualProp3:/ns2:Qual, and QualProp4/?xml:lang");

            meta.DeleteProperty(TestData.NS1, "Bag");
            meta.DeleteProperty(TestData.NS1, "Struct");

            printXmpMeta(meta, "Delete all of Bag and Struct");
        }
Exemplo n.º 2
0
        /**
         * Tests deletion of properties, array items, struct fields and qualifer.
         * @param meta a predefined <code>XmpMeta</code> object.
         */
        private static void CoverDeleteProperties(IXmpMeta meta)
        {
            writeMajorLabel("Test deleteProperty");

            meta.DeleteProperty (TestData.NS1, "Prop");
            meta.DeleteArrayItem (TestData.NS1, "Bag", 2);
            meta.DeleteStructField (TestData.NS1, "Struct", TestData.NS2, "Field1");

            printXmpMeta (meta, "Delete Prop, Bag[2], and Struct1/Field1");

            meta.DeleteQualifier (TestData.NS1, "QualProp1", TestData.NS2, "Qual1");
            meta.DeleteQualifier (TestData.NS1, "QualProp2", XmpConstants.NsXml, "lang");
            meta.DeleteQualifier (TestData.NS1, "QualProp3", TestData.NS2, "Qual");
            meta.DeleteQualifier (TestData.NS1, "QualProp4", XmpConstants.NsXml, "lang");

            printXmpMeta(meta,
                "Delete QualProp1/?ns2:Qual1, QualProp2/?xml:lang, " +
                "QualProp3:/ns2:Qual, and QualProp4/?xml:lang");

            meta.DeleteProperty (TestData.NS1, "Bag");
            meta.DeleteProperty (TestData.NS1, "Struct");

            printXmpMeta (meta, "Delete all of Bag and Struct");
        }