KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > nbbuild > misc > bugcompare > ChangelogHandlerImpl


1 package nbbuild.misc.bugcompare;
2
3
4 /*
5  * The contents of this file are subject to the terms of the Common Development
6  * and Distribution License (the License). You may not use this file except in
7  * compliance with the License.
8  *
9  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
10  * or http://www.netbeans.org/cddl.txt.
11  *
12  * When distributing Covered Code, include this CDDL Header Notice in each file
13  * and include the License file at http://www.netbeans.org/cddl.txt.
14  * If applicable, add the following below the CDDL Header, with the fields
15  * enclosed by brackets [] replaced by your own identifying information:
16  * "Portions Copyrighted [year] [name of copyright owner]"
17  *
18  * The Original Software is NetBeans. The Initial Developer of the Original
19  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
20  * Microsystems, Inc. All Rights Reserved.
21  */

22
23 import java.util.*;
24 public class ChangelogHandlerImpl_1 implements ChangelogHandler {
25     public static final boolean DEBUG = false;
26
27     Map map;
28
29     int number;
30
31     public ChangelogHandlerImpl_1(Map map) {
32         this.map = map;
33         number = 0;
34     }
35
36     public void handle_name(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
37         if (DEBUG) System.err.println("handle_name: " + data);
38     }
39
40     public void handle_msg(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
41         int number = 0;
42         for (int i = 0; i < data.length(); i++) {
43             int c = data.charAt(i);
44             if ((c >= '0') && (c <= '9')) {
45                 if (number == 0) {
46                     number = c - '0';
47                 }
48                 else {
49                     number = number * 10;
50                     number += (c - '0');
51                 }
52             }
53             else {
54                 if ((number > 1000) && (number < 15000)) {
55                     map.put(new Integer JavaDoc(number), data);
56                 }
57                 number = 0;
58             }
59         }
60     }
61     
62     public void handle_time(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
63         if (DEBUG) System.err.println("handle_time: " + data);
64     }
65     
66     public void handle_file(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
67         if (DEBUG) System.err.println("handle_file: " + data);
68     }
69     
70     public void handle_date(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
71         if (DEBUG) System.err.println("handle_date: " + data);
72     }
73     
74     public void handle_author(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
75         if (DEBUG) System.err.println("handle_author: " + data);
76     }
77     
78     public void handle_commondir(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
79         if (DEBUG) System.err.println("handle_commondir: " + data);
80     }
81     
82     public void handle_utag(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
83         if (DEBUG) System.err.println("handle_utag: " + data);
84     }
85     
86     public void handle_weekday(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
87         if (DEBUG) System.err.println("handle_weekday: " + data);
88     }
89     
90     public void handle_changelog(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
91         if (DEBUG) System.err.println("handle_changelog: " + data);
92     }
93     
94     public void handle_revision(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
95         if (DEBUG) System.err.println("handle_revision: " + data);
96     }
97     
98     public void handle_entry(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
99         if (DEBUG) System.err.println("handle_entry: " + data);
100     }
101     
102     public void handle_branch(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
103         if (DEBUG) System.err.println("handle_branch: " + data);
104     }
105     
106     public void handle_branchroot(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
107         if (DEBUG) System.err.println("handle_branchroot: " + data);
108     }
109     
110     public void handle_tag(final java.lang.String JavaDoc data, final org.xml.sax.AttributeList JavaDoc meta) throws org.xml.sax.SAXException JavaDoc {
111         if (DEBUG) System.err.println("handle_tag: " + data);
112     }
113     
114     
115 }
Popular Tags