@Test public void getCheckedModel() throws IOException { byte[] benchmarkCfgBytes = api.getRawFileContent(gitlabProject.getId(), gitlabBranch.getCommit().getId(), "benchmark.ttl"); Model checkedModel = controller.getCheckedModel(benchmarkCfgBytes, "benchmark", gitlabProject.getWebUrl()); Resource resource = new ResourceImpl("http: Property property = new PropertyImpl("http: assert checkedModel.contains(resource, property) : "Benchmark model should contain " + resource + " " + property; }
@Override public Model getCheckedModel(byte modelData[], String modelType, String projectName) { try { Model model = ModelFactory.createDefaultModel(); model.read(new ByteArrayInputStream(modelData), null, "TTL"); return model; } catch (Exception e) { String parsingError = "Couldn't parse " + modelType + " model from " + projectName + ". It won't be available. " + e.getMessage(); handleErrorMsg(parsingError, e, true); } return null; }
GitlabControllerImpl implements GitlabController { @Override public Model getCheckedModel(byte modelData[], String modelType, String projectName) { try { Model model = ModelFactory.createDefaultModel(); model.read(new ByteArrayInputStream(modelData), null, "TTL"); return model; } catch (Exception e) { String parsingError = "Couldn't parse " + modelType + " model from " + projectName + ". It won't be available. " + e.getMessage(); handleErrorMsg(parsingError, e, true); } return null; } }
GitlabControllerImpl implements GitlabController { @Override public Model getCheckedModel(byte modelData[], String modelType, String projectName) { try { Model model = ModelFactory.createDefaultModel(); model.read(new ByteArrayInputStream(modelData), null, "TTL"); return model; } catch (Exception e) { String parsingError = "Couldn't parse " + modelType + " model from " + projectName + ". It won't be available. " + e.getMessage(); handleErrorMsg(parsingError, e, true); } return null; } GitlabControllerImpl();  GitlabControllerImpl(boolean startFetchingProjects, boolean useCache);  GitlabControllerImpl(String token, boolean startFetchingProjects, boolean useCache); }
GitlabControllerImpl implements GitlabController { @Override public Model getCheckedModel(byte modelData[], String modelType, String projectName) { try { Model model = ModelFactory.createDefaultModel(); model.read(new ByteArrayInputStream(modelData), null, "TTL"); return model; } catch (Exception e) { String parsingError = "Couldn't parse " + modelType + " model from " + projectName + ". It won't be available. " + e.getMessage(); handleErrorMsg(parsingError, e, true); } return null; } GitlabControllerImpl();  GitlabControllerImpl(boolean startFetchingProjects, boolean useCache);  GitlabControllerImpl(String token, boolean startFetchingProjects, boolean useCache); void runAfterFirstFetch(Runnable r); void startFetchingProjects(); @Override void stopFetchingProjects(); @Override List<Project> getAllProjects(); @Override Project gitlabToProject(GitlabProject project); static void main(String[] args); @Override Model getCheckedModel(byte modelData[], String modelType, String projectName); List<Project> getProjectsVisibleForUser(String mail); }
GitlabControllerImpl implements GitlabController { @Override public Model getCheckedModel(byte modelData[], String modelType, String projectName) { try { Model model = ModelFactory.createDefaultModel(); model.read(new ByteArrayInputStream(modelData), null, "TTL"); return model; } catch (Exception e) { String parsingError = "Couldn't parse " + modelType + " model from " + projectName + ". It won't be available. " + e.getMessage(); handleErrorMsg(parsingError, e, true); } return null; } GitlabControllerImpl();  GitlabControllerImpl(boolean startFetchingProjects, boolean useCache);  GitlabControllerImpl(String token, boolean startFetchingProjects, boolean useCache); void runAfterFirstFetch(Runnable r); void startFetchingProjects(); @Override void stopFetchingProjects(); @Override List<Project> getAllProjects(); @Override Project gitlabToProject(GitlabProject project); static void main(String[] args); @Override Model getCheckedModel(byte modelData[], String modelType, String projectName); List<Project> getProjectsVisibleForUser(String mail); static final String GITLAB_URL_KEY; static final String GITLAB_TOKEN_KEY; }