Examples of optJSONObject()


Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public JSONObject getUpper(final String id) throws RepositoryException {
        final JSONObject link = get(id);
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (1 != array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public JSONObject getUnder(final String id) throws RepositoryException {
        final JSONObject link = get(id);
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (1 != array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }
}
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }
}
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public List<JSONObject> getArchiveDates() throws RepositoryException {
        final org.b3log.latke.repository.Query query = new Query().addSort(ArchiveDate.ARCHIVE_TIME, SortDirection.DESCENDING).setPageCount(
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public int getMaxOrder() throws RepositoryException {
        final Query query = new Query();
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return -1;
        }

        return array.optJSONObject(0).optInt(Link.LINK_ORDER);
    }

    @Override
    public JSONObject getByOrder(final int order) throws RepositoryException {
        final Query query = new Query();
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public List<JSONObject> getMostUsedTags(final int num) throws RepositoryException {
        final Query query = new Query().addSort(Tag.TAG_PUBLISHED_REFERENCE_COUNT, SortDirection.DESCENDING).setCurrentPageNum(1).setPageSize(num).setPageCount(
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (0 == array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public JSONObject getUpper(final String id) throws RepositoryException {
        final JSONObject link = get(id);
View Full Code Here

Examples of org.json.JSONArray.optJSONObject()

        if (1 != array.length()) {
            return null;
        }

        return array.optJSONObject(0);
    }

    @Override
    public JSONObject getUnder(final String id) throws RepositoryException {
        final JSONObject link = get(id);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.