/** Initialise this resource, and return it. */ public Resource init() throws ResourceInstantiationException { // Register plain text mime type MimeType mime = new MimeType("text", "plain"); // Register the class handler for this mime type mimeString2ClassHandlerMap.put(mime.getType() + "/" + mime.getSubtype(), this); // Register the mime type with mine string mimeString2mimeTypeMap.put(mime.getType() + "/" + mime.getSubtype(), mime); // Register file sufixes for this mime type suffixes2mimeTypeMap.put("txt", mime); suffixes2mimeTypeMap.put("text", mime); // Set the mimeType for this language resource setMimeType(mime); return this; } // init()