Revision 20637 trunk/extensions/extJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java

View differences:

RecentTrsPersistence.java
73 73
	private static final String TR_DATE = "date";
74 74
	
75 75
	
76
	public static Object pluginClassInstance = null;
77
	
78 76
	/**
79 77
	 * Constructor
80
	 * @param pluginClassInstance
81 78
	 */
82
	public RecentTrsPersistence(Object pluginClassInstance){
83
		ps = PluginServices.getPluginServices(pluginClassInstance);
84
		xml = ps.getPersistentXML();
85
		for (int child = 0; child<xml.getChildrenCount();child++)
86
			if (xml.getChild(child).getPropertyValue(0).equals(TR_RECENTS))
87
				recentsXml = xml.getChild(child); 
88
		if (recentsXml == null){
89
			XMLEntity xmlEntity = new XMLEntity();
90
			xmlEntity.putProperty("groupName", TR_RECENTS);
91
			xml.addChild(xmlEntity);
92
			recentsXml = xmlEntity;
93
		}
94
	}
95
	
96
	/**
97
	 * Constructor
98
	 */
99 79
	public RecentTrsPersistence(){
100
		ps = PluginServices.getPluginServices(pluginClassInstance);
80
		ps = PluginServices.getPluginServices("org.gvsig.crs");
101 81
		xml = ps.getPersistentXML();
102 82
		for (int child = 0; child<xml.getChildrenCount();child++)
103 83
			if (xml.getChild(child).getPropertyValue(0).equals(TR_RECENTS))

Also available in: Unified diff