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