001/* 002 * (C) Copyright 2017 Nuxeo (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 * Funsho David 018 * 019 */ 020 021package org.nuxeo.ecm.directory; 022 023import org.nuxeo.common.xmap.annotation.XNode; 024import org.nuxeo.common.xmap.annotation.XObject; 025 026 027/** 028 * @since 9.2 029 */ 030@XObject("reference") 031public class ReferenceDescriptor implements Cloneable { 032 033 @XNode("@name") 034 protected String referenceName; 035 036 @XNode("@field") 037 protected String fieldName; 038 039 @XNode("@directory") 040 protected String directory; 041 042 @XNode("@source") 043 protected String source; 044 045 @XNode("@target") 046 protected String target; 047 048 @XNode("@dataFile") 049 protected String dataFileName; 050 051 public String getFieldName() { 052 return fieldName; 053 } 054 055 public void setFieldName(String fieldName) { 056 this.fieldName = fieldName; 057 } 058 059 public String getDirectory() { 060 return directory; 061 } 062 063 public void setDirectory(String directory) { 064 this.directory = directory; 065 } 066 067 public String getReferenceName() { 068 return referenceName; 069 } 070 071 public void setReferenceName(String referenceName) { 072 this.referenceName = referenceName; 073 } 074 075 public String getSource() { 076 return source; 077 } 078 079 public void setSource(String source) { 080 this.source = source; 081 } 082 083 public String getTarget() { 084 return target; 085 } 086 087 public void setTarget(String target) { 088 this.target = target; 089 } 090 091 public String getDataFileName() { 092 return dataFileName; 093 } 094 095 public void setDataFileName(String dataFileName) { 096 this.dataFileName = dataFileName; 097 } 098 099 @Override 100 public ReferenceDescriptor clone() { 101 try { 102 return (ReferenceDescriptor) super.clone(); 103 } catch (CloneNotSupportedException e) { 104 throw new AssertionError(e); 105 } 106 } 107 108}