1 31 package org.objectweb.proactive.core.component.xml; 32 33 import org.objectweb.proactive.core.xml.handler.CollectionUnmarshaller; 34 import org.objectweb.proactive.core.xml.handler.UnmarshallerHandler; 35 import org.objectweb.proactive.core.xml.io.Attributes; 36 37 import org.xml.sax.SAXException ; 38 39 import java.util.HashMap ; 40 41 42 45 public class TypesHandler extends CollectionUnmarshaller { 46 HashMap componentTypes; 47 48 public TypesHandler(HashMap componentTypes) { 49 this.componentTypes = componentTypes; 50 addHandler(ComponentsDescriptorConstants.COMPONENT_TYPE_TAG, 51 new ComponentTypeHandler()); 52 } 53 54 57 protected void notifyEndActiveHandler(String name, 58 UnmarshallerHandler activeHandler) throws SAXException { 59 if (name.equals(ComponentsDescriptorConstants.COMPONENT_TYPE_TAG)) { 60 Object [] component_type_info = (Object []) getHandler(ComponentsDescriptorConstants.COMPONENT_TYPE_TAG) 62 .getResultObject(); 63 componentTypes.put(component_type_info[0], component_type_info[1]); 64 ((ComponentTypeHandler) activeHandler).reset(); 65 } 66 } 67 68 71 public Object getResultObject() throws SAXException { 72 return null; 73 } 74 75 78 public void startContextElement(String name, Attributes attributes) 79 throws SAXException { 80 } 81 } 82 | Popular Tags |