Skip to content

Commit

Permalink
updated schema version to 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lausdahl committed Sep 11, 2017
1 parent 23921c7 commit e60b738
Show file tree
Hide file tree
Showing 4 changed files with 467 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public class IntoTraceProtocol
final static Logger logger = LoggerFactory.getLogger(IntoTraceProtocol.class);
public final static String rdf_about = "rdf:about";
public final static String SOFTWARETOOL = "softwareTool";
public final static String ACTIVITY_MODELLING = "modelling";
public final static String ACTIVITY_MODELLING = "modelModification";
public static final String ACTIVITY_MODEL_DESCRIPTION_IMPORT = "modelDescriptionImport";
public static final String ACTIVITY_FMU_EXPORT = "fmu_export";
public static final String ACTIVITY_FMU_EXPORT = "fmuExport";

public static class ITMessage
{
Expand Down Expand Up @@ -181,7 +181,7 @@ public static JSONObject makeRootMessage(ITMessage msg) throws JSONException
body.put("xmlns:rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
body.put("xmlns:prov", "http://www.w3.org/ns/prov#");
//body.put("xmlns:intocps", "http://www.w3.org/ns/intocps#");
body.put("messageFormatVersion", "1.3.2");
body.put("messageFormatVersion", "1.4");

for (Map.Entry<Prov, List<JSONObject>> entry : msg.data.entrySet())
{
Expand Down Expand Up @@ -304,11 +304,11 @@ public static String getId(Prov type, String... args)
if (args.length == 2)
{
// Entity.<entity type>:<git relative path>#<githash of the document>
return String.format("Entity.%s:%s#%s", "source", args[0], args[1]);
return String.format("Entity.%s:%s#%s", "file", args[0], args[1]);
} else if (args.length == 3)
{
// Entity.<entity type>:<git relative path>:<subpart name>#<githash of the document>
return String.format("Entity.%s:%s:%s#%s", "source", args[0], args[1], args[2]);
return String.format("Entity.%s:%s:%s#%s", "file", args[0], args[1], args[2]);
}
case Agent:
// Agent:<unique username>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ File runTraceTest(String name)
getRepoPath(name) ,"-store",resultPath.getAbsolutePath()});

Assert.assertTrue("Result file missing",resultPath.exists());
File schema = new File("src/test/resources/v1.3.2.json".replace("/", File.separator));
File schema = new File("src/test/resources/v1.4.json".replace("/", File.separator));
Assert.assertTrue("JSON Schema errors", ValidationUtils.isJsonValid(schema,resultPath));
return resultPath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void test() throws InterruptedException, ParserConfigurationException,
Paths.get("../../").toAbsolutePath().normalize().toString() ,"-store",resultPath.getAbsolutePath()});

Assert.assertTrue("Result file missing",resultPath.exists());
File schema = new File("src/test/resources/v1.3.2.json".replace("/", File.separator));
File schema = new File("src/test/resources/v1.4.json".replace("/", File.separator));
Assert.assertTrue("JSON Schema errors", ValidationUtils.isJsonValid(schema,resultPath));
}
}
Loading

0 comments on commit e60b738

Please sign in to comment.