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

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

?? collection.java

?? dspace 用j2ee架構的一個數字圖書館.開源程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * Collection.java * * Version: $Revision: 1.56 $ * * Date: $Date: 2005/11/17 19:02:04 $ * * 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.*;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.ConfigurationManager;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;import org.dspace.workflow.WorkflowItem;/** * Class representing a collection. * <P> * The collection's metadata (name, introductory text etc), workflow groups, and * default group of submitters are loaded into memory. Changes to metadata are * not written to the database until <code>update</code> is called. If you * create or remove a workflow group, the change is only reflected in the * database after calling <code>update</code>. The default group of * submitters is slightly different - creating or removing this has instant * effect. *  * @author Robert Tansley * @version $Revision: 1.56 $ */public class Collection extends DSpaceObject{    /** log4j category */    private static Logger log = Logger.getLogger(Collection.class);    /** Our context */    private Context ourContext;    /** The table row corresponding to this item */    private TableRow collectionRow;    /** The logo bitstream */    private Bitstream logo;    /** The item template */    private Item template;    /** Our Handle */    private String handle;    /**     * Groups corresponding to workflow steps - NOTE these start from one, so     * workflowGroups[0] corresponds to workflow_step_1.     */    private Group[] workflowGroup;    /** The default group of submitters */    private Group submitters;    /** The default group of administrators */    private Group admins;    /**     * Construct a collection with the given table row     *      * @param context     *            the context this object exists in     * @param row     *            the corresponding row in the table     * @throws SQLException     */    Collection(Context context, TableRow row) throws SQLException    {        ourContext = context;        collectionRow = row;        // Get the logo bitstream        if (collectionRow.isColumnNull("logo_bitstream_id"))        {            logo = null;        }        else        {            logo = Bitstream.find(ourContext, collectionRow                    .getIntColumn("logo_bitstream_id"));        }        // Get the template item        if (collectionRow.isColumnNull("template_item_id"))        {            template = null;        }        else        {            template = Item.find(ourContext, collectionRow                    .getIntColumn("template_item_id"));        }        // Get the relevant groups        workflowGroup = new Group[3];        workflowGroup[0] = groupFromColumn("workflow_step_1");        workflowGroup[1] = groupFromColumn("workflow_step_2");        workflowGroup[2] = groupFromColumn("workflow_step_3");        submitters = groupFromColumn("submitter");        admins = groupFromColumn("admin");                // Get our Handle if any        handle = HandleManager.findHandle(context, this);        // Cache ourselves        context.cache(this, row.getIntColumn("collection_id"));    }    /**     * Get a collection from the database. Loads in the metadata     *      * @param context     *            DSpace context object     * @param id     *            ID of the collection     *      * @return the collection, or null if the ID is invalid.     * @throws SQLException     */    public static Collection find(Context context, int id) throws SQLException    {        // First check the cache        Collection fromCache = (Collection) context.fromCache(Collection.class,                id);        if (fromCache != null)        {            return fromCache;        }        TableRow row = DatabaseManager.find(context, "collection", id);        if (row == null)        {            if (log.isDebugEnabled())            {                log.debug(LogManager.getHeader(context, "find_collection",                        "not_found,collection_id=" + id));            }            return null;        }        // not null, return Collection        if (log.isDebugEnabled())        {            log.debug(LogManager.getHeader(context, "find_collection",                    "collection_id=" + id));        }        return new Collection(context, row);    }    /**     * Create a new collection, with a new ID. This method is not public, and     * does not check authorisation.     *      * @param context     *            DSpace context object     *      * @return the newly created collection     * @throws SQLException     * @throws AuthorizeException     */    static Collection create(Context context) throws SQLException,            AuthorizeException    {        TableRow row = DatabaseManager.create(context, "collection");        Collection c = new Collection(context, row);        c.handle = HandleManager.createHandle(context, c);        // create the default authorization policy for collections        // 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();        // now create the default policies for submitted items        myPolicy = ResourcePolicy.create(context);        myPolicy.setResource(c);        myPolicy.setAction(Constants.DEFAULT_ITEM_READ);        myPolicy.setGroup(anonymousGroup);        myPolicy.update();        myPolicy = ResourcePolicy.create(context);        myPolicy.setResource(c);        myPolicy.setAction(Constants.DEFAULT_BITSTREAM_READ);        myPolicy.setGroup(anonymousGroup);        myPolicy.update();        HistoryManager.saveHistory(context, c, HistoryManager.CREATE, context                .getCurrentUser(), context.getExtraLogInfo());        log.info(LogManager.getHeader(context, "create_collection",                "collection_id=" + row.getIntColumn("collection_id"))                + ",handle=" + c.handle);        return c;    }    /**     * Get all collections in the system. These are alphabetically sorted by     * collection name.     *      * @param context     *            DSpace context object     *      * @return the collections in the system     * @throws SQLException     */    public static Collection[] findAll(Context context) throws SQLException    {        TableRowIterator tri = DatabaseManager.query(context, "collection",                "SELECT * FROM collection ORDER BY name");        List collections = new ArrayList();        while (tri.hasNext())        {            TableRow row = tri.next();            // First check the cache            Collection fromCache = (Collection) context.fromCache(                    Collection.class, row.getIntColumn("collection_id"));            if (fromCache != null)            {                collections.add(fromCache);            }            else            {                collections.add(new Collection(context, row));            }        }        // close the TableRowIterator to free up resources        tri.close();        Collection[] collectionArray = new Collection[collections.size()];        collectionArray = (Collection[]) collections.toArray(collectionArray);        return collectionArray;    }    /**     * Get all the items in this collection. The order is indeterminate.     *      * @return an iterator over the items in the collection.     * @throws SQLException     */    public ItemIterator getItems() throws SQLException    {        String myQuery = "SELECT item.* FROM item, collection2item WHERE "                + "item.item_id=collection2item.item_id AND "                + "collection2item.collection_id=" + getID()                + " AND item.in_archive='1'";        TableRowIterator rows = DatabaseManager.query(ourContext, "item",                myQuery);        return new ItemIterator(ourContext, rows);    }    /**     * Get the internal ID of this collection     *      * @return the internal identifier     */    public int getID()    {        return collectionRow.getIntColumn("collection_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     *      * @exception IllegalArgumentException     *                if the requested metadata field doesn't exist     */    public String getMetadata(String field)    {        return collectionRow.getStringColumn(field);    }    /**     * Set a metadata value     *      * @param field     *            the name of the metadata field to get     * @param value     *            value to set the field to     *      * @exception IllegalArgumentException     *                if the requested metadata field doesn't exist     */    public void setMetadata(String field, String value)    {        collectionRow.setColumn(field, value);    }    /**     * Get the logo for the collection. <code>null</code> is return if the     * collection does not have a logo.     *      * @return the logo of the collection, or <code>null</code>     */    public Bitstream getLogo()    {        return logo;    }    /**     * Give the collection a logo. Passing in <code>null</code> removes any     * existing logo. You will need to set the format of the new logo bitstream     * before it will work, for example to "JPEG". Note that     * <code>update(/code> will need to be called for the change to take

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品 日产精品 欧美精品| 一区二区在线观看免费视频播放| 色噜噜偷拍精品综合在线| 国产一区二区三区国产| 麻豆成人久久精品二区三区红| 亚洲一区二区三区视频在线| 亚洲综合激情另类小说区| 日本视频免费一区| 视频一区中文字幕| 日本成人中文字幕在线视频| 日韩电影网1区2区| 久久机这里只有精品| 麻豆精品一二三| 精品一区二区三区免费| 国产精品亚洲视频| 97精品电影院| 欧美日韩国产一二三| 日韩精品一区二区在线观看| 日韩欧美一级片| 国产欧美综合在线观看第十页| 中文字幕乱码亚洲精品一区 | 一区二区三区不卡在线观看| 亚洲青青青在线视频| 亚洲精品日韩专区silk| 亚洲第一狼人社区| 久久黄色级2电影| 国产福利不卡视频| 91蜜桃在线免费视频| 欧美男人的天堂一二区| 久久综合色之久久综合| 日韩理论片在线| 视频一区二区三区中文字幕| 国产一区二三区好的| 91亚洲精品乱码久久久久久蜜桃| 欧美性色综合网| 久久综合视频网| 亚洲视频每日更新| 精品一区二区三区免费毛片爱| 国产福利精品导航| 91精品国产色综合久久不卡蜜臀 | 国产成人精品一区二区三区四区| 97久久精品人人做人人爽50路| 欧美三级中文字幕在线观看| 26uuu国产一区二区三区| 亚洲精品视频免费看| 久久超碰97中文字幕| 99精品国产99久久久久久白柏| 欧美一区二区在线免费观看| 一区在线观看视频| 极品销魂美女一区二区三区| 在线免费不卡视频| 久久久亚洲国产美女国产盗摄| 一区二区三区在线观看视频| 韩国午夜理伦三级不卡影院| 91精品福利在线| 国产精品免费人成网站| 蜜桃视频一区二区| 欧美日韩国产在线观看| 亚洲日穴在线视频| 波多野结衣中文字幕一区| 欧美丰满少妇xxxbbb| 亚洲自拍与偷拍| av一本久道久久综合久久鬼色| 日韩精品专区在线影院观看 | 日韩欧美www| 亚洲综合色区另类av| 99r精品视频| 国产精品亲子乱子伦xxxx裸| 激情深爱一区二区| 精品国产一区二区三区忘忧草| 日韩精品免费专区| 欧美日韩一区不卡| 偷拍一区二区三区| 欧美日韩另类国产亚洲欧美一级| 1区2区3区精品视频| 成人av综合一区| 国产精品美女一区二区| 成人在线综合网| 国产精品色在线| 菠萝蜜视频在线观看一区| 国产精品视频第一区| 成人av综合在线| 一区二区三区四区不卡视频| 欧美在线观看一二区| 亚洲午夜在线电影| 欧美精品777| 久久av资源网| 国产欧美精品区一区二区三区| 丁香啪啪综合成人亚洲小说 | 97超碰欧美中文字幕| 亚洲免费在线播放| 欧美三级三级三级爽爽爽| 三级久久三级久久| 精品国精品国产| 成人午夜又粗又硬又大| 综合网在线视频| 在线观看视频一区二区欧美日韩| 亚洲五码中文字幕| 精品国产一区二区在线观看| 成人网页在线观看| 九一九一国产精品| 国产无遮挡一区二区三区毛片日本| 狠狠色综合播放一区二区| 国产精品污www在线观看| 91久久精品国产91性色tv | 91精品国产综合久久小美女| 奇米影视一区二区三区| 亚洲国产高清aⅴ视频| 在线看日本不卡| 精品亚洲国内自在自线福利| 国产精品丝袜一区| 欧美久久久久久久久中文字幕| 免费在线观看一区二区三区| 中文字幕精品—区二区四季| 欧美性videosxxxxx| 国产又黄又大久久| 亚洲自拍偷拍图区| 国产欧美精品一区二区色综合朱莉| 日本大香伊一区二区三区| 国内成+人亚洲+欧美+综合在线| 亚洲精品免费播放| 久久久噜噜噜久久中文字幕色伊伊| 色婷婷国产精品久久包臀| 久久99在线观看| 亚洲成av人综合在线观看| 中文一区一区三区高中清不卡| 3d动漫精品啪啪1区2区免费| 99久久精品免费精品国产| 麻豆久久一区二区| 婷婷综合久久一区二区三区| 中文字幕五月欧美| 久久久久久久综合日本| 日韩一区二区三区精品视频| 欧美专区在线观看一区| 成年人国产精品| 国产成人一级电影| 国产一区在线看| 免费三级欧美电影| 日韩av在线免费观看不卡| 亚洲一级电影视频| 亚洲精选一二三| 亚洲欧洲色图综合| 中文字幕在线一区| 欧美韩日一区二区三区四区| 欧美精品一区二区在线观看| 欧美一区二区三区在线视频| 欧美色图12p| 欧美熟乱第一页| 欧美午夜片在线看| 欧美日韩免费一区二区三区视频| av电影在线观看不卡| 成人高清在线视频| av电影一区二区| 91亚洲精品久久久蜜桃| 色天天综合色天天久久| 色偷偷久久人人79超碰人人澡| 91免费观看在线| 欧美一区二区三区在线观看视频| 91精品国模一区二区三区| 欧美一级爆毛片| 欧美va天堂va视频va在线| 欧美不卡在线视频| 久久久久久久一区| 欧美国产精品一区二区| 亚洲欧洲日韩在线| 亚洲一区二区成人在线观看| 日韩精品高清不卡| 久久成人免费网站| 高清在线观看日韩| 一本色道久久综合精品竹菊 | 亚洲成av人**亚洲成av**| 亚洲一线二线三线视频| 日韩不卡一区二区三区| 精品一区精品二区高清| 粉嫩aⅴ一区二区三区四区| 成人美女视频在线看| 在线观看欧美精品| 56国语精品自产拍在线观看| 精品国产三级a在线观看| 欧美激情在线观看视频免费| 亚洲人成亚洲人成在线观看图片| 亚洲成a人v欧美综合天堂| 黑人巨大精品欧美一区| 91色.com| 欧美xxxxx牲另类人与| 亚洲色图欧洲色图| 蜜桃av噜噜一区二区三区小说| 懂色av一区二区夜夜嗨| 欧美在线你懂的| 国产日韩欧美一区二区三区乱码 | 日韩欧美中文一区| 中文字幕的久久| 日本不卡一二三| 99热在这里有精品免费| 91麻豆精品国产91久久久久久久久 | 精品亚洲国产成人av制服丝袜| 99久久精品国产毛片| 欧美一区二区三区视频免费 | 六月婷婷色综合| 在线一区二区视频|