diff options
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/org/eclipse/mdm/api/base/model/FileLink.java | 30 | ||||
-rw-r--r-- | src/main/java/org/eclipse/mdm/api/base/model/Measurement.java | 28 |
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 |