| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation |
| */ |
| |
| import javax.xml.bind.annotation.XmlAccessType |
| import javax.xml.bind.annotation.XmlAccessorType |
| import javax.xml.bind.annotation.XmlAttribute |
| import javax.xml.bind.annotation.XmlElement |
| import javax.xml.bind.annotation.XmlElementWrapper |
| import javax.xml.bind.annotation.XmlRootElement |
| import ns org.eclipse.osbp.blob.datatypes.String |
| import ns org.eclipse.osbp.blob.datatypes.blobtype |
| import ns org.eclipse.osbp.blob.datatypes.int |
| |
| package org.eclipse.osbp.blob.entities { |
| |
| @XmlRootElement |
| @XmlAccessorType(XmlAccessType.FIELD) |
| bean BlobTyping { |
| @XmlElement |
| var MimeType mimeType |
| @XmlElement |
| ref Attributes attributes |
| @XmlElementWrapper(name = "normalizer") |
| @XmlElement(name = "resolution") |
| ref NormalizerResolution[*] normalizer |
| } |
| |
| |
| @XmlAccessorType(XmlAccessType.FIELD) |
| bean MimeType { |
| @XmlAttribute |
| var String mimeVersion |
| @XmlAttribute |
| var String contentTransferEncoding |
| @XmlElement(name = "contentType") |
| ref ContentType[*] contentTypeList |
| } |
| |
| @XmlAccessorType(XmlAccessType.FIELD) |
| bean ContentType { |
| @XmlAttribute |
| var int id |
| @XmlAttribute |
| var String type |
| } |
| |
| @XmlAccessorType(XmlAccessType.FIELD) |
| bean Attributes { |
| @XmlElement |
| var String size |
| @XmlElement |
| var String resolution |
| } |
| |
| @XmlAccessorType(XmlAccessType.FIELD) |
| bean NormalizerResolution { |
| @XmlAttribute |
| var int id |
| @XmlAttribute |
| var String name |
| @XmlAttribute |
| var String resolution |
| } |
| |
| entity BlobMapping { |
| persistenceUnit "blob" |
| uuid String id |
| var String uniqueName |
| var String fileName |
| var int mimeTypeId |
| ref cascade Blob[*] blobsRef opposite blobMapping |
| } |
| |
| entity Blob { |
| tableName BlobData |
| persistenceUnit "blob" |
| uuid String id |
| var blobtype data |
| var int resolutionId |
| ref BlobMapping blobMapping opposite blobsRef |
| } |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |