@Override public boolean isPseudoSkillBuilder(long problemSetId) { ProblemSet ps = find(problemSetId); String parameters = ps.getParameters(); if (parameters.contains("pseudo_skill_builder: \"true\"")) { return true; } else { return false; } }
@Override public long getPseudoSkillBuilderId(long problemSetId) { long id = 0; ProblemSet ps = find(problemSetId); String parameters = ps.getParameters(); String pattern = "arrs_skill_builder: \"(\\d+)\""; Pattern r = Pattern.compile(pattern); Matcher m = r.matcher(parameters); if (m.find()) { id = Long.valueOf(m.group(1)); } else { throw new RuntimeException( "Cannot find pseudo skill builder for problem set " + problemSetId); } return id; }