001/* 002 * (C) Copyright 2014 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-2.1.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 * Vladimir Pasquier <vpasquier@nuxeo.com> 016 */ 017package org.nuxeo.binary.metadata.internals; 018 019import java.util.ArrayList; 020import java.util.List; 021 022import org.nuxeo.common.xmap.annotation.XNode; 023import org.nuxeo.common.xmap.annotation.XNodeList; 024import org.nuxeo.common.xmap.annotation.XObject; 025 026/** 027 * @since 7.1 028 */ 029@XObject("metadataMapping") 030public class MetadataMappingDescriptor { 031 032 @XNode("@id") 033 protected String id; 034 035 @XNode("@processor") 036 protected String processor; 037 038 @XNode("@blobXPath") 039 protected String blobXPath; 040 041 @XNode("@ignorePrefix") 042 protected Boolean ignorePrefix = true; 043 044 @XNodeList(value = "metadata", componentType = MetadataDescriptor.class, type = ArrayList.class) 045 protected List<MetadataDescriptor> metadataDescriptors; 046 047 public List<MetadataDescriptor> getMetadataDescriptors() { 048 return metadataDescriptors; 049 } 050 051 @XObject("metadata") 052 public static class MetadataDescriptor { 053 054 @XNode("@name") 055 protected String name; 056 057 @XNode("@xpath") 058 protected String xpath; 059 060 public String getXpath() { 061 return xpath; 062 } 063 064 public String getName() { 065 return name; 066 } 067 068 } 069 070 public String getId() { 071 return id; 072 } 073 074 public String getProcessor() { 075 return processor; 076 } 077 078 public String getBlobXPath() { 079 return blobXPath; 080 } 081 082 public Boolean getIgnorePrefix() { 083 return ignorePrefix; 084 } 085}