亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? kwic.java

?? 經(jīng)典體系風格實現(xiàn)之事件系統(tǒng)
?? JAVA
字號:
// -*- Java -*-
/*
 * <copyright>
 * 
 *  Copyright (c) 2002
 *  Institute for Information Processing and Computer Supported New Media (IICM),
 *  Graz University of Technology, Austria.
 * 
 * </copyright>
 * 
 * <file>
 * 
 *  Name:    KWIC.java
 * 
 *  Purpose: The Master Control class
 * 
 *  Created: 05 Nov 2002 
 * 
 *  $Id$
 * 
 *  Description:
 *    The Master Control class
 * </file>
*/

package kwic.es;
import java.util.*;
import kwic.es.*;
/*
 * $Log$
*/

/**
 *  The KWIC system implemented by means of event-based architecture consists of the
 *  following modules:
 * <ul>
 *  <li>
 *  Master Control module, which is responsible for controling all other modules
 *  in the system
 *  <li>Input module, which is responsible for reading the input file, parsing it
 *  and adding lines to Original Line Storage module
 *  <li>Original Line Storage module, which stores original lines
 *  <li>Circular Shifter module, which produces all circular shifts from original lines
 *  <li>Shifted Line Storage module, which stores circular shifts 
 *  <li>Alphabetizer module, which sorts shifted lines
 *  <li>Output module, which prints out the sorted shifts in a nice format.
 * </ul>
 *  Input module reads the input file, parses it
 *  and adds lines to Original Line Storage module. Any change (e.g. a new line 
 *  was added) to Original Line Storage module causes an event (message) to be
 *  sent to all modules which declare interest in tracking these changes. In 
 *  the current system, Circular Shifter module declares such interest. Thus, 
 *  upon receiving a notification event stating that the new line was added to
 *  Original Line Storage module, Circular Shifter module processes the line and
 *  creates circular shifts for that line. The newly created circular shifts are
 *  stored in Shifted Line Storage module. Similarly to changes in Original Line
 *  Storage module, any change (e.g. a new circular shift was added) to Shifted 
 *  Line Storage module causes an event (message) to be sent to all modules which
 *  declare interest in tracking these changes. Obviously, in the current system 
 *  Alphabetizer module declares such interest. Thus, upon receiving a notification
 *  event stating that the new circular shift was added to Shifted Line Storage module, 
 *  Alphabetizer module sorts this circular shift. The sorted shifts are kept in
 *  Shifted Line Storage as well. Once when Input module has finished with parsing
 *  procedure, which implies that all circular shifts have been created and sorted
 *  (because of notification mechanism) Outpur module prints out the sorted shifts.
 *  In the current implementation an object of the KWIC class creates and initializes
 *  all other objects from the event-based KWIC implementation to achieve the desired 
 *  functionality. Thus, KWIC instance creates the following instances of other classes:
 *  <ul>
 *  <li>An instance of LineStorageWrapper class that holds the original lines
 *  <li>An instance of LineStorageWrapper class that holds the circular shifts
 *  <li>An instance of Input class which parses the input file and adds lines
 *  to the line storage for original lines
 *  <li>An instance of CircularShift class which declares its interest in
 *  changes to the line storage for original lines. Thus, whenever it receives a
 *  message that a new line has been added it produces circular shifts for that line
 *  and stores them into the line storage for circular shifts
 *  <li>An instance of Alphabetizer class which declares its interest in
 *  changes to the line storage for circular shifts. Thus, whenever it receives a
 *  message that a new circular shift has been added it sorts the line storage for
 *  circular shifts
 *  <li>An instance of Output class which prints all shifts from the line 
 *  storage for circular shifts.
 *  Further, the KWIC class provides also the main method which checks the command line
 *  arguments.
 *  </ul>
 *  @author  dhelic
 *  @version $Id$
*/

public class KWIC{

//----------------------------------------------------------------------
/**
 * Fields
 *
 */
//----------------------------------------------------------------------

//----------------------------------------------------------------------
/**
 * Constructors
 *
 */
//----------------------------------------------------------------------

//----------------------------------------------------------------------
/**
 * Methods
 *
 */
//----------------------------------------------------------------------

//----------------------------------------------------------------------
/**
 * Parses the data, makes shifts and sorts them. At the end prints the
 * sorted shifts.
 * @param file name of the input file
 */

	
	
  public void execute(String file){
    LineStorageWrapper lines = new LineStorageWrapper();
    LineStorageWrapper shifts = new LineStorageWrapper();


	//lines 的觀察者是shifter,shifts又被alphabetizer觀察
    Input input = new Input();    
    CircularShifter shifter = new CircularShifter(shifts);
    lines.addObserver(shifter);
    
    Alphabetizer alphabetizer = new Alphabetizer();
    shifts.addObserver(alphabetizer);
    
    Output output = new Output();
    WordIndex wordIndex = new WordIndex();
    lines.addObserver(wordIndex);    
    input.parse(file, lines);    
    
    Scanner scan=new Scanner(System.in);
    
    char choice;
    
    String line;
    
    boolean flag=true;
    
    do{
    	System.out.print("Add, Delete, Print,Index, Quit:");
    
    	choice=scan.nextLine().charAt(0);    	
    	
    	switch(choice)
    	{
    		case 'q': 
    					flag=false;
    					
    					break;
    					
    		case 'a':
    				  	System.out.print(">");
    
    					line=new String(scan.nextLine());
    					
    					String words[]=line.split(" ");
    					
    					lines.addLine(words);
    					
    					break;
    		case 'p':
    					System.out.println("-------------------------------");
    					
    					output.print(shifts);
    					
    					System.out.println("-------------------------------");
    					
    					break;
    	    case 'i':
      	   
      	   			    System.out.println("-------------------------------");
      	   	    		
      	   	    		lines.wordsIndex();
         
         			    System.out.println("-------------------------------");
      	   			
      	   			 	break;
    					
    		case 'd':
    				//	lines.deleteLine(0);
    				
    					System.out.print(">");
    
    					line=new String(scan.nextLine());
    					    					
    					String words2[]=line.split(" ");
    					    					
    					lines.deleteLine(words2);
    				
    					break;
    					
    		default:    
    		            System.out.println("No such choice.Please enter \"a\",\"d\",\"p\",\"i\" or \"q\":");
      	   			
    		            break;
    					
    		}
    	
    	if(choice == 'q' || choice == 'Q')break;
    
   		
    }while (true); 
    
    
    
    //System.out.println(choice+"    "+line);
   
    
  }

//----------------------------------------------------------------------
/**
 * Main function checks the command line arguments. The program expects 
 * exactly one command line argument specifying the name of the file 
 * that contains the data. If the program has not been started with 
 * proper command line arguments, main function exits
 * with an error message. Otherwise, a KWIC instance is created and program
 * control is passed to it.
 * @param args command line arguments
 */

  public static void main(String[] args){
  	//args[0]=new String("haha.txt");
  	/**
    if(args.length != 1){
      System.err.println("KWIC Usage: java kwic.ms.KWIC file_name");
      System.exit(1);
    }
    */

    KWIC kwic = new KWIC();
    kwic.execute("haha.txt");
  }

//----------------------------------------------------------------------
/**
 * Inner classes
 *
 */
//----------------------------------------------------------------------

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人综合在线观看| 亚洲日本在线a| 国产精品一区二区在线播放 | 97久久精品人人爽人人爽蜜臀| 精品1区2区在线观看| 国产一区二区成人久久免费影院| 日韩精品一区在线观看| 国内精品伊人久久久久av影院| 久久精品欧美日韩| 成人免费视频app| 亚洲精品中文字幕乱码三区| 欧美探花视频资源| 美国一区二区三区在线播放| 久久久久国产精品人| 色琪琪一区二区三区亚洲区| 午夜精品久久久久久久久久久| 日韩欧美一区二区免费| www.久久精品| 日韩在线观看一区二区| 久久无码av三级| 色综合久久久久综合体桃花网| 亚洲成a人v欧美综合天堂下载| 欧美电视剧在线观看完整版| av中文一区二区三区| 亚洲成人av中文| 久久亚洲精品小早川怜子| av一二三不卡影片| 日韩 欧美一区二区三区| 中文字幕不卡在线| 欧美高清你懂得| av男人天堂一区| 美女视频一区在线观看| 亚洲丝袜精品丝袜在线| 欧美一级爆毛片| 91丝袜高跟美女视频| 六月丁香婷婷色狠狠久久| 国产精品传媒入口麻豆| 欧美大度的电影原声| 99re亚洲国产精品| 精品伊人久久久久7777人| 亚洲男人的天堂在线观看| 日韩精品中文字幕一区二区三区 | 黄色小说综合网站| 亚洲中国最大av网站| 国产欧美视频一区二区| 3atv一区二区三区| 色诱视频网站一区| 丁香婷婷深情五月亚洲| 免费观看成人av| 亚洲精品五月天| 日本一区二区三区国色天香| 欧美一级黄色录像| 欧美亚洲综合一区| 95精品视频在线| 国产99久久久国产精品潘金网站| 日本伊人精品一区二区三区观看方式| 中日韩av电影| 久久久蜜桃精品| 日韩视频免费观看高清完整版| 色婷婷激情一区二区三区| 国产91精品精华液一区二区三区| 青草国产精品久久久久久| 亚洲成人精品在线观看| 亚洲麻豆国产自偷在线| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 欧美剧在线免费观看网站| 激情综合色播激情啊| 日本中文字幕不卡| 图片区小说区国产精品视频| 亚洲精品中文字幕在线观看| 亚洲欧洲精品一区二区三区不卡| 亚洲精品一区二区三区香蕉| 欧美一区二区三区爱爱| 在线播放欧美女士性生活| 欧美色成人综合| 欧美私模裸体表演在线观看| 在线免费亚洲电影| 欧美亚洲国产怡红院影院| 日本韩国欧美一区| 在线观看日韩av先锋影音电影院| 色综合久久精品| 日本大香伊一区二区三区| 91精品91久久久中77777| 91精品1区2区| 欧美猛男男办公室激情| 在线不卡的av| 欧美成人三级电影在线| 久久久久久电影| 欧美激情一区三区| 国产精品久久久久桃色tv| 亚洲欧美在线视频| 亚洲综合在线观看视频| 亚洲福利视频三区| 麻豆国产91在线播放| 国模大尺度一区二区三区| 国产精品一二三四| 91偷拍与自偷拍精品| 欧美天堂一区二区三区| 日韩一区二区不卡| 欧美—级在线免费片| 亚洲九九爱视频| 日本三级韩国三级欧美三级| 国产一区啦啦啦在线观看| 成人高清免费观看| 欧美日韩一区二区三区在线看| 91精品国产福利| 久久久噜噜噜久久中文字幕色伊伊 | 欧美日韩三级在线| 日韩免费看的电影| 国产精品美女久久久久久久| 亚洲国产一区在线观看| 韩国一区二区视频| 色天使久久综合网天天| 日韩欧美在线观看一区二区三区| 久久久久国产精品麻豆ai换脸| 18成人在线观看| 免费高清视频精品| 成人国产精品免费网站| 欧美日韩激情一区二区三区| 久久综合久久鬼色中文字| 亚洲人快播电影网| 精品系列免费在线观看| 色偷偷一区二区三区| 欧美不卡123| 亚洲亚洲人成综合网络| 国产精品资源在线| 欧美日韩一区二区欧美激情| 日本一区二区三区视频视频| 偷拍一区二区三区四区| 成人性生交大片免费看视频在线 | 久久亚洲一级片| 一区二区在线观看视频在线观看| 久久丁香综合五月国产三级网站| 91丨九色丨尤物| 26uuu另类欧美亚洲曰本| 亚洲综合男人的天堂| 国产91丝袜在线播放九色| 欧美裸体一区二区三区| 中文字幕中文在线不卡住| 精油按摩中文字幕久久| 欧美午夜免费电影| 亚洲人成亚洲人成在线观看图片| 九九热在线视频观看这里只有精品| 色婷婷国产精品综合在线观看| 久久综合九色综合久久久精品综合| 亚洲国产日韩a在线播放性色| 不卡欧美aaaaa| 久久久久久久综合色一本| 免费高清在线视频一区·| 欧美性极品少妇| 亚洲美腿欧美偷拍| 成人aaaa免费全部观看| 精品国产123| 青青青爽久久午夜综合久久午夜| 欧美三区在线观看| 亚洲黄色免费电影| 色诱视频网站一区| 中文字幕一区二区三区在线不卡 | 久久99国内精品| 4438x成人网最大色成网站| 天堂在线一区二区| 欧美区在线观看| 午夜精品福利在线| 欧美伦理影视网| 日韩二区三区在线观看| 欧美少妇bbb| 亚洲444eee在线观看| 欧美怡红院视频| 亚洲一卡二卡三卡四卡五卡| 色一区在线观看| 尤物av一区二区| 欧美在线免费播放| 日韩精品一二三区| 日韩天堂在线观看| 国产一区二三区好的| wwww国产精品欧美| 国产91高潮流白浆在线麻豆| 亚洲国产岛国毛片在线| 99视频一区二区三区| 亚洲视频免费在线| 在线看国产一区| 香蕉影视欧美成人| 日韩欧美自拍偷拍| 国产美女久久久久| 国产精品萝li| 欧美日韩一区小说| 蜜桃一区二区三区在线| 久久精品欧美日韩精品| 91女人视频在线观看| 亚洲成av人片一区二区三区| 91精品国模一区二区三区| 久久av中文字幕片| 国产精品人妖ts系列视频| 色狠狠色狠狠综合| 日韩av不卡一区二区| 国产日韩欧美不卡| 91福利小视频| 另类专区欧美蜜桃臀第一页| 国产精品麻豆久久久| 欧美日韩国产欧美日美国产精品|