📄 scripts.java
字号:
/* * Copyright 2006-2007 Queplix Corp. * * Licensed under the Queplix Public License, Version 1.1.1 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.queplix.com/solutions/commercial-open-source/queplix-public-license/ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. *//* * This class was automatically generated with * <a href="http://www.castor.org">Castor 0.9.7</a>, using an XML * Schema. * $Id$ */package com.queplix.core.modules.services.jxb; //---------------------------------/ //- Imported classes and packages -///---------------------------------/import java.io.IOException;import java.io.Reader;import java.io.Serializable;import java.io.Writer;import java.util.ArrayList;import java.util.Enumeration;import org.exolab.castor.xml.MarshalException;import org.exolab.castor.xml.Marshaller;import org.exolab.castor.xml.Unmarshaller;import org.exolab.castor.xml.ValidationException;import org.xml.sax.ContentHandler;/** * The root element * * @version $Revision$ $Date$ */public class Scripts extends com.queplix.core.utils.jxb.JXBObject implements java.io.Serializable{ //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * The custom script description */ private java.util.ArrayList _scriptList; //----------------/ //- Constructors -/ //----------------/ public Scripts() { super(); _scriptList = new ArrayList(); } //-- com.queplix.core.modules.services.jxb.Scripts() //-----------/ //- Methods -/ //-----------/ /** * Method addScript * * * * @param vScript */ public void addScript(com.queplix.core.modules.services.jxb.Script vScript) throws java.lang.IndexOutOfBoundsException { _scriptList.add(vScript); } //-- void addScript(com.queplix.core.modules.services.jxb.Script) /** * Method addScript * * * * @param index * @param vScript */ public void addScript(int index, com.queplix.core.modules.services.jxb.Script vScript) throws java.lang.IndexOutOfBoundsException { _scriptList.add(index, vScript); } //-- void addScript(int, com.queplix.core.modules.services.jxb.Script) /** * Method clearScript * */ public void clearScript() { _scriptList.clear(); } //-- void clearScript() /** * Method enumerateScript * * * * @return Enumeration */ public java.util.Enumeration enumerateScript() { return new org.exolab.castor.util.IteratorEnumeration(_scriptList.iterator()); } //-- java.util.Enumeration enumerateScript() /** * Method getScript * * * * @param index * @return Script */ public com.queplix.core.modules.services.jxb.Script getScript(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _scriptList.size())) { throw new IndexOutOfBoundsException(); } return (com.queplix.core.modules.services.jxb.Script) _scriptList.get(index); } //-- com.queplix.core.modules.services.jxb.Script getScript(int) /** * Method getScript * * * * @return Script */ public com.queplix.core.modules.services.jxb.Script[] getScript() { int size = _scriptList.size(); com.queplix.core.modules.services.jxb.Script[] mArray = new com.queplix.core.modules.services.jxb.Script[size]; for (int index = 0; index < size; index++) { mArray[index] = (com.queplix.core.modules.services.jxb.Script) _scriptList.get(index); } return mArray; } //-- com.queplix.core.modules.services.jxb.Script[] getScript() /** * Method getScriptCount * * * * @return int */ public int getScriptCount() { return _scriptList.size(); } //-- int getScriptCount() /** * Method isValid * * * * @return boolean */ public boolean isValid() { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } //-- boolean isValid() /** * Method marshal * * * * @param out */ public void marshal(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } //-- void marshal(java.io.Writer) /** * Method marshal * * * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeScript * * * * @param vScript * @return boolean */ public boolean removeScript(com.queplix.core.modules.services.jxb.Script vScript) { boolean removed = _scriptList.remove(vScript); return removed; } //-- boolean removeScript(com.queplix.core.modules.services.jxb.Script) /** * Method setScript * * * * @param index * @param vScript */ public void setScript(int index, com.queplix.core.modules.services.jxb.Script vScript) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _scriptList.size())) { throw new IndexOutOfBoundsException(); } _scriptList.set(index, vScript); } //-- void setScript(int, com.queplix.core.modules.services.jxb.Script) /** * Method setScript * * * * @param scriptArray */ public void setScript(com.queplix.core.modules.services.jxb.Script[] scriptArray) { //-- copy array _scriptList.clear(); for (int i = 0; i < scriptArray.length; i++) { _scriptList.add(scriptArray[i]); } } //-- void setScript(com.queplix.core.modules.services.jxb.Script) /** * Method unmarshal * * * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (com.queplix.core.modules.services.jxb.Scripts) Unmarshaller.unmarshal(com.queplix.core.modules.services.jxb.Scripts.class, reader); } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate * */ public void validate() throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); } //-- void validate() }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -