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

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

?? contentmetadata.java

?? 適合初學者使用的cms和jxta方面的代碼
?? JAVA
字號:
/* * Copyright (c) 2001 Sun Microsystems, Inc.  All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, *    if any, must include the following acknowledgment: *       "This product includes software developed by the *       Sun Microsystems, Inc. for Project JXTA." *    Alternately, this acknowledgment may appear in the software itself, *    if and wherever such third-party acknowledgments normally appear. * * 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must *    not be used to endorse or promote products derived from this *    software without prior written permission. For written *    permission, please contact Project JXTA at http://www.jxta.org. * * 5. Products derived from this software may not be called "JXTA", *    nor may "JXTA" appear in their name, without prior written *    permission of Sun. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * *==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Project JXTA.  For more * information on Project JXTA, please see * <http://www.jxta.org/>. * * This license is based on the BSD license adopted by the Apache Foundation. * * $Id: ContentMetadata.java,v 1.4 2006/02/07 20:43:48 bondolo Exp $ * */package net.jxta.share.metadata;import net.jxta.document.*;import org.apache.log4j.*;import java.util.*;/** * ContentMetadata is an interface for classes used to store metadata for a * Content object.  A ContentAdvertisement can then use a ContentMetadata * implementation to generate a &lt;metadata> block and insert it inside * itself.  The StructuredTextDocument representation of a &lt;metadata> block * is as follows:<br><br> * *<code>&lt;metadata><br> *&nbsp;&nbsp;&lt;scheme><br> *&nbsp;&nbsp;&nbsp;&nbsp;&lt;name><i>scheme name</i>&lt;/name><br> *&nbsp;&nbsp;&nbsp;&nbsp;&lt;location><i>location of resource used to parse  * and query the scheme</i>&lt;/location><br> *&nbsp;&nbsp;&nbsp;&nbsp;&lt;content-type><i>content type of the raw metadata, * otherwise "text/litexml"</i>&lt;/content-type><br> *&nbsp;&nbsp;&lt;/scheme><br> *&nbsp;&nbsp;<i>metadata payload</i><br> *&lt;/metadata></code> * *@author $Author: bondolo $ *@version $Revision: 1.4 $ */public abstract class ContentMetadata implements java.io.Serializable {    private final static transient Logger LOG = Logger.getLogger(ContentMetadata.class.getName());    /**The name of the metadata element*/    public static final String EN_METADATA = "metadata";    /**The name of the scheme element*/    public static final String EN_SCHEME = "scheme";    /**The name of the name element*/    public static final String EN_NAME = "name";    /**The name of the content-type element*/    public static final String EN_CONTENT_TYPE = "content-type";    /**The name of the location element*/    public static final String EN_LOCATION = "location";    /**Factory method for generating a new MetadataQuery object that can be     * used to query instances of this class.     *@return A MetadataQuery object that can be used to query instances of     * this class, or null if no such object can be generated.  In the case of     * ContentMetadata.newQuery(), null is always returned because     * ContentMetadata is a generic container for metadata and defines no means     * of being queried.     *@exception IllegalArgumentException if query was not formatted properly.     */    public static MetadataQuery newQuery(String query)	throws IllegalArgumentException {	return null;    }    /**Get a ContentMetadataConstructor that can be used to create instances of     * this class, or null if no such object can be created.  This method     * should be overridden if there is a way of constructing this     * ContentMetadata class using an Element.     */    public static ContentMetadataConstructor getConstructor() {	return null;    }    /** Stores the name of the metadata scheme used*/    protected String name;        /** Stores the location of information defining the metadata scheme*/    protected String location;    /** Stores the content type of the metadata*/    protected String content_type;    /**Initialize the <code>name</code> <code>content_type</code> and     * <code>location</code> fields from a <code>&lt;metadata></code> block.     *@param metadata the <code>&lt;metadata></code> block     *@exception IllegalArgumentException if     * <code>metadata.getKey().equals(EN_METADATA)</code> returns false.     *@exception NullPointerException if <code>metadata</code> is null     */    protected void init(Element metadata) throws IllegalArgumentException {	if(metadata == null)	    throw new NullPointerException("null argument");	if(!metadata.getKey().equals(EN_METADATA))	    throw new IllegalArgumentException("invalid key name: "					       +metadata.getKey());	Element schemeEl;	Enumeration children = metadata.getChildren(EN_SCHEME);	if(children.hasMoreElements()) {	    schemeEl = (Element)children.nextElement();	    String sChildKey;	    Object temp;	    Element sChildEl;	    Enumeration sChildren = schemeEl.getChildren();	    while(sChildren.hasMoreElements()) {		sChildEl = (Element)sChildren.nextElement();		sChildKey = sChildEl.getKey().toString();		temp = sChildEl.getValue();		//if no value is set for an element, assume that the value is		// meant to be an empty string		if(temp == null)		    temp = "";		if(sChildKey.equals(EN_NAME)) {		    if((name != null) && (LOG.isEnabledFor(Level.WARN)))			LOG.warn("multiple <name> elements");		    name = temp.toString();		}else if(sChildKey.equals(EN_LOCATION)) {		    if((location != null) && (LOG.isEnabledFor(Level.WARN)))			LOG.warn("multiple <location> elements");		    location = temp.toString();		}else if(sChildKey.equals(EN_CONTENT_TYPE)) {		    if((content_type != null) &&		       (LOG.isEnabledFor(Level.WARN)) )			LOG.warn("multiple <content-type> elements");		    content_type = temp.toString();		}	    }	    	    //write to the log if either name or debug is empty or null	    if((name == null) && (LOG.isEnabledFor(Level.DEBUG)))		LOG.debug("scheme has undefined name");	    if((content_type == null) && (LOG.isEnabledFor(Level.DEBUG)))		LOG.debug("scheme has undefined content type");	} else if(LOG.isEnabledFor(Level.DEBUG)){	    LOG.debug("<scheme> element not found");	}		if(children.hasMoreElements() && LOG.isEnabledFor(Level.WARN))	    LOG.warn("multiple <scheme> elements");    }    /**Return the name of the metadata scheme being used by this object, or     * null if unspecified.     */    public String getName() {	return name;    }    /**Get the location of the resource that is needed to parse and query      * metadata using this scheme.     *@return a String representation of the URL location of the resource, or     * null if unspecified     */    public String getLocation() {	return location;    }        /**Get the content type of the metadata returned by getValue()     */    public String getContentType() {	return content_type;    }    /**@return the string representation of the metadata payload, or null if it     * has no string representation.     */    public abstract String getValue();    /**Insert this metadata element into an advertisement     *     *@param adv a StructuredDocument representation of the advertisement     *@param el the element in adv to insert this metadata element into     */    public void appendDocument(StructuredDocument adv, Element el) {	Element mEl = adv.createElement(EN_METADATA, this.getValue());	el.appendChild(mEl);	appendElements(adv, mEl);    }        /**This function defines how the child elements of this metadata element     * should be inserted into an element of a StructuredDocument.     *      * @param root the StructuredDocument which <code>child</code> is a part of     * @param child the Element object into which to insert the metadata     */    protected void appendElements(StructuredDocument root, Element child) {	//only add the <scheme> element if one of its subtags is non-null	if((name != null) || (location != null) || (content_type != null)) {	    Element schemeEl = root.createElement(EN_SCHEME);	    child.appendChild(schemeEl);		    if(name != null)		schemeEl.appendChild(root.createElement(EN_NAME, name));	    if(location != null)		schemeEl.appendChild(root.createElement(EN_LOCATION,location));		    if(content_type != null)		schemeEl.appendChild(root.createElement(EN_CONTENT_TYPE,						       content_type));	}    }        /**Generates a StructuredDocument representation of this metadata element     *      * @param mmt the mime type of the StructuredDocument to be returned     * @return a StructuredDocument of type <code>EN_METADATA</code> with     * containing all of the metadata information stored in this object.     */    public StructuredDocument getStructuredDocument(MimeMediaType mmt) {    	StructuredDocument doc    		= StructuredDocumentFactory.newStructuredDocument(mmt, EN_METADATA, getValue());    	appendElements(doc, doc);    	return doc;    }        /**A function for generating safe copies of this ContentMetadata object.     * This particular implementation of clone() will throw a     * CloneNotSupportedException every time, but it should be overridden if     * clone() functionality is needed in a subclass.     * @return a safe copy of this ContentMetadata object     */    public Object clone() throws CloneNotSupportedException {    	throw new CloneNotSupportedException();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃视频一区二区| 国产精品系列在线| 日韩av中文在线观看| 欧美在线观看一区二区| 亚洲va欧美va天堂v国产综合| 欧美日韩一区二区欧美激情| 午夜不卡av免费| 日韩欧美高清在线| 欧美日韩免费视频| 五月综合激情网| 精品区一区二区| 丁香另类激情小说| 一区二区不卡在线视频 午夜欧美不卡在| 一本大道久久a久久综合婷婷| 夜夜嗨av一区二区三区中文字幕| 666欧美在线视频| 国内久久精品视频| 亚洲欧洲一区二区在线播放| 欧美在线观看视频一区二区| 美女一区二区久久| 国产精品二三区| 欧美日韩一区二区三区免费看| 狠狠色综合色综合网络| 中文字幕中文在线不卡住| 欧美午夜视频网站| 国产一区二区三区不卡在线观看| 亚洲日本丝袜连裤袜办公室| 欧美大片在线观看一区| va亚洲va日韩不卡在线观看| 天堂在线一区二区| 国产精品美女视频| 在线成人av网站| thepron国产精品| 免费视频最近日韩| 亚洲黄色小视频| 2019国产精品| 欧美久久久久久久久久| 福利91精品一区二区三区| 天天色综合天天| 国产在线视频一区二区| 亚洲黄色在线视频| 国产欧美精品一区二区色综合朱莉| 欧美色老头old∨ideo| av不卡免费在线观看| 裸体在线国模精品偷拍| 依依成人综合视频| 国产精品短视频| 精品理论电影在线| 7777精品伊人久久久大香线蕉完整版 | 亚洲国产sm捆绑调教视频| 久久久久久夜精品精品免费| 欧美人体做爰大胆视频| 91一区二区在线| 国产盗摄视频一区二区三区| 蜜桃精品视频在线观看| 亚洲成a人在线观看| 日韩美女久久久| 国产精品美女久久久久av爽李琼| 日韩欧美久久一区| 这里只有精品视频在线观看| 欧美视频一区在线| 91丨九色丨国产丨porny| 成人高清在线视频| 国产精品一区二区不卡| 久久99精品国产.久久久久久| 亚洲国产色一区| 亚洲精品大片www| 亚洲黄色小说网站| 有码一区二区三区| 亚洲已满18点击进入久久| 亚洲天堂成人在线观看| 中文字幕亚洲区| 国产精品看片你懂得| 欧美激情综合在线| 国产三级一区二区三区| 久久久久久久久久久黄色| 国产日韩v精品一区二区| 久久久激情视频| 欧美—级在线免费片| 中文字幕免费观看一区| 国产欧美精品一区二区色综合 | 亚洲日本欧美天堂| 亚洲三级理论片| 一区二区成人在线视频| 婷婷六月综合网| 蜜臀av一级做a爰片久久| 日韩高清在线电影| 精品一区二区免费看| 国产一区视频在线看| 国产99久久久国产精品| 成人福利电影精品一区二区在线观看| 国产成人精品免费一区二区| 成人精品在线视频观看| 色婷婷综合久色| 88在线观看91蜜桃国自产| 精品国产一区二区亚洲人成毛片| 欧美精品一区二区三| 国产女人18毛片水真多成人如厕| 日韩美女久久久| 日韩av成人高清| 日韩精品一二三区| 日本一区二区三区四区| 亚洲精品综合在线| 天天综合色天天综合色h| 色偷偷久久人人79超碰人人澡| 色系网站成人免费| 日韩欧美aaaaaa| 国产精品欧美综合在线| 亚洲一级二级三级在线免费观看| 日韩av电影免费观看高清完整版| 国产精品一区三区| 色综合色综合色综合| 日韩三级免费观看| 国产精品国产自产拍高清av王其| 成人欧美一区二区三区黑人麻豆| 亚洲国产欧美日韩另类综合| 久久99国产精品久久| 91啪在线观看| 精品国产99国产精品| 专区另类欧美日韩| 国产一区福利在线| 在线免费av一区| 国产女主播视频一区二区| 亚洲一区二区av电影| 国产精品91xxx| 欧美美女一区二区三区| 欧美激情一区二区三区在线| 亚洲成人777| 国产高清亚洲一区| 91精品国产综合久久久久久漫画| 国产欧美日韩视频在线观看| 亚洲成人高清在线| 色综合一区二区| 欧美—级在线免费片| 久久国产欧美日韩精品| 欧美午夜免费电影| 国产精品麻豆欧美日韩ww| 久久精品国产秦先生| 欧美无人高清视频在线观看| 国产精品久久久99| 国内不卡的二区三区中文字幕| 精品视频123区在线观看| 中文字幕人成不卡一区| 紧缚奴在线一区二区三区| 欧美日韩久久不卡| 亚洲欧美二区三区| 成人精品小蝌蚪| 日韩成人一区二区三区在线观看| www.欧美日韩| 中国av一区二区三区| 国产在线一区观看| 日韩三级精品电影久久久| 婷婷开心激情综合| 欧美绝品在线观看成人午夜影视| 亚洲一卡二卡三卡四卡| 色乱码一区二区三区88| 亚洲视频狠狠干| www.亚洲在线| 中文字幕乱码日本亚洲一区二区| 九色|91porny| 日韩美女在线视频| 毛片av中文字幕一区二区| 7878成人国产在线观看| 香蕉影视欧美成人| 欧美日韩精品久久久| 亚洲国产精品一区二区尤物区| 91麻豆.com| 一区二区三区国产豹纹内裤在线| 91亚洲精品久久久蜜桃| 亚洲丝袜制服诱惑| 91麻豆国产香蕉久久精品| 亚洲欧美日韩国产综合| 在线免费观看视频一区| 一二三区精品福利视频| 91国产丝袜在线播放| 亚洲图片一区二区| 7777精品伊人久久久大香线蕉| 日韩国产一二三区| 欧美va天堂va视频va在线| 极品少妇一区二区| 久久九九全国免费| 91亚洲大成网污www| 亚洲一区二区免费视频| 7799精品视频| 国产成人精品影视| 日韩理论片网站| 欧美午夜片在线看| 久久疯狂做爰流白浆xx| 国产欧美日韩一区二区三区在线观看| 99综合电影在线视频| 一区二区日韩av| 日韩午夜激情av| 国产成人综合网| 亚洲男人的天堂一区二区 | 成人av资源在线| 亚洲一区免费观看| 欧美白人最猛性xxxxx69交| 国产精品自在欧美一区| 午夜视频在线观看一区二区三区| 国产伦精品一区二区三区免费|