1 19 20 package org.netbeans.modules.editor.options; 21 22 import java.io.IOException ; 23 import org.openide.cookies.InstanceCookie; 24 import org.openide.loaders.XMLDataObject; 25 26 31 public abstract class MIMEProcessor implements XMLDataObject.Processor, InstanceCookie { 32 33 34 protected XMLDataObject xmlDataObject; 35 36 38 public void attachTo(XMLDataObject xmlDataObject) { 39 this.xmlDataObject = xmlDataObject; 40 } 41 42 44 public String instanceName() { 45 return xmlDataObject.getName(); 46 } 47 48 50 public Class instanceClass() throws IOException , ClassNotFoundException { 51 return this.getClass(); 52 } 53 54 55 public XMLDataObject getXMLDataObject(){ 56 return xmlDataObject; 57 } 58 59 60 public abstract String getPublicID(); 61 62 63 public abstract String getSystemID(); 64 65 66 public abstract Class getAsociatedMIMEOptionFile(); 67 68 71 public abstract MIMEOptionFile createMIMEOptionFile(BaseOptions o, Object b); 72 73 74 public Object instanceCreate() throws IOException , ClassNotFoundException { 75 return this; 76 } 77 } 78 | Popular Tags |