/* * JBoss, Home of Professional Open Source. * * See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing. * * See the AUTHORS.txt file distributed with this work for a full listing of individual contributors. */ package org.teiid.designer.metamodels.xml.compare; import org.eclipse.emf.ecore.EObject; import org.teiid.designer.core.compare.AbstractEObjectNameMatcher; import org.teiid.designer.metamodels.xml.XmlDocument; /** * @since 8.0 */ public class XmlDocumentNameToNameMatcher extends AbstractEObjectNameMatcher { /** * * @since 4.2 */ public XmlDocumentNameToNameMatcher() { super(); } /** * @see org.teiid.designer.core.compare.AbstractEObjectNameMatcher#getInputKey(org.eclipse.emf.ecore.EObject) * @since 4.2 */ @Override protected String getInputKey(EObject entity) { if((entity instanceof XmlDocument)) { final XmlDocument doc = (XmlDocument)entity; return doc.getName(); } return null; } /** * @see org.teiid.designer.core.compare.AbstractEObjectNameMatcher#getOutputKey(org.eclipse.emf.ecore.EObject) * @since 4.2 */ @Override protected String getOutputKey(EObject entity) { if((entity instanceof XmlDocument)) { final XmlDocument doc = (XmlDocument)entity; return doc.getName(); } return null; } }