001/*
002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     ataillefer
016 */
017package org.nuxeo.ecm.diff.model.impl;
018
019import java.io.Serializable;
020
021/**
022 * Property hierarchy node.
023 * 
024 * @author <a href="mailto:ataillefer@nuxeo.com">Antoine Taillefer</a>
025 */
026public class PropertyHierarchyNode implements Serializable {
027
028    private static final long serialVersionUID = -5497891597767526856L;
029
030    private String nodeType;
031
032    private String nodeValue;
033
034    /**
035     * Instantiates a new property hierarchy node.
036     * 
037     * @param nodeType the node type
038     * @param nodeValue the node value
039     */
040    public PropertyHierarchyNode(String nodeType, String nodeValue) {
041        this.nodeType = nodeType;
042        this.nodeValue = nodeValue;
043    }
044
045    public String getNodeType() {
046        return nodeType;
047    }
048
049    public void setNodeType(String nodeType) {
050        this.nodeType = nodeType;
051    }
052
053    public String getNodeValue() {
054        return nodeValue;
055    }
056
057    public void setNodeValue(String nodeValue) {
058        this.nodeValue = nodeValue;
059    }
060
061    @Override
062    public String toString() {
063
064        StringBuilder sb = new StringBuilder("{");
065        sb.append(nodeType);
066        sb.append(",");
067        sb.append(nodeValue);
068        sb.append("}");
069        return sb.toString();
070    }
071}