KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > eclipse > mapper > modelhandler > ModelHandlerForCFGXML


1 package org.hibernate.eclipse.mapper.modelhandler;
2
3 import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
4 import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
5 import org.eclipse.wst.sse.core.internal.ltk.modelhandler.AbstractModelHandler;
6 import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler;
7 import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
8 import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector;
9 import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader;
10 import org.eclipse.wst.xml.core.internal.modelhandler.XMLModelLoader;
11
12
13
14
15 /**
16  * Provides hbm.xml model handling.
17  */

18 public class ModelHandlerForCFGXML extends AbstractModelHandler implements IModelHandler {
19     /**
20      * Needs to match what's in plugin registry. In fact, can be overwritten
21      * at run time with what's in registry! (so should never be 'final')
22      */

23     static String JavaDoc AssociatedContentTypeID = "org.hibernate.eclipse.mapper.content-type.cfg.xml"; //$NON-NLS-1$
24
/**
25      * Needs to match what's in plugin registry. In fact, can be overwritten
26      * at run time with what's in registry! (so should never be 'final')
27      */

28     private static String JavaDoc ModelHandlerID = "org.hibernate.eclipse.mapper.handler.cfg.xml"; //$NON-NLS-1$
29

30     public ModelHandlerForCFGXML() {
31         super();
32         setId(ModelHandlerID);
33         setAssociatedContentTypeId(AssociatedContentTypeID);
34     }
35
36     public IDocumentCharsetDetector getEncodingDetector() {
37         return new XMLDocumentCharsetDetector();
38     }
39
40     public IDocumentLoader getDocumentLoader() {
41         return new XMLDocumentLoader();
42     }
43
44     public IModelLoader getModelLoader() {
45         return new XMLModelLoader();
46     }
47
48 }
49
Popular Tags