001/* 002 * (C) Copyright 2007 Nuxeo SAS (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 * Nuxeo - initial API and implementation 016 * 017 * $Id: DocumentProperty.java 13220 2007-03-03 18:45:30Z bstefanescu $ 018 */ 019 020package org.nuxeo.ecm.platform.api.ws; 021 022import java.io.Serializable; 023 024/** 025 * Web service document property wrapper. 026 * 027 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 028 */ 029public class DocumentProperty implements Serializable { 030 031 private static final long serialVersionUID = -5495522067864308283L; 032 033 private String name; 034 035 private String value; 036 037 /** 038 * Empty ctor needed by tools like jaxb. 039 */ 040 public DocumentProperty() { 041 } 042 043 public DocumentProperty(String name, String value) { 044 this.name = name; 045 this.value = value; 046 } 047 048 /** 049 * Returns the field name. 050 * 051 * @return the field name 052 */ 053 public String getName() { 054 return name; 055 } 056 057 /** 058 * Returns the field value as a string. 059 * <p> 060 * Here, we will always return string for the moment. Request from the <i>Intuition</i> team. 061 * 062 * @return the field value as a string 063 */ 064 public String getValue() { 065 return value; 066 } 067 068 /** 069 * @param name the name to set. 070 */ 071 public void setName(String name) { 072 this.name = name; 073 } 074 075 /** 076 * @param value the value to set. 077 */ 078 public void setValue(String value) { 079 this.value = value; 080 } 081 082 @Override 083 public String toString() { 084 return name + ":" + value; 085 } 086}