private static String serializeDsm( DirectedGraph<Resource, Dependency> graph, Collection<Resource> sources, Set<Edge> feedbackEdges) { Dsm<Resource> dsm = new Dsm<Resource>(graph, sources, feedbackEdges); DsmTopologicalSorter.sort(dsm); return DsmSerializer.serialize(dsm); }
private void saveDsm(DecoratorContext context, Dsm<Resource> dsm) { Measure measure = new Measure(CoreMetrics.DEPENDENCY_MATRIX, DsmSerializer.serialize(dsm)); measure.setPersistenceMode(PersistenceMode.DATABASE); context.saveMeasure(measure); }