Android Open Source - Realtime-Port-Authority Transit S A X Handler






From Project

Back to project page Realtime-Port-Authority.

License

The source code is released under:

Apache License

If you think the Android project Realtime-Port-Authority listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package rectangledbmi.com.pittsburghrealtimetracker.handlers;
/*from w  ww. j a  va  2 s .  c o  m*/
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

import java.util.ArrayList;
import java.util.List;

import rectangledbmi.com.pittsburghrealtimetracker.world.Bus;


/**
 * The Abstract Handler for SAX Events for our transit app.
 */

public abstract class TransitSAXHandler extends DefaultHandler {
    //TODO want to update points as opposed to clearing the map, consider hashmap
    protected String content = null;

//    Context context;

    /**
     *
     */
    public TransitSAXHandler() {
        super();
    }

/*    public SAXHandler(Context context) {
        super();
        this.context = context;
    }*/
    /**
     *
     * @param ch
     * @param start
     * @param length
     * @throws SAXException
     */
    @Override
    public void characters(char[] ch, int start, int length)
            throws SAXException {
        content = String.copyValueOf(ch, start, length).trim();
    }

    /**
     *
     * @param uri
     * description Stuff
     * @param localName
     * description Stuff
     * @param qName
     * description Stuff
     * @throws SAXException
     */
    @Override
    public abstract void endElement(String uri, String localName, String qName)
            throws SAXException;

    /**
     *
     * @param uri
     * @param localName
     * @param qName
     * @param attributes
     * @throws SAXException
     */
    @Override
    // Triggered when the start of tag is found.
    public abstract void startElement(String uri, String localName, String qName,
                             Attributes attributes) throws SAXException;

    /**
     * if qName == msg, use this to get the message contents
     * @param content the content of the message
     * @throws java.lang.NullPointerException
     */
    protected abstract void getMessage(String content) throws NullPointerException;

}




Java Source Code List

.Globals.java
.PortAuthorityRealtime.java
rectangledbmi.com.pittsburghrealtimetracker.AboutActivity.java
rectangledbmi.com.pittsburghrealtimetracker.ApplicationTest.java
rectangledbmi.com.pittsburghrealtimetracker.BusInformationDialog.java
rectangledbmi.com.pittsburghrealtimetracker.NavigationDrawerFragment.java
rectangledbmi.com.pittsburghrealtimetracker.SelectTransit.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.BusNotRunningException.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.BusSaxHandler.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.BusXMLPullParser.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.InputSave.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.PredictionsXMLPullParser.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestLine.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestPredictions.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestRoutes.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestTask.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RouteSaxHandler.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.TransitSAXHandler.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.containers.ETAContainer.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.containers.RequestLineContainer.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.extend.CheckableRelativeLayout.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.extend.ColoredArrayAdapter.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.extend.ETAWindowAdapter.java
rectangledbmi.com.pittsburghrealtimetracker.world.Bus.java
rectangledbmi.com.pittsburghrealtimetracker.world.LineInfo.java
rectangledbmi.com.pittsburghrealtimetracker.world.Prediction.java
rectangledbmi.com.pittsburghrealtimetracker.world.Route.java
rectangledbmi.com.pittsburghrealtimetracker.world.TransitStop.java