001/* 002 * (C) Copyright 2006-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 * <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 016 * 017 * $Id: FieldDefinition.java 26053 2007-10-16 01:45:43Z atchertchian $ 018 */ 019 020package org.nuxeo.ecm.platform.forms.layout.api; 021 022import java.io.Serializable; 023 024/** 025 * Interface for field definition. 026 * <p> 027 * Will help to identify a document field. 028 * 029 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 030 */ 031public interface FieldDefinition extends Serializable { 032 033 /** 034 * Optional schema name. 035 * <p> 036 * If the field is used to identify a sub field within a complex type, no schema name is needed. Otherwise, the 037 * field will not be resolved correctly if the property does not have a prefix. 038 */ 039 String getSchemaName(); 040 041 /** 042 * Returns the field name, following XPath conventions. 043 * <p> 044 * If the field is prefixed, it should contain the prefix followed by ':'. Examples: dc:title, dc:author/name 045 */ 046 String getFieldName(); 047 048 /** 049 * Returns the computed property name with schema and field information. 050 */ 051 String getPropertyName(); 052 053 /** 054 * Returns a clone instance of this field definition. 055 * <p> 056 * Useful for conversion of layout definition during export. 057 * 058 * @since 5.5 059 */ 060 FieldDefinition clone(); 061 062}