📄 discoitembuilder.java
字号:
package edu.ou.kmi.buddyspace.plugins.disco.xml;
/*
* DiscoItemBuilder.java
*
* Project: BuddySpace
* (C) Copyright Knowledge Media Institute 2003
*
*
* Created on 18 August 2003, 16:48
*/
import java.io.Serializable;
import java.util.*;
import org.jabber.jabberbeans.util.*;
import org.jabber.jabberbeans.*;
import org.jabber.jabberbeans.Extension.*;
import org.xml.sax.AttributeList;
import org.xml.sax.helpers.AttributeListImpl;
/**
* <code>DiscoItemBuilder</code> is used to construct DiscoItem objects
*
* @author Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
*/
public class DiscoItemBuilder implements ExtensionBuilder
{
/** XML base element attributes (including namespace) */
private AttributeListImpl attributes;
/*
* Construct a new <code>DiscoItemBuilder</code> object
*/
public DiscoItemBuilder()
{reset();}
/** reset this builder to a default state, for reuse */
public void reset() {
attributes = null;
}
/* returns given attribute */
public String getAttribute(String name) {
return (attributes == null || name == null)? null : attributes.getValue(name);
}
/* returns all attribute */
public AttributeList getAttributes() {
return attributes;
}
/* sets attributes */
public void setAttributes(AttributeList attributes) {
this.attributes = new AttributeListImpl(attributes);
}
/*
* Build a <code>DiscoItem</code> based on the current builder
* state.
*
* @return <code>DiscoItem</code> based on the current builder
* state.
*/
public Extension build() throws InstantiationException
{return new DiscoItem(this);}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -