+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.diff;\r
-\r
-/**\r
- * <code>DiffMissing</code> using the XPath of the position as\r
- * <code>DiffKey</code>\r
- */\r
-public class DiffMissingXml extends DiffMissing {\r
-\r
- public DiffMissingXml(XPathDiffPosition position) {\r
- super(position, new DiffKeyXml(position.getXPath()));\r
- }\r
-\r
- /** Implementation of <code>DiffKey</code> based on an XPath string. */\r
- protected static class DiffKeyXml implements DiffKey {\r
- private final String xPath;\r
-\r
- public DiffKeyXml(String xPath) {\r
- this.xPath = xPath;\r
- }\r
-\r
- public String getXPath() {\r
- return xPath;\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- return xPath;\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (!(obj instanceof DiffKeyXml))\r
- return false;\r
- return xPath.equals(((DiffKeyXml) obj).xPath);\r
- }\r
-\r
- @Override\r
- public int hashCode() {\r
- return xPath.hashCode();\r
- }\r
-\r
- }\r
-}\r