Revision 37

SRC/src/fr/triangle/hyperalign/io/output/DictionaryWriter.java (revision 37)
49 49

  
50 50
		Element root = new Element(TEITags.HM_LIST);		
51 51

  
52
		Vector<DictionaryElement> lemmes = sourceDico.getRoot().children();
52
		Vector<DictionaryElement> lemmes = sourceDico.getRoot().childrenVect();
53 53
		for (int i = 0; i < lemmes.size(); i++) {
54 54
			DictionaryElement lemme = lemmes.get(i);
55 55
			Element concept = new Element(TEITags.HM_CONCEPT);	
......
70 70
	}
71 71

  
72 72
	private Element find(DictionaryElement lemme, Element concept, boolean saveEquivalences){
73
		Vector<DictionaryElement> forms = lemme.children();
73
		Vector<DictionaryElement> forms = lemme.childrenVect();
74 74
		HashMap<Division, Integer> localisations = new HashMap<Division, Integer>();
75 75
		HashMap<DictionaryElement, HashMap<String, Integer>> equivalences = new HashMap<DictionaryElement, HashMap<String,Integer>>();
76 76
		Element terms = new Element(TEITags.HM_TERMS);	
77 77
		for (int j = 0; j < forms.size(); j++) {
78 78
			DictionaryElement form = forms.get(j);
79
			if(form.children().size()!=0){
79
			if(form.childrenVect().size()!=0){
80 80
				Element term = new Element(TEITags.HM_TERM);	
81 81
				Attribute att = new Attribute(TEITags.HM_ATT_NAME, form.getName());
82 82
				term.setAttribute(att);
83 83
				terms.addContent(term);
84 84

  
85 85
				///FIND ALL THE OCCURRENCES
86
				Vector<DictionaryElement> occs = form.children();
86
				Vector<DictionaryElement> occs = form.childrenVect();
87 87
				for (int k = 0; k < occs.size(); k++) {
88 88
					DictionaryElement occ = occs.get(k);
89 89
					Division div = occ.getOccurrence().getDivision();
......
309 309
		}
310 310
		sourceDico.getManager().getDictionaryManager().removeForm(lemme, form);
311 311
		System.out.println("DictionaryWriter.removeFormFromDictionary() - "+form.getName()+" FROM "+lemme.getId());
312
	}
312 313
	
313
	}
314 314
	public Element buildFile() {
315 315
		System.out.println("DictionaryWriter.buildFile()"+dictionary.getName());
316 316

  
......
340 340
	public void removeForm(DataManager dataManager, DictionaryElement lemme, DictionaryElement form){
341 341
		URL url = dictionary.getUrl();
342 342
		String[] projectFileName = dataManager.getProjectName();
343
		String fileName = projectFileName[1]+"_"+"Dictionary_"+dictionary.getName()+".xml";
343
		String fileName = "Dictionary_"+dictionary.getName()+".xml";
344 344
		File file = new File(projectFileName[0], fileName);
345 345

  
346 346
		System.out.println("======================================================================");
......
395 395
	public void modifyLemme(DataManager dataManager, DictionaryElement lemme){
396 396
		URL url = dictionary.getUrl(); //NOT IN USE ANYMORE
397 397
		String[] projectFileName = dataManager.getProjectName();
398
		String fileName = projectFileName[1]+"_"+"Dictionary_"+dictionary.getName()+".xml";
398
		String fileName = "Dictionary_"+dictionary.getName()+".xml";
399
				//projectFileName[1]+"_"+"Dictionary_"+dictionary.getName()+".xml";
399 400
		File file = new File(projectFileName[0], fileName);
400 401

  
401 402
		//System.out.println("======================================================================");
......
468 469
	public void addFormToLemme(DataManager dataManager, String form, String idLemme, boolean asLemme){
469 470
		URL url = dictionary.getUrl();
470 471
		String[] projectFileName = dataManager.getProjectName();
471
		String fileName = projectFileName[1]+"_"+"Dictionary_"+dictionary.getName()+".xml";
472
		String fileName = "Dictionary_"+dictionary.getName()+".xml";
472 473
		File file = new File(projectFileName[0], fileName);
473 474
		SAXBuilder sxb = new SAXBuilder();
474 475
		Document document;
......
528 529
	public void mergeFormToLemme(DataManager dataManager, String form, String idLemme, String idNewLemme, boolean removeOldLemme){
529 530
		URL url = dictionary.getUrl();
530 531
		String[] projectFileName = dataManager.getProjectName();
531
		String fileName = projectFileName[1]+"_"+"Dictionary_"+dictionary.getName()+".xml";
532
		String fileName = "Dictionary_"+dictionary.getName()+".xml";
532 533
		File file = new File(projectFileName[0], fileName);
533 534

  
534 535
		System.out.println("======================================================================");
......
600 601
		orth.addContent(concept.getName());
601 602
		el.addContent(orth);
602 603

  
603
		Vector<DictionaryElement> terms = concept.children();
604
		Vector<DictionaryElement> terms = concept.childrenVect();
604 605
		if(terms!=null){
605 606
			for (int i = 0; i < terms.size(); i++) {
606 607
				DictionaryElement term = terms.get(i);

Also available in: Unified diff