Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Koller2019-02-20 13:59:58 +0000
committerMatthias Koller2019-02-20 13:59:58 +0000
commitc2b0e02a50bf0d7e35e7db34232568b3f8651a3c (patch)
treec52868b3a772b5700e8ab1418b578302a7ec2544
parentc37da6b15b9f30ead609f18d5fe303a7e0ecac0e (diff)
parentf72c19775534e23f95613daa74973577e4b1c7bb (diff)
downloadorg.eclipse.mdm.api.base-c2b0e02a50bf0d7e35e7db34232568b3f8651a3c.tar.gz
org.eclipse.mdm.api.base-c2b0e02a50bf0d7e35e7db34232568b3f8651a3c.tar.xz
org.eclipse.mdm.api.base-c2b0e02a50bf0d7e35e7db34232568b3f8651a3c.zip
Merge remote-tracking branch 'dev' into mkoller/atfxadapter
Conflicts: build.gradle Signed-off-by: Matthias Koller <m.koller@peak-solution.de>
-rw-r--r--build.gradle2
-rw-r--r--src/main/java/org/eclipse/mdm/api/base/model/FileLink.java30
-rw-r--r--src/main/java/org/eclipse/mdm/api/base/model/Measurement.java28
3 files changed, 31 insertions, 29 deletions
diff --git a/build.gradle b/build.gradle
index 8b27484..768c495 100644
--- a/build.gradle
+++ b/build.gradle
@@ -15,7 +15,7 @@
description = 'MDM API - Base Model'
group = 'org.eclipse.mdm'
-version = '5.0.0M5-ATFX-SNAPSHOT'
+version = '5.1.0M2-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'maven'
diff --git a/src/main/java/org/eclipse/mdm/api/base/model/FileLink.java b/src/main/java/org/eclipse/mdm/api/base/model/FileLink.java
index 74333b9..e942d48 100644
--- a/src/main/java/org/eclipse/mdm/api/base/model/FileLink.java
+++ b/src/main/java/org/eclipse/mdm/api/base/model/FileLink.java
@@ -1,16 +1,16 @@
-/********************************************************************************
- * Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- ********************************************************************************/
+/********************************************************************************
+ * Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ ********************************************************************************/
package org.eclipse.mdm.api.base.model;
@@ -156,7 +156,9 @@ public final class FileLink {
fileNamePath = getLocalPath().getFileName();
} else if (isRemote()) {
try {
- fileNamePath = Paths.get(URLDecoder.decode(remotePath, StandardCharsets.UTF_8.name())).getFileName();
+ //on Windows, Paths.get() cannot handle file urls in the form file://REMOTE_HOST/path/filename
+ String fixedPath = remotePath.replaceFirst("file:", "");
+ fileNamePath = Paths.get(URLDecoder.decode(fixedPath, StandardCharsets.UTF_8.name())).getFileName();
} catch (UnsupportedEncodingException e) {
throw new IllegalStateException("Unable to decode remote path due to: " + e.getMessage(), e);
}
diff --git a/src/main/java/org/eclipse/mdm/api/base/model/Measurement.java b/src/main/java/org/eclipse/mdm/api/base/model/Measurement.java
index ea67d0e..e3e30d7 100644
--- a/src/main/java/org/eclipse/mdm/api/base/model/Measurement.java
+++ b/src/main/java/org/eclipse/mdm/api/base/model/Measurement.java
@@ -1,16 +1,16 @@
-/********************************************************************************
- * Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- ********************************************************************************/
+/********************************************************************************
+ * Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ ********************************************************************************/
package org.eclipse.mdm.api.base.model;
@@ -49,7 +49,7 @@ import org.eclipse.mdm.api.base.query.DataAccessException;
* @see ParameterSet
*/
public class Measurement extends BaseEntity
- implements ContextDescribable, Datable, Deletable, Describable, FilesAttachable, Tagable {
+ implements ContextDescribable, Datable, Deletable, Describable, FilesAttachable, Tagable, StatusAttachable {
// ======================================================================
// Class variables

Back to the top