📄 iqservicesbuilder.java
字号:
/*
* License
*
* The contents of this file are subject to the Jabber Open Source License
* Version 1.0 (the "License"). You may not copy or use this file, in either
* source code or executable form, except in compliance with the License. You
* may obtain a copy of the License at http://www.jabber.com/license/ or at
* http://www.opensource.org/.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Copyrights
*
* Portions created by or assigned to Jabber.com, Inc. are
* Copyright (c) 2000 Jabber.com, Inc. All Rights Reserved. Contact
* information for Jabber.com, Inc. is available at http://www.jabber.com/.
*
* Portions Copyright (c) 1999-2000 David Waite
*
* Acknowledgements
*
* Special thanks to the Jabber Open Source Contributors for their
* suggestions and support of Jabber.
*
* Changes
*
* @author $Author: chris $
* @version $Revision: 1.1 $
*
* j.komzak
* Changed into IQServicesBuilder.
*/
package edu.ou.kmi.buddyspace.xml;
import java.util.*;
import org.jabber.jabberbeans.Extension.Extension;
import org.jabber.jabberbeans.Extension.HashExtensionBuilder;
/**
* An <code>IQServicesBuilder</code> is used by BuddySpace for services namespace.
*
* @see QueryExtension
*
* @author David Waite <a href="mailto:dwaite@jabber.com">
* <i><dwaite@jabber.com></i></a>
* @author $Author: chris $
* @version $Revision: 1.1 $
*
* @author Jiri Komzak <a href="mailto:j.komzak@open.ac.uk">
* <i><j.komzak@open.ac.uk></i></a>
* @author $Author: chris $
* @version $Revision: 1.1 $
*/
public class IQServicesBuilder extends HashExtensionBuilder {
/** Vector of extension objects contained. */
private Vector extensions;
/** is this query or x **/
private boolean iq;
/**
* Construct a new IQServicesExtensionBuilder object
*/
public IQServicesBuilder()
{
super();
reset();
}
/**
* <code>reset</code> clears all data values (sets to null), so that the
* builder may be reused.
*/
public void reset()
{
super.reset();
extensions = new Vector();
}
/**
* <code>addExtension</code> adds a new child tag object to the end of this
* list.
*
* @param layer an <code>Extension</code> value
*/
public void addExtension(Extension extension)
{
if (!extensions.contains(extension))
extensions.addElement(extension);
}
/**
* <code>extensions</code> returns the vector representing the extensions
* objects associated with this object.
*
* @return a <code>Vector</code> value
*/
public Vector extensions() {
return extensions;
}
public boolean isIQ() {
return iq;
}
public void setIQ(boolean iq) {
this.iq = iq;
}
/**
* Construct an <code>IQServices</code> extension object
*
* @return Extension object based on current internal state of the builder
*/
public Extension build()
throws InstantiationException
{
return new IQServices(this);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -