use of org.stepik.core.serialization.SampleConverter in project intellij-plugins by StepicOrg.
the class StepikProjectManager method getXStream.
@NotNull
public static XStream getXStream() {
if (xStream == null) {
xStream = new XStream(new DomDriver());
xStream.alias("StepikProjectManager", StepikProjectManager.class);
xStream.alias("CourseNode", CourseNode.class);
xStream.alias("SectionNode", SectionNode.class);
xStream.alias("LessonNode", LessonNode.class);
xStream.alias("StepNode", StepNode.class);
xStream.alias("Limit", Limit.class);
xStream.alias("SupportedLanguages", SupportedLanguages.class);
xStream.alias("VideoUrl", VideoUrl.class);
xStream.alias("LinkedTreeMap", LinkedTreeMap.class);
xStream.alias("Sample", Sample.class);
xStream.alias("Course", Course.class);
xStream.alias("Section", Section.class);
xStream.alias("CompoundUnitLesson", CompoundUnitLesson.class);
xStream.alias("Step", Step.class);
xStream.alias("User", User.class);
xStream.autodetectAnnotations(true);
xStream.setClassLoader(StepikProjectManager.class.getClassLoader());
xStream.registerConverter(new SupportedLanguagesConverter());
xStream.registerConverter(new SampleConverter());
xStream.ignoreUnknownElements();
xStream.setMode(XStream.ID_REFERENCES);
}
return xStream;
}
Aggregations