コード例 #1
0
ファイル: DBConnector.java プロジェクト: abcdefg3381/MusicBox
 /**
  * Network constructed here contains both type of edges. However node degree, node strength are
  * count only by co-occurrent edges.
  *
  * @param CompositionTitles
  * @param edgeType
  * @param formNetwork
  * @return
  */
 public MusicalNetwork getNetwork(Object[] CompositionTitles) {
   // get network with event list
   MusicalNetwork network = networkHandler.getNetwork(CompositionTitles);
   // set title
   StringBuilder title = new StringBuilder();
   for (Composition comp : network.getCompositions()) {
     title.append(comp.getTitle() + " ");
   }
   network.setName(title.toString());
   return network;
 }
コード例 #2
0
ファイル: DBConnector.java プロジェクト: abcdefg3381/MusicBox
 public boolean saveNetwork(MusicalNetwork importedNetwork) {
   compositionHandler.saveCompositions(importedNetwork.getCompositions());
   eventHandler.saveEvents(importedNetwork.getEventList());
   return true;
 }