001/* 002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * ataillefer 018 */ 019package org.nuxeo.ecm.diff.model.impl; 020 021import java.io.Serializable; 022 023/** 024 * Property hierarchy node. 025 * 026 * @author <a href="mailto:[email protected]">Antoine Taillefer</a> 027 */ 028public class PropertyHierarchyNode implements Serializable { 029 030 private static final long serialVersionUID = -5497891597767526856L; 031 032 private String nodeType; 033 034 private String nodeValue; 035 036 /** 037 * Instantiates a new property hierarchy node. 038 * 039 * @param nodeType the node type 040 * @param nodeValue the node value 041 */ 042 public PropertyHierarchyNode(String nodeType, String nodeValue) { 043 this.nodeType = nodeType; 044 this.nodeValue = nodeValue; 045 } 046 047 public String getNodeType() { 048 return nodeType; 049 } 050 051 public void setNodeType(String nodeType) { 052 this.nodeType = nodeType; 053 } 054 055 public String getNodeValue() { 056 return nodeValue; 057 } 058 059 public void setNodeValue(String nodeValue) { 060 this.nodeValue = nodeValue; 061 } 062 063 @Override 064 public String toString() { 065 066 StringBuilder sb = new StringBuilder("{"); 067 sb.append(nodeType); 068 sb.append(","); 069 sb.append(nodeValue); 070 sb.append("}"); 071 return sb.toString(); 072 } 073}