⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mapprepostsethandler.java

📁 目前在JAVA下编程时对XML的操作很重要
💻 JAVA
字号:
package com.extension;
import com.weather.LocalWeatherDocumentXmlBean.LocalWeather;
import org.apache.xmlbeans.*;
import javax.xml.namespace.QName;

public class MapPrePostSetHandler {


        /**
         * Returns false, if Client application tries to modify map represented by contents of image element.
         */
        public static boolean preSet(int operationType, XmlObject xo, QName propertyName, boolean isAttr, int indexOfItem) {

			javax.xml.namespace.QName imageQName = new javax.xml.namespace.QName("http://www.helloWeather.com/weather","image");

// If xmlbeans object is an instance of com.weather.LocalWeatherDocumentXmlBean.LocalWeather, and
// property to be modified is image element belonging to "http://www.helloWeather.com/weather" namespace,
// then return false, else return true.

			if( (xo instanceof LocalWeather) && ( propertyName.equals(imageQName) ) )
			{
				return false;
			}

				return true;
		}

        /**
         * Empty
         */
        public static void postSet(int operationType, XmlObject xo, QName propertyName, boolean isAttr, int indexOfItem) {


		}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -