亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? community.java

?? dspace 用j2ee架構的一個數字圖書館.開源程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * Community.java * * Version: $Revision: 1.35 $ * * Date: $Date: 2005/07/19 18:47:13 $ * * Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts * Institute of Technology.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither the name of the Hewlett-Packard Company nor the name of the * Massachusetts Institute of Technology nor the names of their * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */package org.dspace.content;import java.io.IOException;import java.io.InputStream;import java.sql.SQLException;import java.util.ArrayList;import java.util.List;import org.apache.log4j.Logger;import org.dspace.authorize.AuthorizeException;import org.dspace.authorize.AuthorizeManager;import org.dspace.authorize.ResourcePolicy;import org.dspace.core.Constants;import org.dspace.core.Context;import org.dspace.core.LogManager;import org.dspace.eperson.Group;import org.dspace.handle.HandleManager;import org.dspace.history.HistoryManager;import org.dspace.search.DSIndexer;import org.dspace.storage.rdbms.DatabaseManager;import org.dspace.storage.rdbms.TableRow;import org.dspace.storage.rdbms.TableRowIterator;/** * Class representing a community * <P> * The community's metadata (name, introductory text etc.) is loaded into' * memory. Changes to this metadata are only reflected in the database after * <code>update</code> is called. *  * @author Robert Tansley * @version $Revision: 1.35 $ */public class Community extends DSpaceObject{    /** log4j category */    private static Logger log = Logger.getLogger(Community.class);    /** Our context */    private Context ourContext;    /** The table row corresponding to this item */    private TableRow communityRow;    /** The logo bitstream */    private Bitstream logo;    /** Handle, if any */    private String handle;    /**     * Construct a community object from a database row.     *      * @param context     *            the context this object exists in     * @param row     *            the corresponding row in the table     */    Community(Context context, TableRow row) throws SQLException    {        ourContext = context;        communityRow = row;        // Get the logo bitstream        if (communityRow.isColumnNull("logo_bitstream_id"))        {            logo = null;        }        else        {            logo = Bitstream.find(ourContext, communityRow                    .getIntColumn("logo_bitstream_id"));        }        // Get our Handle if any        handle = HandleManager.findHandle(context, this);        // Cache ourselves        context.cache(this, row.getIntColumn("community_id"));    }    /**     * Get a community from the database. Loads in the metadata     *      * @param context     *            DSpace context object     * @param id     *            ID of the community     *      * @return the community, or null if the ID is invalid.     */    public static Community find(Context context, int id) throws SQLException    {        // First check the cache        Community fromCache = (Community) context                .fromCache(Community.class, id);        if (fromCache != null)        {            return fromCache;        }        TableRow row = DatabaseManager.find(context, "community", id);        if (row == null)        {            if (log.isDebugEnabled())            {                log.debug(LogManager.getHeader(context, "find_community",                        "not_found,community_id=" + id));            }            return null;        }        else        {            if (log.isDebugEnabled())            {                log.debug(LogManager.getHeader(context, "find_community",                        "community_id=" + id));            }            return new Community(context, row);        }    }    /**     * Create a new community, with a new ID.     *      * @param context     *            DSpace context object     *      * @return the newly created community     */    public static Community create(Community parent, Context context)            throws SQLException, AuthorizeException    {        // Only administrators and adders can create communities        if (!(AuthorizeManager.isAdmin(context) || AuthorizeManager                .authorizeActionBoolean(context, parent, Constants.ADD)))        {            throw new AuthorizeException(                    "Only administrators can create communities");        }        TableRow row = DatabaseManager.create(context, "community");        Community c = new Community(context, row);        c.handle = HandleManager.createHandle(context, c);        // create the default authorization policy for communities        // of 'anonymous' READ        Group anonymousGroup = Group.find(context, 0);        ResourcePolicy myPolicy = ResourcePolicy.create(context);        myPolicy.setResource(c);        myPolicy.setAction(Constants.READ);        myPolicy.setGroup(anonymousGroup);        myPolicy.update();        HistoryManager.saveHistory(context, c, HistoryManager.CREATE, context                .getCurrentUser(), context.getExtraLogInfo());        log.info(LogManager.getHeader(context, "create_community",                "community_id=" + row.getIntColumn("community_id"))                + ",handle=" + c.handle);        return c;    }    /**     * Get a list of all communities in the system. These are alphabetically     * sorted by community name.     *      * @param context     *            DSpace context object     *      * @return the communities in the system     */    public static Community[] findAll(Context context) throws SQLException    {        TableRowIterator tri = DatabaseManager.query(context, "community",                "SELECT * FROM community ORDER BY name");        List communities = new ArrayList();        while (tri.hasNext())        {            TableRow row = tri.next();            // First check the cache            Community fromCache = (Community) context.fromCache(                    Community.class, row.getIntColumn("community_id"));            if (fromCache != null)            {                communities.add(fromCache);            }            else            {                communities.add(new Community(context, row));            }        }        // close the TableRowIterator to free up resources        tri.close();        Community[] communityArray = new Community[communities.size()];        communityArray = (Community[]) communities.toArray(communityArray);        return communityArray;    }    /**     * Get a list of all top-level communities in the system. These are     * alphabetically sorted by community name. A top-level community is one     * without a parent community.     *      * @param context     *            DSpace context object     *      * @return the top-level communities in the system     */    public static Community[] findAllTop(Context context) throws SQLException    {        // get all communities that are not children        TableRowIterator tri = DatabaseManager.query(context, "community",                "SELECT * FROM community WHERE NOT community_id IN "                        + "(SELECT child_comm_id FROM community2community) "                        + "ORDER BY name");        List topCommunities = new ArrayList();        while (tri.hasNext())        {            TableRow row = tri.next();            // First check the cache            Community fromCache = (Community) context.fromCache(                    Community.class, row.getIntColumn("community_id"));            if (fromCache != null)            {                topCommunities.add(fromCache);            }            else            {                topCommunities.add(new Community(context, row));            }        }        // close the TableRowIterator to free up resources        tri.close();        Community[] communityArray = new Community[topCommunities.size()];        communityArray = (Community[]) topCommunities.toArray(communityArray);        return communityArray;    }    /**     * Get the internal ID of this collection     *      * @return the internal identifier     */    public int getID()    {        return communityRow.getIntColumn("community_id");    }    public String getHandle()    {        return handle;    }    /**     * Get the value of a metadata field     *      * @param field     *            the name of the metadata field to get     *      * @return the value of the metadata field     * 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区在线视频观看| 国产欧美日韩亚州综合| 暴力调教一区二区三区| 国产福利一区在线| 国产精品1024久久| 成人国产免费视频| 成人精品免费网站| 99精品视频一区| 91麻豆免费视频| 91高清视频免费看| 欧美性受xxxx| 日韩一级免费一区| 久久综合色一综合色88| 久久蜜桃av一区精品变态类天堂| 日韩欧美一区在线| 久久免费电影网| 国产精品对白交换视频| 一区二区视频免费在线观看| 亚洲高清在线视频| 精品一区二区三区的国产在线播放| 狠狠狠色丁香婷婷综合久久五月| 国产成人99久久亚洲综合精品| 不卡的av在线播放| 色婷婷综合久久久久中文| 欧美人与性动xxxx| 精品国产污网站| 亚洲人成电影网站色mp4| 亚洲va韩国va欧美va精品| 免费久久精品视频| 成人h动漫精品一区二| 欧美日韩免费不卡视频一区二区三区| 这里只有精品视频在线观看| 久久九九久久九九| 亚洲电影一级片| 韩国欧美国产一区| 色综合久久久久综合体桃花网| 欧美精品aⅴ在线视频| 久久久精品一品道一区| 一区二区三区在线观看国产| 久久69国产一区二区蜜臀| 99久久精品国产毛片| 91精品国产综合久久精品麻豆 | 亚洲成人av在线电影| 麻豆专区一区二区三区四区五区| 成人听书哪个软件好| 欧美三级资源在线| 国产精品卡一卡二卡三| 日本系列欧美系列| 色婷婷久久久亚洲一区二区三区| 欧美电视剧在线看免费| 一区二区国产盗摄色噜噜| 国产麻豆精品久久一二三| 欧美日韩在线播放| 亚洲丝袜自拍清纯另类| 国内精品免费**视频| 欧美老肥妇做.爰bbww| 国产精品久久777777| 久久97超碰国产精品超碰| 欧美日韩在线播放三区四区| 中文字幕一区二区三区蜜月| 精品一区二区三区在线视频| 欧美高清视频不卡网| 亚洲品质自拍视频| 不卡一区二区三区四区| 久久久久国色av免费看影院| 麻豆成人av在线| 欧美一级久久久| 日日摸夜夜添夜夜添亚洲女人| 99精品欧美一区二区三区小说 | 99视频精品全部免费在线| 精品久久久久久久久久久院品网 | 韩国三级电影一区二区| 91精品国产综合久久婷婷香蕉 | 日韩免费性生活视频播放| 亚洲图片欧美色图| 欧美亚洲高清一区| 亚洲精品国产精华液| 在线观看日产精品| 亚洲成人资源网| 欧美亚洲另类激情小说| 亚洲一区二区三区四区在线| 欧美偷拍一区二区| 午夜精品福利一区二区三区av | 国产精品中文字幕一区二区三区| 日韩一区二区三区电影在线观看| 免费高清视频精品| 26uuu亚洲婷婷狠狠天堂| 国产在线日韩欧美| 国产欧美一区二区精品秋霞影院| 国产91综合网| 亚洲乱码一区二区三区在线观看| 一本久道中文字幕精品亚洲嫩| 亚洲资源在线观看| 欧美精品一二三区| 精品一区二区三区在线观看国产| 久久久久久久av麻豆果冻| gogogo免费视频观看亚洲一| 亚洲综合无码一区二区| 欧美日韩国产高清一区二区| 免费观看一级欧美片| 久久久久久久久久久黄色| 成人精品鲁一区一区二区| 亚洲人成在线观看一区二区| 欧美电影在线免费观看| 国产精品99久久久久久有的能看| 亚洲欧洲99久久| 欧美巨大另类极品videosbest | 天天综合色天天综合| 日韩精品一区二区三区蜜臀| 成人性视频免费网站| 一区二区三区四区亚洲| 日韩一区二区免费在线电影| 成人午夜av影视| 奇米精品一区二区三区四区 | 亚洲国产综合人成综合网站| 日韩小视频在线观看专区| aaa亚洲精品| 蜜臀国产一区二区三区在线播放| 亚洲国产精品激情在线观看| 欧美日韩夫妻久久| 成人黄色小视频| 免费成人结看片| 亚洲女人小视频在线观看| 欧美成人午夜电影| 欧美日韩在线三级| 成年人网站91| 国产伦精品一区二区三区免费| 一区二区三区在线观看动漫 | 一本久久综合亚洲鲁鲁五月天| 蜜桃av噜噜一区| 亚洲综合免费观看高清完整版在线| 久久只精品国产| 欧美日韩国产高清一区| 91女神在线视频| 国产91精品一区二区| 精品一区二区成人精品| 亚洲成精国产精品女| 亚洲激情校园春色| 亚洲欧洲国产专区| 国产精品久久毛片av大全日韩| 精品欧美乱码久久久久久| 欧美日产在线观看| 色综合天天天天做夜夜夜夜做| 久久99日本精品| 亚洲国产精品一区二区www在线| 国产欧美精品一区二区色综合| 精品卡一卡二卡三卡四在线| 欧美一区二区在线播放| 欧美精品色一区二区三区| 在线看一区二区| 欧美亚洲图片小说| 欧美日韩一区二区在线视频| 在线亚洲一区二区| 在线观看亚洲a| 欧美伊人久久久久久午夜久久久久| 91年精品国产| 色一区在线观看| 在线免费观看视频一区| 欧洲一区二区av| 制服丝袜一区二区三区| 91精品在线麻豆| 精品国一区二区三区| 久久久久久99精品| 国产精品欧美综合在线| 亚洲视频一区二区在线观看| 亚洲女同ⅹxx女同tv| 亚洲国产婷婷综合在线精品| 亚洲妇女屁股眼交7| 青青青伊人色综合久久| 美女任你摸久久 | av电影一区二区| 色哦色哦哦色天天综合| 欧美图区在线视频| 日韩欧美不卡在线观看视频| 久久久亚洲午夜电影| 亚洲色图欧美偷拍| 亚洲不卡av一区二区三区| 美女在线视频一区| 国产精品一卡二| 91麻豆免费看| 日韩一区二区三区高清免费看看| www久久久久| 1000精品久久久久久久久| 亚洲成人免费在线| 国产麻豆精品一区二区| 91看片淫黄大片一级| 91精品国产日韩91久久久久久| 久久综合丝袜日本网| 亚洲欧美日韩一区二区| 青青国产91久久久久久| av在线不卡网| 欧美一区二区视频观看视频| 国产欧美精品一区二区色综合| 悠悠色在线精品| 精品一区二区免费| 欧美日韩精品欧美日韩精品一 | 国产精品久久久久一区二区三区| 午夜亚洲福利老司机| 国产91在线|亚洲| 欧美区一区二区三区|