⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matchingresultform.java

📁 toocom源代码,主要应用在本体匹配方面!
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    	buttonBox.add(fixRelButton);*/
    	this.getContentPane().add(buttonBox,BorderLayout.SOUTH);
		this.pack();
		this.setVisible(true);
		this.toFront();
	}
	
	/*private void fixCon(){
	}
	
	private void fixRel(){
	}*/
	
	private void refreshConceptsMatchings(){
		matchC.setText("");
		matchC.append(Constants.CONCEPT_MATCHINGS_LABEL + "RATIO = " + this.list.getConceptMatchingRatio() + "\n");
		for(Iterator i = this.list.getMatchingsSortedByWeight().iterator();i.hasNext();){
			Matching m = (Matching) i.next();
			if(m.isConceptMatching()){
				matchC.append("(" + m.getFirstCP().getTerm(this.l) + "," + m.getSecondCP().getTerm(this.l) + ")");
				/*TextField sym = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				sym.setEditable(false);
				b.add(sym);
				TextField trans = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				trans.setEditable(false);
				b.add(trans);
				TextField refl = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				refl.setEditable(false);
				b.add(refl);
				TextField irr = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				irr.setEditable(false);
				b.add(irr);
				TextField anti = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				anti.setEditable(false);
				b.add(anti);
				TextField cmin = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				cmin.setEditable(false);
				b.add(cmin);
				TextField cmax = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				cmax.setEditable(false);
				b.add(cmax);
				TextField topo = new TextField(Integer.toString(m.topoWeight),1);
				topo.setEditable(false);
				b.add(topo);
				TextField topoPlus = new TextField(Integer.toString(m.topoPlusWeight),1);
				topoPlus.setEditable(false);
				b.add(topoPlus);
				TextField disj = new TextField(Integer.toString(m.disjunctionWeight),1);
				disj.setEditable(false);
				b.add(disj);
				TextField incomp = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				incomp.setEditable(false);
				b.add(incomp);
				TextField exclu = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				exclu.setEditable(false);
				b.add(exclu);
				TextField sign = new TextField(Integer.toString(m.signatureWeight),1);
				sign.setEditable(false);
				b.add(sign);
				TextField isa = new TextField(Integer.toString(m.isaWeight),1);
				isa.setEditable(false);
				b.add(isa);
				TextField abs = new TextField(Integer.toString(m.abstractionWeight),1);
				abs.setEditable(false);
				b.add(abs);*/
				matchC.append(" : " + Integer.toString(m.getWeight()) + "\n");
			}
		}
		this.repaint();
	}
	
	private void refreshRelationsMatchings(){
		matchR.setText("");
		matchR.append(Constants.RELATION_MATCHINGS_LABEL + "RATIO = " + this.list.getRelationMatchingRatio() + "\n");
		for(Iterator i = this.list.getMatchingsSortedByWeight().iterator();i.hasNext();){
			Matching m = (Matching) i.next();
			if(!m.isConceptMatching()){
				matchR.append("(" + m.getFirstCP().getTerm(this.l) + "," + m.getSecondCP().getTerm(this.l) + ")");
				/*TextField sym = new TextField(Integer.toString(m.symmetryWeight),1);
				sym.setEditable(false);
				b.add(sym);
				TextField trans = new TextField(Integer.toString(m.transitivityWeight),1);
				trans.setEditable(false);
				b.add(trans);
				TextField refl = new TextField(Integer.toString(m.reflexivityWeight),1);
				refl.setEditable(false);
				b.add(refl);
				TextField irr = new TextField(Integer.toString(m.irreflexivityWeight),1);
				irr.setEditable(false);
				b.add(irr);
				TextField anti = new TextField(Integer.toString(m.antisymmetryWeight),1);
				anti.setEditable(false);
				b.add(anti);
				TextField cmin = new TextField(Integer.toString(m.cminWeight),1);
				cmin.setEditable(false);
				b.add(cmin);
				TextField cmax = new TextField(Integer.toString(m.cmaxWeight),1);
				cmax.setEditable(false);
				b.add(cmax);
				TextField topo = new TextField(Integer.toString(m.topoWeight),1);
				topo.setEditable(false);
				b.add(topo);
				TextField topoPlus = new TextField(Integer.toString(m.topoPlusWeight),1);
				topoPlus.setEditable(false);
				b.add(topoPlus);
				TextField disj = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				disj.setEditable(false);
				b.add(disj);
				TextField incomp = new TextField(Integer.toString(m.incompatibilityWeight),1);
				incomp.setEditable(false);
				b.add(incomp);
				TextField exclu = new TextField(Integer.toString(m.exclusivityWeight),1);
				exclu.setEditable(false);
				b.add(exclu);
				TextField sign = new TextField(Integer.toString(m.signatureWeight),1);
				sign.setEditable(false);
				b.add(sign);
				TextField isa = new TextField(Integer.toString(m.isaWeight),1);
				isa.setEditable(false);
				b.add(isa);
				TextField abs = new TextField(Constants.MATCHING_RESULT_NO_PROP,1);
				abs.setEditable(false);
				b.add(abs);*/
				matchR.append(" : " + Integer.toString(m.getWeight()) + "\n");
			}
		}
		this.repaint();
	}
	
	private void symChange(ChangeEvent e){
		MatchingAlgorithm.symmetryWeight = ((JSlider) e.getSource()).getValue();
		this.refreshRelationsMatchings();		
	}
	
	private void transChange(ChangeEvent e){
		MatchingAlgorithm.transitivityWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void reflChange(ChangeEvent e){
		MatchingAlgorithm.reflexivityWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void irrChange(ChangeEvent e){
		MatchingAlgorithm.irreflexivityWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void antiChange(ChangeEvent e){
		MatchingAlgorithm.antisymmetryWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void cminChange(ChangeEvent e){
		MatchingAlgorithm.cminWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void cmaxChange(ChangeEvent e){
		MatchingAlgorithm.cmaxWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void topoChange(ChangeEvent e){
		MatchingAlgorithm.topoWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshConceptsMatchings();		
		this.refreshRelationsMatchings();		
	}
	
	private void topoPlusChange(ChangeEvent e){
		MatchingAlgorithm.topoPlusWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshConceptsMatchings();		
		this.refreshRelationsMatchings();		
	}
	
	private void disjChange(ChangeEvent e){
		MatchingAlgorithm.disjunctionWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshConceptsMatchings();		
	}
	
	private void incompChange(ChangeEvent e){
		MatchingAlgorithm.incompatibilityWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void excluChange(ChangeEvent e){
		MatchingAlgorithm.exclusivityWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void signChange(ChangeEvent e){
		MatchingAlgorithm.signatureWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshRelationsMatchings();		
	}
	
	private void isaChange(ChangeEvent e){
		MatchingAlgorithm.isaWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshConceptsMatchings();		
		this.refreshRelationsMatchings();		
	}
	
	private void absChange(ChangeEvent e){
		MatchingAlgorithm.abstractionWeight = ((JSlider) e.getSource()).getValue();		
		this.refreshConceptsMatchings();		
	}
	
	private void print(){		
		try{
			JFileChooser fileChooser = new JFileChooser(Constants.APPLICATION_DIRECTORY);
			fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES );
			fileChooser.setAcceptAllFileFilterUsed(false);
			if(fileChooser.showDialog(this,Constants.PRINT_LABEL) == JFileChooser.APPROVE_OPTION){
				FileWriter writer = new FileWriter(fileChooser.getSelectedFile().getPath());
				list.print(writer,l);
				writer.close();
			}
		}
		catch(Exception e){
			JOptionPane.showMessageDialog(this,Constants.MATCHING_RESULT_PRINT_PROBLEM);
		}
	}
		
}


	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -