/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.hibernate.eclipse.mapper.modelhandler; import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector; import org.eclipse.wst.sse.core.internal.document.IDocumentLoader; import org.eclipse.wst.sse.core.internal.ltk.modelhandler.AbstractModelHandler; import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler; import org.eclipse.wst.sse.core.internal.provisional.IModelLoader; import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector; import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader; import org.eclipse.wst.xml.core.internal.modelhandler.XMLModelLoader; /** * Provides hbm.xml model handling. */ public class ModelHandlerForHBMXML extends AbstractModelHandler implements IModelHandler { public final static String CONTENTTYPE_ID = "org.hibernate.eclipse.mapper.hbmxmlsource"; //$NON-NLS-1$ public final static String MODELHANDLER_ID = "org.hibernate.eclipse.mapper.handler.hbm.xml"; //$NON-NLS-1$ public ModelHandlerForHBMXML() { super(); setId(MODELHANDLER_ID); setAssociatedContentTypeId(CONTENTTYPE_ID); } public IDocumentCharsetDetector getEncodingDetector() { return new XMLDocumentCharsetDetector(); } public IDocumentLoader getDocumentLoader() { return new XMLDocumentLoader(); } public IModelLoader getModelLoader() { return new XMLModelLoader(); } }