Package cfdict.model

Examples of cfdict.model.Sign


    private void purgeUnmodifiedSign() {
       
        LinkedList<Sign> newDic = new LinkedList<Sign>();
        for (Iterator<Sign> it = dic.iterator(); it.hasNext();) {
            Sign sign = it.next();
            if (sign.getLastModif() > Long.parseLong(conf.getTimestamp())) {
                newDic.add(sign);
            }
        }
       
        this.dic = newDic;
View Full Code Here


    private void sign() throws IOException {


        for (Iterator<Sign> it = dic.iterator(); it.hasNext();) {

            Sign sign = it.next();

            content = "UPDATE " + conf.getSinoTable()
                    + " SET " + conf.getSinoTableTraditionalName() + " = '" + sign.getTraditionnel() + "', "
                    + conf.getSinoTableSimplifiedName() + " = '" + sign.getSimple() + "', "
                    + conf.getSinoTablePinyinName() + " = '" + sign.getPinyin() + "'"
                    + " WHERE " + conf.getSinoTableIdName() + " = '" + sign.getId() + "'"
                    + "; \r\n";
            bw.write(content.toCharArray());


            if (file.length() > Integer.parseInt(conf.getMaxFileSize()) * 1048576) {
View Full Code Here

    }

    private void deleteTrad() throws IOException {
        for (Iterator<Sign> it = dic.iterator(); it.hasNext();) {
            Sign sign = it.next();



            content = "'" + sign.getId() + "'";
            bw.write(content.toCharArray());



View Full Code Here

    }

    private void trad() throws IOException {
        for (Iterator<Sign> it = dic.iterator(); it.hasNext();) {
            Sign sign = it.next();

            for (Iterator<String> it2 = sign.getTraductions().iterator(); it2.hasNext();) {
                String trad = it2.next();

                content = "('" + sign.getId() + "',"
                        + "'" + trad.replace("'", "\\'") + "'"
                        + ")";

                if (it2.hasNext()) {
                    content += ",";
View Full Code Here

    private void sign() throws IOException {


        for (Iterator<Sign> it = dic.iterator(); it.hasNext();) {

            Sign sign = it.next();
            content = "('" + sign.getId() + "',"
                    + "'" + sign.getTraditionnel() + "', "
                    + "'" + sign.getSimple() + "', "
                    + "'" + sign.getPinyin() + "'"
                    + ")";

            bw.write(content.toCharArray());

            if (it.hasNext()) {
View Full Code Here

    }

    private void trad() throws IOException {
        for (Iterator<Sign> it = dic.iterator(); it.hasNext();) {
            Sign sign = it.next();

            for (Iterator<String> it2 = sign.getTraductions().iterator(); it2.hasNext();) {
                String trad = it2.next();

                content = "('" + sign.getId() + "',"
                        + "'" + trad.replace("'", "\\'") + "'"
                        + ")";

                if (it2.hasNext()) {
                    content += ",";
View Full Code Here

            case "dic":
                dic = new LinkedList<Sign>();
                inDic = true;
                break;
            case "word":
                sign = new Sign();
                inWord = true;
                break;
            case "translations":
                translations = new LinkedList<String>();
                inTransPart = true;
View Full Code Here

TOP

Related Classes of cfdict.model.Sign

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.