1 19 package org.netbeans.modules.xml.schema; 20 21 22 import org.openide.filesystems.*; 23 import org.openide.loaders.*; 24 25 import org.netbeans.modules.xml.core.XMLDataLoader; 26 27 32 public class SchemaLoader extends UniFileLoader { 33 34 private static final long serialVersionUID = 54841328367L; 35 36 static final String MIME_TYPE = "application/x-schema+xml"; 38 39 public SchemaLoader() { 40 super("org.netbeans.modules.xml.schema.SchemaObject"); } 42 43 45 protected void initialize () { 46 super.initialize(); 47 48 ExtensionList ext = getExtensions(); 49 ext.addMimeType (MIME_TYPE); 50 setExtensions (ext); 51 } 52 53 protected String actionsContext() { 54 return "Loaders/text/x-schema+xml/Actions/"; 55 } 56 57 60 protected String defaultDisplayName () { 61 return Util.THIS.getString ("SchemaLoader_name"); 62 } 63 64 69 protected MultiDataObject.Entry createPrimaryEntry (MultiDataObject obj, FileObject primaryFile) { 70 return new XMLDataLoader.XMLFileEntry (obj, primaryFile); } 72 73 81 protected MultiDataObject createMultiObject (FileObject primaryFile) 82 throws DataObjectExistsException, java.io.IOException { 83 return new SchemaObject (primaryFile, this); 84 } 85 86 } 87 | Popular Tags |