Android Open Source - android-tools Wordpress A P I






From Project

Back to project page android-tools.

License

The source code is released under:

MIT License

If you think the Android project android-tools 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 net.comfreeze.lib.api.xml;
//from   w w  w  . java2  s .c om
import android.os.Bundle;
import android.util.Log;

import net.comfreeze.lib.api.XMLAPI;
import net.comfreeze.lib.xml.XMLParser;
import net.comfreeze.lib.xml.wordpress.FeedXmlParser;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;

abstract public class WordpressAPI extends XMLAPI {
    private static final String TAG = WordpressAPI.class.getSimpleName();

    public WordpressAPI() {
        setParser(new FeedXmlParser());
    }

    @Override
    public WordpressAPI setParser(XMLParser parser) {
        return (WordpressAPI) super.setParser(parser);
    }

    @Override
    public FeedXmlParser getParser() {
        return (FeedXmlParser) super.getParser();
    }

    public ArrayList<FeedXmlParser.FeedItem> process(InputStream is) {
        if (null == getParser()) {
            Log.e(TAG, "No XML parser provided!");
            return null;
        }
        return getParser().setSource(is).items;
    }

    public ArrayList<FeedXmlParser.FeedItem> items(Bundle parameters) {
        InputStream is = super.list(parameters);
        ArrayList<FeedXmlParser.FeedItem> items = null;
        if (null != is) {
            items = process(is);
            try {
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return items;
    }
}




Java Source Code List

net.comfreeze.lib.BundleBuilder.java
net.comfreeze.lib.CFZApplication.java
net.comfreeze.lib.ContentValueBuilder.java
net.comfreeze.lib.FragmentMap.java
net.comfreeze.lib.adapter.HeaderListAdapter.java
net.comfreeze.lib.adapter.IHeaderListAdapter.java
net.comfreeze.lib.adapter.SeparatedListAdapter.java
net.comfreeze.lib.api.BaseAPI.java
net.comfreeze.lib.api.RestAPI.java
net.comfreeze.lib.api.XMLAPI.java
net.comfreeze.lib.api.helper.CursorHelper.java
net.comfreeze.lib.api.helper.JSONHelper.java
net.comfreeze.lib.api.helper.ModelHelper.java
net.comfreeze.lib.api.xml.WordpressAPI.java
net.comfreeze.lib.audio.SoundManager.java
net.comfreeze.lib.db.DatabaseHelper.java
net.comfreeze.lib.db.DatabaseTable.java
net.comfreeze.lib.db.helper.HelperCursor.java
net.comfreeze.lib.db.model.CFZModel.java
net.comfreeze.lib.db.model.FieldColumnMap.java
net.comfreeze.lib.fragments.CFZListFragment.java
net.comfreeze.lib.provider.CFZSimpleProvider.java
net.comfreeze.lib.service.CFZService.java
net.comfreeze.lib.ui.SupportFragmentActivity.java
net.comfreeze.lib.ui.dialog.CFZDialogProgress.java
net.comfreeze.lib.ui.fragment.CFZFragmentBase.java
net.comfreeze.lib.views.BiScrollView.java
net.comfreeze.lib.views.CFZViewHelper.java
net.comfreeze.lib.views.FlowLayout.java
net.comfreeze.lib.views.GestureHelper.java
net.comfreeze.lib.views.HeaderListView.java
net.comfreeze.lib.views.ResizingView.java
net.comfreeze.lib.views.ViewCollection.java
net.comfreeze.lib.views.ViewUtils.java
net.comfreeze.lib.xml.XMLParser.java
net.comfreeze.lib.xml.wordpress.FeedXmlParser.java