1 package org.simantics.export.core.manager;
5 import org.simantics.databoard.util.URIUtil;
10 public String contentTypeId;
11 public String formatId;
12 public String formatExt;
14 public String modelId;
17 * Initially suggested and the later used filename.
19 public String filename;
22 * This is an optional field that is filled one export action has been completed.
23 * This value is used by the publisher.
27 public Content(String url, String contentTypeId, String formatId, String label, String formatExt, String modelId) {
29 this.contentTypeId = contentTypeId;
30 this.formatId = formatId;
31 this.formatExt = formatExt;
33 this.modelId = modelId;
34 if ( label!=null && formatExt!=null ) {
35 String filename = label+formatExt;
36 filename = filename.replaceAll("/", "-");
37 this.filename = URIUtil.encodeFilename( filename );
42 public String toString() {
43 return "url="+url+",formatId="+formatId;
47 public int hashCode() {
48 return url.hashCode()+13*formatId.hashCode();
52 public boolean equals(Object o) {
53 Content other = (Content) o;
54 if ( !other.formatId.equals(formatId) ) return false;
55 if ( !other.url.equals(url) ) return false;