Package data

Examples of data.FileControllerD


    }

     public VerbDictionary createVerbDictionary(int userID) {
        UserController _uc = new UserController();
        BufferedReader added = _uc.getVerbs(userID);
    FileControllerD _fc = new FileControllerD();
    BufferedReader verbs = _fc.getFileR(_path+"files"+_sep+"verbs.txt");
    BufferedReader irregulars = _fc.getFileR(_path+"files"+_sep+"irregulars.txt");
        VerbDictionary _vd = new VerbDictionary();
        _vd.inicialize(verbs, irregulars, added);
    try {
      if(added != null) added.close();
      verbs.close();
View Full Code Here


    }*/
   
   
    private void readDictionary(TestDictionary NounDictionary) {
        String noun = null;
        FileControllerD fc = new FileControllerD();
        BufferedReader input = fc.getFileR(_path + "files" + _sep + "nouns.txt");
        try {
            noun = input.readLine();
        } catch (IOException ex) {
            Logger.getLogger(DictionaryController.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

    String second = null;
        String user = userID+"";
    ArrayList<Pair<String, String>> training = new ArrayList<Pair<String, String>>();
    StringTokenizer tokens = null;

    FileControllerD fc = new FileControllerD();
                BufferedReader input = fc.getFileR(_path + "files" + _sep + "training.txt");

    try {
      parella = input.readLine();
    }
    catch (IOException ex) {
      Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    }
    while (parella != null) {
      tokens = new StringTokenizer(parella);
      if (tokens.hasMoreTokens()) {
        second = tokens.nextToken(); ///SWAP FET
        first = tokens.nextToken();
        if (!first.equals(second)) {
          Pair<String,String> pair = new Pair<String,String>(first, second);
          training.add(pair);
        }
      }

      try {
        parella = input.readLine();
      }
      catch (IOException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }

    }

        if (userID != 0) {
            input = fc.getFileR(_path + "users" + _sep + user + _sep + "usertraining.txt");

            try {
                parella = input.readLine();
            }
            catch (IOException ex) {
View Full Code Here

    private String readTextAlpha() {
        String linia = null;
    String text = "";

    FileControllerD fc = new FileControllerD();
        BufferedReader input = fc.getFileR(_path + "files" + _sep + "textalpha.txt");

    try {
      linia = input.readLine();
    }
    catch (IOException ex) {
View Full Code Here

    public void addVerbToDictionary(String s, int userID) {
        try {

        String user = userID+"";
        FileControllerD _fc = new FileControllerD();
        BufferedWriter _output = _fc.getFileW(_path+"users"+_sep+user+_sep+"added.txt");

       _output.append(s);
       _output.newLine();
       _output.close();
View Full Code Here

    public void addTrainingPair(String noun, String infinitive, int userID) {
        try {

        String user = userID+"";
        FileControllerD _fc = new FileControllerD();
        BufferedWriter _output = _fc.getFileW(_path+"users"+_sep+user+_sep+"usertraining.txt");

    for (int i = 0; i < 5; ++i) {
       _output.append(noun+" "+infinitive);
       _output.newLine();
    }
View Full Code Here

        return aux;

    }

  public void openFile(JTextArea ta) {
    FileControllerD _fc = new FileControllerD();
    _fc.openFile(ta);
  }
View Full Code Here

    _fc.openFile(ta);
  }


  public void saveFile(JTextArea ta) {
    FileControllerD _fc = new FileControllerD();
    _fc.saveFile(ta);
  }
View Full Code Here

    FileControllerD _fc = new FileControllerD();
    _fc.saveFile(ta);
  }

  public BufferedReader getFileR() {
    FileControllerD fc = new FileControllerD();
    BufferedReader a = fc.getFileR();
    return a;
  }
View Full Code Here

  private static String readTextAlpha() {
   
    String linia = null;
    String text = "";

    FileControllerD fc = new FileControllerD();
        BufferedReader input = fc.getFileR(_path + "files" + _sep + "textalpha.txt");

    try {
      linia = input.readLine();
    }
    catch (IOException ex) {
View Full Code Here

TOP

Related Classes of data.FileControllerD

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.