-package org.simantics.export.core.manager;\r
-\r
-import java.io.File;\r
-\r
-import org.simantics.databoard.util.URIUtil;\r
-\r
-public class Content {\r
-\r
- public String url;\r
- public String contentTypeId;\r
- public String formatId;\r
- public String formatExt; \r
- public String label;\r
- public String modelId;\r
-\r
- /**\r
- * Initially suggested and the later used filename.\r
- */\r
- public String filename;\r
- \r
- /**\r
- * This is an optional field that is filled one export action has been completed.\r
- * This value is used by the publisher.\r
- */\r
- public File tmpFile;\r
- \r
- public Content(String url, String contentTypeId, String formatId, String label, String formatExt, String modelId) {\r
- this.url = url;\r
- this.contentTypeId = contentTypeId;\r
- this.formatId = formatId;\r
- this.formatExt = formatExt;\r
- this.label = label;\r
- this.modelId = modelId;\r
- if ( label!=null && formatExt!=null ) {\r
- String filename = label+formatExt;\r
- filename = filename.replaceAll("/", "-");\r
- this.filename = URIUtil.encodeFilename( filename );\r
- }\r
- } \r
- \r
- @Override\r
- public String toString() {\r
- return "url="+url+",formatId="+formatId;\r
- }\r
- \r
- @Override\r
- public int hashCode() {\r
- return url.hashCode()+13*formatId.hashCode();\r
- }\r
- \r
- @Override\r
- public boolean equals(Object o) {\r
- Content other = (Content) o;\r
- if ( !other.formatId.equals(formatId) ) return false;\r
- if ( !other.url.equals(url) ) return false;\r
- return true;\r
- }\r
-\r
-}\r
+package org.simantics.export.core.manager;
+
+import java.io.File;
+
+import org.simantics.databoard.util.URIUtil;
+
+public class Content {
+
+ public String url;
+ public String contentTypeId;
+ public String formatId;
+ public String formatExt;
+ public String label;
+ public String modelId;
+
+ /**
+ * Initially suggested and the later used filename.
+ */
+ public String filename;
+
+ /**
+ * This is an optional field that is filled one export action has been completed.
+ * This value is used by the publisher.
+ */
+ public File tmpFile;
+
+ public Content(String url, String contentTypeId, String formatId, String label, String formatExt, String modelId) {
+ this.url = url;
+ this.contentTypeId = contentTypeId;
+ this.formatId = formatId;
+ this.formatExt = formatExt;
+ this.label = label;
+ this.modelId = modelId;
+ if ( label!=null && formatExt!=null ) {
+ String filename = label+formatExt;
+ filename = filename.replaceAll("/", "-");
+ this.filename = URIUtil.encodeFilename( filename );
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "url="+url+",formatId="+formatId;
+ }
+
+ @Override
+ public int hashCode() {
+ return url.hashCode()+13*formatId.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ Content other = (Content) o;
+ if ( !other.formatId.equals(formatId) ) return false;
+ if ( !other.url.equals(url) ) return false;
+ return true;
+ }
+
+}