0001: /*
0002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003: *
0004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005: *
0006: * The contents of this file are subject to the terms of either the GNU
0007: * General Public License Version 2 only ("GPL") or the Common
0008: * Development and Distribution License("CDDL") (collectively, the
0009: * "License"). You may not use this file except in compliance with the
0010: * License. You can obtain a copy of the License at
0011: * http://www.netbeans.org/cddl-gplv2.html
0012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013: * specific language governing permissions and limitations under the
0014: * License. When distributing the software, include this License Header
0015: * Notice in each file and include the License file at
0016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
0017: * particular file as subject to the "Classpath" exception as provided
0018: * by Sun in the GPL Version 2 section of the License file that
0019: * accompanied this code. If applicable, add the following below the
0020: * License Header, with the fields enclosed by brackets [] replaced by
0021: * your own identifying information:
0022: * "Portions Copyrighted [year] [name of copyright owner]"
0023: *
0024: * Contributor(s):
0025: *
0026: * The Original Software is NetBeans. The Initial Developer of the Original
0027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
0028: * Microsystems, Inc. All Rights Reserved.
0029: *
0030: * If you wish your version of this file to be governed by only the CDDL
0031: * or only the GPL Version 2, indicate your decision by adding
0032: * "[Contributor] elects to include this software in this distribution
0033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034: * single choice of license, a recipient has the option to distribute
0035: * your version of this file under either the CDDL, the GPL Version 2 or
0036: * to extend the choice of license to its licensees as provided above.
0037: * However, if you add GPL Version 2 code and therefore, elected the GPL
0038: * Version 2 license, then the option applies only if the new code is
0039: * made subject to such option by the copyright holder.
0040: */
0041: /**
0042: * This generated bean class CCollab
0043: * matches the schema element 'c:collab'.
0044: *
0045: * Generated on Mon Sep 27 16:53:13 PDT 2004
0046: *
0047: * This class matches the root element of the XML Schema,
0048: * and is the root of the bean graph.
0049: *
0050: * c:collab : CCollab
0051: * version : java.lang.String
0052: * | ch:send-file : SendFile?
0053: * | file-groups : FileGroups
0054: * | file-group : FileGroup[1,n]
0055: * | file-group-name : java.lang.String
0056: * | user : User
0057: * | id : java.lang.String
0058: * | name : java.lang.String?
0059: * | description : java.lang.String?
0060: * | file-name : java.lang.String[1,n]
0061: * | send-file-data : SendFileData[1,n]
0062: * | file-data : FileData
0063: * | file-name : java.lang.String
0064: * | content-type : java.lang.String
0065: * | description : java.lang.String?
0066: * | choose-line-region-function : boolean
0067: * | | line-region-function : LineRegionFunction
0068: * | | funtion-name : java.lang.String
0069: * | | arguments : java.lang.String[1,n]
0070: * | | line-region : LineRegion[1,n]
0071: * | | region-name : java.lang.String
0072: * | content : Content
0073: * | encoding : java.lang.String
0074: * | digest : java.lang.String
0075: * | data : java.lang.String
0076: * | ch:file-changed : FileChanged?
0077: * | file-groups : FileGroups
0078: * | file-group : FileGroup[1,n]
0079: * | file-group-name : java.lang.String
0080: * | user : User
0081: * | id : java.lang.String
0082: * | name : java.lang.String?
0083: * | description : java.lang.String?
0084: * | file-name : java.lang.String[1,n]
0085: * | file-changed-data : FileChangedData[1,n]
0086: * | file-name : java.lang.String
0087: * | digest : java.lang.String
0088: * | region-changed : RegionChanged[1,n]
0089: * | | text-region-changed : TextRegionChanged
0090: * | | text-region : TextRegion
0091: * | | region-name : java.lang.String
0092: * | | begin-offset : java.math.BigInteger
0093: * | | length : java.math.BigInteger
0094: * | | text-change : TextChange
0095: * | | | change-texts : ChangeTexts
0096: * | | | remove-texts : RemoveTexts
0097: * | | | remove-text : RemoveText[1,n]
0098: * | | | offset : java.math.BigInteger
0099: * | | | insert-texts : InsertTexts
0100: * | | | insert-text : InsertText[1,n]
0101: * | | | offset : java.math.BigInteger
0102: * | | | content : Content
0103: * | | | encoding : java.lang.String
0104: * | | | digest : java.lang.String
0105: * | | | data : java.lang.String
0106: * | | | content : Content
0107: * | | | encoding : java.lang.String
0108: * | | | digest : java.lang.String
0109: * | | | data : java.lang.String
0110: * | | java-region-changed : JavaRegionChanged
0111: * | | java-region : JavaRegion
0112: * | | region-name : java.lang.String
0113: * | | begin-offset : java.math.BigInteger
0114: * | | length : java.math.BigInteger
0115: * | | java-change : JavaChange
0116: * | | | change-texts : ChangeTexts
0117: * | | | remove-texts : RemoveTexts
0118: * | | | remove-text : RemoveText[1,n]
0119: * | | | offset : java.math.BigInteger
0120: * | | | insert-texts : InsertTexts
0121: * | | | insert-text : InsertText[1,n]
0122: * | | | offset : java.math.BigInteger
0123: * | | | content : Content
0124: * | | | encoding : java.lang.String
0125: * | | | digest : java.lang.String
0126: * | | | data : java.lang.String
0127: * | | | content : Content
0128: * | | | encoding : java.lang.String
0129: * | | | digest : java.lang.String
0130: * | | | data : java.lang.String
0131: * | | line-region-changed : LineRegionChanged
0132: * | | line-region : LineRegion
0133: * | | region-name : java.lang.String
0134: * | | line-change : LineChange
0135: * | | content : Content
0136: * | | encoding : java.lang.String
0137: * | | digest : java.lang.String
0138: * | | data : java.lang.String
0139: * | ch:lock-region : LockRegion?
0140: * | file-groups : FileGroups
0141: * | file-group : FileGroup[1,n]
0142: * | file-group-name : java.lang.String
0143: * | user : User
0144: * | id : java.lang.String
0145: * | name : java.lang.String?
0146: * | description : java.lang.String?
0147: * | file-name : java.lang.String[1,n]
0148: * | lock-region-data : LockRegionData[1,n]
0149: * | file-name : java.lang.String
0150: * | line-region : LineRegion[1,n]
0151: * | | region-name : java.lang.String
0152: * | | text-region : TextRegion
0153: * | | region-name : java.lang.String
0154: * | | begin-offset : java.math.BigInteger
0155: * | | length : java.math.BigInteger
0156: * | | java-region : JavaRegion
0157: * | | region-name : java.lang.String
0158: * | | begin-offset : java.math.BigInteger
0159: * | | length : java.math.BigInteger
0160: * | content : Content
0161: * | encoding : java.lang.String
0162: * | digest : java.lang.String
0163: * | data : java.lang.String
0164: * | ch:unlock-region : UnlockRegion?
0165: * | file-groups : FileGroups
0166: * | file-group : FileGroup[1,n]
0167: * | file-group-name : java.lang.String
0168: * | user : User
0169: * | id : java.lang.String
0170: * | name : java.lang.String?
0171: * | description : java.lang.String?
0172: * | file-name : java.lang.String[1,n]
0173: * | unlock-region-data : UnlockRegionData[1,n]
0174: * | file-name : java.lang.String
0175: * | line-region : LineRegion[1,n]
0176: * | | region-name : java.lang.String
0177: * | | text-region : TextRegion
0178: * | | region-name : java.lang.String
0179: * | | begin-offset : java.math.BigInteger
0180: * | | length : java.math.BigInteger
0181: * | | java-region : JavaRegion
0182: * | | region-name : java.lang.String
0183: * | | begin-offset : java.math.BigInteger
0184: * | | length : java.math.BigInteger
0185: * | content : Content
0186: * | encoding : java.lang.String
0187: * | digest : java.lang.String
0188: * | data : java.lang.String
0189: * | ch:join-filesharing : JoinFilesharing?
0190: * | | begin-join : boolean?
0191: * | | end-join : boolean?
0192: * | user : User
0193: * | id : java.lang.String
0194: * | name : java.lang.String?
0195: * | description : java.lang.String?
0196: * | ch:pause-filesharing : PauseFilesharing?
0197: * | join-user : JoinUser
0198: * | user : User
0199: * | id : java.lang.String
0200: * | name : java.lang.String?
0201: * | description : java.lang.String?
0202: * | moderator : Moderator
0203: * | users : Users
0204: * | user : User[0,n]
0205: * | id : java.lang.String
0206: * | name : java.lang.String?
0207: * | description : java.lang.String?
0208: * | file-owners : FileOwners
0209: * | users : Users
0210: * | user : User[0,n]
0211: * | id : java.lang.String
0212: * | name : java.lang.String?
0213: * | description : java.lang.String?
0214: * | users : Users
0215: * | user : User[0,n]
0216: * | id : java.lang.String
0217: * | name : java.lang.String?
0218: * | description : java.lang.String?
0219: * | file-groups : FileGroups
0220: * | file-group : FileGroup[1,n]
0221: * | file-group-name : java.lang.String
0222: * | user : User
0223: * | id : java.lang.String
0224: * | name : java.lang.String?
0225: * | description : java.lang.String?
0226: * | file-name : java.lang.String[1,n]
0227: * | ch:resume-filesharing : ResumeFilesharing?
0228: * | moderator : Moderator
0229: * | users : Users
0230: * | user : User[0,n]
0231: * | id : java.lang.String
0232: * | name : java.lang.String?
0233: * | description : java.lang.String?
0234: * | ch:leave-filesharing : LeaveFilesharing?
0235: * | user : User
0236: * | id : java.lang.String
0237: * | name : java.lang.String?
0238: * | description : java.lang.String?
0239: * | new-moderator : Moderator
0240: * | users : Users
0241: * | user : User[0,n]
0242: * | id : java.lang.String
0243: * | name : java.lang.String?
0244: * | description : java.lang.String?
0245: * | new-file-owner : NewFileOwner
0246: * | users : Users
0247: * | user : User[0,n]
0248: * | id : java.lang.String
0249: * | name : java.lang.String?
0250: * | description : java.lang.String?
0251: * | file-groups : FileGroups
0252: * | file-group : FileGroup[1,n]
0253: * | file-group-name : java.lang.String
0254: * | user : User
0255: * | id : java.lang.String
0256: * | name : java.lang.String?
0257: * | description : java.lang.String?
0258: * | file-name : java.lang.String[1,n]
0259: * | ch:commands : Commands?
0260: * | filesystem-command : FilesystemCommand
0261: * | delete-file : DeleteFile
0262: * | file-name : java.lang.String
0263: *
0264: */package org.netbeans.modules.collab.channel.filesharing.msgbean;
0265:
0266: public class CCollab {
0267: private java.lang.String _Version;
0268: private SendFile _ChSendFile;
0269: private FileChanged _ChFileChanged;
0270: private LockRegion _ChLockRegion;
0271: private UnlockRegion _ChUnlockRegion;
0272: private JoinFilesharing _ChJoinFilesharing;
0273: private PauseFilesharing _ChPauseFilesharing;
0274: private ResumeFilesharing _ChResumeFilesharing;
0275: private LeaveFilesharing _ChLeaveFilesharing;
0276: private Commands _ChCommands;
0277:
0278: public CCollab() {
0279: _Version = "";
0280: }
0281:
0282: // Deep copy
0283: public CCollab(
0284: org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab source) {
0285: _Version = source._Version;
0286: _ChSendFile = new org.netbeans.modules.collab.channel.filesharing.msgbean.SendFile(
0287: source._ChSendFile);
0288: _ChFileChanged = new org.netbeans.modules.collab.channel.filesharing.msgbean.FileChanged(
0289: source._ChFileChanged);
0290: _ChLockRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegion(
0291: source._ChLockRegion);
0292: _ChUnlockRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.UnlockRegion(
0293: source._ChUnlockRegion);
0294: _ChJoinFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.JoinFilesharing(
0295: source._ChJoinFilesharing);
0296: _ChPauseFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.PauseFilesharing(
0297: source._ChPauseFilesharing);
0298: _ChResumeFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.ResumeFilesharing(
0299: source._ChResumeFilesharing);
0300: _ChLeaveFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.LeaveFilesharing(
0301: source._ChLeaveFilesharing);
0302: _ChCommands = new org.netbeans.modules.collab.channel.filesharing.msgbean.Commands(
0303: source._ChCommands);
0304: }
0305:
0306: // This attribute is mandatory
0307: public void setVersion(java.lang.String value) {
0308: _Version = value;
0309: }
0310:
0311: public java.lang.String getVersion() {
0312: return _Version;
0313: }
0314:
0315: // This attribute is optional
0316: public void setChSendFile(
0317: org.netbeans.modules.collab.channel.filesharing.msgbean.SendFile value) {
0318: _ChSendFile = value;
0319: }
0320:
0321: public org.netbeans.modules.collab.channel.filesharing.msgbean.SendFile getChSendFile() {
0322: return _ChSendFile;
0323: }
0324:
0325: // This attribute is optional
0326: public void setChFileChanged(
0327: org.netbeans.modules.collab.channel.filesharing.msgbean.FileChanged value) {
0328: _ChFileChanged = value;
0329: }
0330:
0331: public org.netbeans.modules.collab.channel.filesharing.msgbean.FileChanged getChFileChanged() {
0332: return _ChFileChanged;
0333: }
0334:
0335: // This attribute is optional
0336: public void setChLockRegion(
0337: org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegion value) {
0338: _ChLockRegion = value;
0339: }
0340:
0341: public org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegion getChLockRegion() {
0342: return _ChLockRegion;
0343: }
0344:
0345: // This attribute is optional
0346: public void setChUnlockRegion(
0347: org.netbeans.modules.collab.channel.filesharing.msgbean.UnlockRegion value) {
0348: _ChUnlockRegion = value;
0349: }
0350:
0351: public org.netbeans.modules.collab.channel.filesharing.msgbean.UnlockRegion getChUnlockRegion() {
0352: return _ChUnlockRegion;
0353: }
0354:
0355: // This attribute is optional
0356: public void setChJoinFilesharing(
0357: org.netbeans.modules.collab.channel.filesharing.msgbean.JoinFilesharing value) {
0358: _ChJoinFilesharing = value;
0359: }
0360:
0361: public org.netbeans.modules.collab.channel.filesharing.msgbean.JoinFilesharing getChJoinFilesharing() {
0362: return _ChJoinFilesharing;
0363: }
0364:
0365: // This attribute is optional
0366: public void setChPauseFilesharing(
0367: org.netbeans.modules.collab.channel.filesharing.msgbean.PauseFilesharing value) {
0368: _ChPauseFilesharing = value;
0369: }
0370:
0371: public org.netbeans.modules.collab.channel.filesharing.msgbean.PauseFilesharing getChPauseFilesharing() {
0372: return _ChPauseFilesharing;
0373: }
0374:
0375: // This attribute is optional
0376: public void setChResumeFilesharing(
0377: org.netbeans.modules.collab.channel.filesharing.msgbean.ResumeFilesharing value) {
0378: _ChResumeFilesharing = value;
0379: }
0380:
0381: public org.netbeans.modules.collab.channel.filesharing.msgbean.ResumeFilesharing getChResumeFilesharing() {
0382: return _ChResumeFilesharing;
0383: }
0384:
0385: // This attribute is optional
0386: public void setChLeaveFilesharing(
0387: org.netbeans.modules.collab.channel.filesharing.msgbean.LeaveFilesharing value) {
0388: _ChLeaveFilesharing = value;
0389: }
0390:
0391: public org.netbeans.modules.collab.channel.filesharing.msgbean.LeaveFilesharing getChLeaveFilesharing() {
0392: return _ChLeaveFilesharing;
0393: }
0394:
0395: // This attribute is optional
0396: public void setChCommands(
0397: org.netbeans.modules.collab.channel.filesharing.msgbean.Commands value) {
0398: _ChCommands = value;
0399: }
0400:
0401: public org.netbeans.modules.collab.channel.filesharing.msgbean.Commands getChCommands() {
0402: return _ChCommands;
0403: }
0404:
0405: public void write(java.io.OutputStream out)
0406: throws java.io.IOException {
0407: write(out, null);
0408: }
0409:
0410: public void write(java.io.OutputStream out, String encoding)
0411: throws java.io.IOException {
0412: java.io.Writer w;
0413:
0414: if (encoding == null) {
0415: encoding = "UTF-8"; // NOI18N
0416: }
0417:
0418: w = new java.io.BufferedWriter(new java.io.OutputStreamWriter(
0419: out, encoding));
0420: write(w, encoding);
0421: w.flush();
0422: }
0423:
0424: // Print this Java Bean to @param out including an XML header.
0425: // @param encoding is the encoding style that @param out was opened with.
0426: public void write(java.io.Writer out, String encoding)
0427: throws java.io.IOException {
0428: out.write("<?xml version='1.0'"); // NOI18N
0429:
0430: if (encoding != null) {
0431: out.write(" encoding='" + encoding + "'"); // NOI18N
0432: }
0433:
0434: out.write(" ?>\n"); // NOI18N
0435: writeNode(out, "c:collab", ""); // NOI18N
0436: }
0437:
0438: public void writeNode(java.io.Writer out, String nodeName,
0439: String indent) throws java.io.IOException {
0440: out.write(indent);
0441: out.write("<");
0442: out.write(nodeName);
0443: out.write(" xmlns='"); // NOI18N
0444: out.write("http://sun.com/ns/collab/dev/1_0/filesharing"); // NOI18N
0445: out.write("'"); // NOI18N
0446: out.write(">\n");
0447:
0448: String nextIndent = indent + " ";
0449:
0450: if (_Version != null) {
0451: out.write(nextIndent);
0452: out.write("<version"); // NOI18N
0453: out.write(">"); // NOI18N
0454: org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab
0455: .writeXML(out, _Version, false);
0456: out.write("</version>\n"); // NOI18N
0457: }
0458:
0459: if (_ChSendFile != null) {
0460: _ChSendFile.writeNode(out, "ch:send-file", nextIndent);
0461: }
0462:
0463: if (_ChFileChanged != null) {
0464: _ChFileChanged
0465: .writeNode(out, "ch:file-changed", nextIndent);
0466: }
0467:
0468: if (_ChLockRegion != null) {
0469: _ChLockRegion.writeNode(out, "ch:lock-region", nextIndent);
0470: }
0471:
0472: if (_ChUnlockRegion != null) {
0473: _ChUnlockRegion.writeNode(out, "ch:unlock-region",
0474: nextIndent);
0475: }
0476:
0477: if (_ChJoinFilesharing != null) {
0478: _ChJoinFilesharing.writeNode(out, "ch:join-filesharing",
0479: nextIndent);
0480: }
0481:
0482: if (_ChPauseFilesharing != null) {
0483: _ChPauseFilesharing.writeNode(out, "ch:pause-filesharing",
0484: nextIndent);
0485: }
0486:
0487: if (_ChResumeFilesharing != null) {
0488: _ChResumeFilesharing.writeNode(out,
0489: "ch:resume-filesharing", nextIndent);
0490: }
0491:
0492: if (_ChLeaveFilesharing != null) {
0493: _ChLeaveFilesharing.writeNode(out, "ch:leave-filesharing",
0494: nextIndent);
0495: }
0496:
0497: if (_ChCommands != null) {
0498: _ChCommands.writeNode(out, "ch:commands", nextIndent);
0499: }
0500:
0501: out.write(indent);
0502: out.write("</" + nodeName + ">\n");
0503: }
0504:
0505: public static CCollab read(java.io.InputStream in)
0506: throws javax.xml.parsers.ParserConfigurationException,
0507: org.xml.sax.SAXException, java.io.IOException {
0508: return read(new org.xml.sax.InputSource(in), false, null, null);
0509: }
0510:
0511: // Warning: in readNoEntityResolver character and entity references will
0512: // not be read from any DTD in the XML source.
0513: // However, this way is faster since no DTDs are looked up
0514: // (possibly skipping network access) or parsed.
0515: public static CCollab readNoEntityResolver(java.io.InputStream in)
0516: throws javax.xml.parsers.ParserConfigurationException,
0517: org.xml.sax.SAXException, java.io.IOException {
0518: return read(new org.xml.sax.InputSource(in), false,
0519: new org.xml.sax.EntityResolver() {
0520: public org.xml.sax.InputSource resolveEntity(
0521: String publicId, String systemId) {
0522: java.io.ByteArrayInputStream bin = new java.io.ByteArrayInputStream(
0523: new byte[0]);
0524:
0525: return new org.xml.sax.InputSource(bin);
0526: }
0527: }, null);
0528: }
0529:
0530: public static CCollab read(org.xml.sax.InputSource in,
0531: boolean validate, org.xml.sax.EntityResolver er,
0532: org.xml.sax.ErrorHandler eh)
0533: throws javax.xml.parsers.ParserConfigurationException,
0534: org.xml.sax.SAXException, java.io.IOException {
0535: javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory
0536: .newInstance();
0537: dbf.setValidating(validate);
0538:
0539: javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
0540:
0541: if (er != null) {
0542: db.setEntityResolver(er);
0543: }
0544:
0545: if (eh != null) {
0546: db.setErrorHandler(eh);
0547: }
0548:
0549: org.w3c.dom.Document doc = db.parse(in);
0550:
0551: return read(doc);
0552: }
0553:
0554: public static CCollab read(org.w3c.dom.Document document) {
0555: CCollab aCCollab = new CCollab();
0556: aCCollab.readNode(document.getDocumentElement());
0557:
0558: return aCCollab;
0559: }
0560:
0561: public void readNode(org.w3c.dom.Node node) {
0562: org.w3c.dom.NodeList children = node.getChildNodes();
0563:
0564: for (int i = 0, size = children.getLength(); i < size; ++i) {
0565: org.w3c.dom.Node childNode = children.item(i);
0566: String childNodeName = ((childNode.getLocalName() == null) ? childNode
0567: .getNodeName().intern()
0568: : childNode.getLocalName().intern());
0569: String childNodeValue = "";
0570:
0571: if (childNode.getFirstChild() != null) {
0572: childNodeValue = childNode.getFirstChild()
0573: .getNodeValue();
0574: }
0575:
0576: if (childNodeName == "version") {
0577: _Version = childNodeValue;
0578: } else if (childNodeName == "ch:send-file") {
0579: _ChSendFile = new org.netbeans.modules.collab.channel.filesharing.msgbean.SendFile();
0580: _ChSendFile.readNode(childNode);
0581: } else if (childNodeName == "ch:file-changed") {
0582: _ChFileChanged = new org.netbeans.modules.collab.channel.filesharing.msgbean.FileChanged();
0583: _ChFileChanged.readNode(childNode);
0584: } else if (childNodeName == "ch:lock-region") {
0585: _ChLockRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegion();
0586: _ChLockRegion.readNode(childNode);
0587: } else if (childNodeName == "ch:unlock-region") {
0588: _ChUnlockRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.UnlockRegion();
0589: _ChUnlockRegion.readNode(childNode);
0590: } else if (childNodeName == "ch:join-filesharing") {
0591: _ChJoinFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.JoinFilesharing();
0592: _ChJoinFilesharing.readNode(childNode);
0593: } else if (childNodeName == "ch:pause-filesharing") {
0594: _ChPauseFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.PauseFilesharing();
0595: _ChPauseFilesharing.readNode(childNode);
0596: } else if (childNodeName == "ch:resume-filesharing") {
0597: _ChResumeFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.ResumeFilesharing();
0598: _ChResumeFilesharing.readNode(childNode);
0599: } else if (childNodeName == "ch:leave-filesharing") {
0600: _ChLeaveFilesharing = new org.netbeans.modules.collab.channel.filesharing.msgbean.LeaveFilesharing();
0601: _ChLeaveFilesharing.readNode(childNode);
0602: } else if (childNodeName == "ch:commands") {
0603: _ChCommands = new org.netbeans.modules.collab.channel.filesharing.msgbean.Commands();
0604: _ChCommands.readNode(childNode);
0605: } else {
0606: // Found extra unrecognized childNode
0607: }
0608: }
0609: }
0610:
0611: // Takes some text to be printed into an XML stream and escapes any
0612: // characters that might make it invalid XML (like '<').
0613: public static void writeXML(java.io.Writer out, String msg)
0614: throws java.io.IOException {
0615: writeXML(out, msg, true);
0616: }
0617:
0618: public static void writeXML(java.io.Writer out, String msg,
0619: boolean attribute) throws java.io.IOException {
0620: if (msg == null) {
0621: return;
0622: }
0623:
0624: int msgLength = msg.length();
0625:
0626: for (int i = 0; i < msgLength; ++i) {
0627: char c = msg.charAt(i);
0628: writeXML(out, c, attribute);
0629: }
0630: }
0631:
0632: public static void writeXML(java.io.Writer out, char msg,
0633: boolean attribute) throws java.io.IOException {
0634: if (msg == '&') {
0635: out.write("&");
0636: } else if (msg == '<') {
0637: out.write("<");
0638: } else if (msg == '>') {
0639: out.write(">");
0640: } else if (attribute && (msg == '"')) {
0641: out.write(""");
0642: } else if (attribute && (msg == '\'')) {
0643: out.write("'");
0644: } else if (attribute && (msg == '\n')) {
0645: out.write("
");
0646: } else if (attribute && (msg == '\t')) {
0647: out.write("	");
0648: } else {
0649: out.write(msg);
0650: }
0651: }
0652:
0653: public void changePropertyByName(String name, Object value) {
0654: if (name == null) {
0655: return;
0656: }
0657:
0658: name = name.intern();
0659:
0660: if (name == "version") {
0661: setVersion((java.lang.String) value);
0662: } else if (name == "chSendFile") {
0663: setChSendFile((SendFile) value);
0664: } else if (name == "chFileChanged") {
0665: setChFileChanged((FileChanged) value);
0666: } else if (name == "chLockRegion") {
0667: setChLockRegion((LockRegion) value);
0668: } else if (name == "chUnlockRegion") {
0669: setChUnlockRegion((UnlockRegion) value);
0670: } else if (name == "chJoinFilesharing") {
0671: setChJoinFilesharing((JoinFilesharing) value);
0672: } else if (name == "chPauseFilesharing") {
0673: setChPauseFilesharing((PauseFilesharing) value);
0674: } else if (name == "chResumeFilesharing") {
0675: setChResumeFilesharing((ResumeFilesharing) value);
0676: } else if (name == "chLeaveFilesharing") {
0677: setChLeaveFilesharing((LeaveFilesharing) value);
0678: } else if (name == "chCommands") {
0679: setChCommands((Commands) value);
0680: } else {
0681: throw new IllegalArgumentException(name
0682: + " is not a valid property name for CCollab");
0683: }
0684: }
0685:
0686: public Object fetchPropertyByName(String name) {
0687: if (name == "version") {
0688: return getVersion();
0689: }
0690:
0691: if (name == "chSendFile") {
0692: return getChSendFile();
0693: }
0694:
0695: if (name == "chFileChanged") {
0696: return getChFileChanged();
0697: }
0698:
0699: if (name == "chLockRegion") {
0700: return getChLockRegion();
0701: }
0702:
0703: if (name == "chUnlockRegion") {
0704: return getChUnlockRegion();
0705: }
0706:
0707: if (name == "chJoinFilesharing") {
0708: return getChJoinFilesharing();
0709: }
0710:
0711: if (name == "chPauseFilesharing") {
0712: return getChPauseFilesharing();
0713: }
0714:
0715: if (name == "chResumeFilesharing") {
0716: return getChResumeFilesharing();
0717: }
0718:
0719: if (name == "chLeaveFilesharing") {
0720: return getChLeaveFilesharing();
0721: }
0722:
0723: if (name == "chCommands") {
0724: return getChCommands();
0725: }
0726:
0727: throw new IllegalArgumentException(name
0728: + " is not a valid property name for CCollab");
0729: }
0730:
0731: // Return an array of all of the properties that are beans and are set.
0732: public java.lang.Object[] childBeans(boolean recursive) {
0733: java.util.List children = new java.util.LinkedList();
0734: childBeans(recursive, children);
0735:
0736: java.lang.Object[] result = new java.lang.Object[children
0737: .size()];
0738:
0739: return (java.lang.Object[]) children.toArray(result);
0740: }
0741:
0742: // Put all child beans into the beans list.
0743: public void childBeans(boolean recursive, java.util.List beans) {
0744: if (_ChSendFile != null) {
0745: if (recursive) {
0746: _ChSendFile.childBeans(true, beans);
0747: }
0748:
0749: beans.add(_ChSendFile);
0750: }
0751:
0752: if (_ChFileChanged != null) {
0753: if (recursive) {
0754: _ChFileChanged.childBeans(true, beans);
0755: }
0756:
0757: beans.add(_ChFileChanged);
0758: }
0759:
0760: if (_ChLockRegion != null) {
0761: if (recursive) {
0762: _ChLockRegion.childBeans(true, beans);
0763: }
0764:
0765: beans.add(_ChLockRegion);
0766: }
0767:
0768: if (_ChUnlockRegion != null) {
0769: if (recursive) {
0770: _ChUnlockRegion.childBeans(true, beans);
0771: }
0772:
0773: beans.add(_ChUnlockRegion);
0774: }
0775:
0776: if (_ChJoinFilesharing != null) {
0777: if (recursive) {
0778: _ChJoinFilesharing.childBeans(true, beans);
0779: }
0780:
0781: beans.add(_ChJoinFilesharing);
0782: }
0783:
0784: if (_ChPauseFilesharing != null) {
0785: if (recursive) {
0786: _ChPauseFilesharing.childBeans(true, beans);
0787: }
0788:
0789: beans.add(_ChPauseFilesharing);
0790: }
0791:
0792: if (_ChResumeFilesharing != null) {
0793: if (recursive) {
0794: _ChResumeFilesharing.childBeans(true, beans);
0795: }
0796:
0797: beans.add(_ChResumeFilesharing);
0798: }
0799:
0800: if (_ChLeaveFilesharing != null) {
0801: if (recursive) {
0802: _ChLeaveFilesharing.childBeans(true, beans);
0803: }
0804:
0805: beans.add(_ChLeaveFilesharing);
0806: }
0807:
0808: if (_ChCommands != null) {
0809: if (recursive) {
0810: _ChCommands.childBeans(true, beans);
0811: }
0812:
0813: beans.add(_ChCommands);
0814: }
0815: }
0816:
0817: public boolean equals(Object o) {
0818: if (o == this ) {
0819: return true;
0820: }
0821:
0822: if (!(o instanceof org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab)) {
0823: return false;
0824: }
0825:
0826: org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab inst = (org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab) o;
0827:
0828: if (!((_Version == null) ? (inst._Version == null) : _Version
0829: .equals(inst._Version))) {
0830: return false;
0831: }
0832:
0833: if (!((_ChSendFile == null) ? (inst._ChSendFile == null)
0834: : _ChSendFile.equals(inst._ChSendFile))) {
0835: return false;
0836: }
0837:
0838: if (!((_ChFileChanged == null) ? (inst._ChFileChanged == null)
0839: : _ChFileChanged.equals(inst._ChFileChanged))) {
0840: return false;
0841: }
0842:
0843: if (!((_ChLockRegion == null) ? (inst._ChLockRegion == null)
0844: : _ChLockRegion.equals(inst._ChLockRegion))) {
0845: return false;
0846: }
0847:
0848: if (!((_ChUnlockRegion == null) ? (inst._ChUnlockRegion == null)
0849: : _ChUnlockRegion.equals(inst._ChUnlockRegion))) {
0850: return false;
0851: }
0852:
0853: if (!((_ChJoinFilesharing == null) ? (inst._ChJoinFilesharing == null)
0854: : _ChJoinFilesharing.equals(inst._ChJoinFilesharing))) {
0855: return false;
0856: }
0857:
0858: if (!((_ChPauseFilesharing == null) ? (inst._ChPauseFilesharing == null)
0859: : _ChPauseFilesharing.equals(inst._ChPauseFilesharing))) {
0860: return false;
0861: }
0862:
0863: if (!((_ChResumeFilesharing == null) ? (inst._ChResumeFilesharing == null)
0864: : _ChResumeFilesharing
0865: .equals(inst._ChResumeFilesharing))) {
0866: return false;
0867: }
0868:
0869: if (!((_ChLeaveFilesharing == null) ? (inst._ChLeaveFilesharing == null)
0870: : _ChLeaveFilesharing.equals(inst._ChLeaveFilesharing))) {
0871: return false;
0872: }
0873:
0874: if (!((_ChCommands == null) ? (inst._ChCommands == null)
0875: : _ChCommands.equals(inst._ChCommands))) {
0876: return false;
0877: }
0878:
0879: return true;
0880: }
0881:
0882: public int hashCode() {
0883: int result = 17;
0884: result = (37 * result)
0885: + ((_Version == null) ? 0 : _Version.hashCode());
0886: result = (37 * result)
0887: + ((_ChSendFile == null) ? 0 : _ChSendFile.hashCode());
0888: result = (37 * result)
0889: + ((_ChFileChanged == null) ? 0 : _ChFileChanged
0890: .hashCode());
0891: result = (37 * result)
0892: + ((_ChLockRegion == null) ? 0 : _ChLockRegion
0893: .hashCode());
0894: result = (37 * result)
0895: + ((_ChUnlockRegion == null) ? 0 : _ChUnlockRegion
0896: .hashCode());
0897: result = (37 * result)
0898: + ((_ChJoinFilesharing == null) ? 0
0899: : _ChJoinFilesharing.hashCode());
0900: result = (37 * result)
0901: + ((_ChPauseFilesharing == null) ? 0
0902: : _ChPauseFilesharing.hashCode());
0903: result = (37 * result)
0904: + ((_ChResumeFilesharing == null) ? 0
0905: : _ChResumeFilesharing.hashCode());
0906: result = (37 * result)
0907: + ((_ChLeaveFilesharing == null) ? 0
0908: : _ChLeaveFilesharing.hashCode());
0909: result = (37 * result)
0910: + ((_ChCommands == null) ? 0 : _ChCommands.hashCode());
0911:
0912: return result;
0913: }
0914: }
0915:
0916: /*
0917: The following schema file has been used for generation:
0918:
0919: <?xml version="1.0" encoding="UTF-8"?>
0920: <!--
0921: Document : collab.xsd
0922: Created on : May 21, 2004, 7:45 PM
0923: Author : Ayub Khan
0924: Description:
0925: Purpose of the document follows.
0926: -->
0927: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
0928: targetNamespace="http://sun.com/ns/collab/dev/1_0/filesharing"
0929: xmlns:c="http://sun.com/ns/collab/dev/1_0"
0930: xmlns:ch="http://sun.com/ns/collab/dev/1_0/filesharing"
0931: elementFormDefault="qaulified">
0932:
0933: <!-- collab element -->
0934: <xsd:element name="c:collab" type="_collab">
0935: </xsd:element>
0936:
0937: <xsd:complexType name="_collab">
0938: <xsd:sequence>
0939: <xsd:element name="version" type="xsd:string"
0940: minOccurs="1" maxOccurs="1"/>
0941: <xsd:choice maxOccurs="1">
0942: <xsd:element name="ch:send-file" type="_send-file"
0943: minOccurs="0" maxOccurs="1"/>
0944: <xsd:element name="ch:file-changed" type="_file-changed"
0945: minOccurs="0" maxOccurs="1"/>
0946: <xsd:element name="ch:lock-region" type="_lock-region"
0947: minOccurs="0" maxOccurs="1"/>
0948: <xsd:element name="ch:unlock-region" type="_unlock-region"
0949: minOccurs="0" maxOccurs="1"/>
0950: <xsd:element name="ch:join-filesharing" type="_join-filesharing"
0951: minOccurs="0" maxOccurs="1"/>
0952: <xsd:element name="ch:pause-filesharing" type="_pause-filesharing"
0953: minOccurs="0" maxOccurs="1"/>
0954: <xsd:element name="ch:resume-filesharing" type="_resume-filesharing"
0955: minOccurs="0" maxOccurs="1"/>
0956: <xsd:element name="ch:leave-filesharing" type="_leave-filesharing"
0957: minOccurs="0" maxOccurs="1"/>
0958: <xsd:element name="ch:commands" type="_commands"
0959: minOccurs="0" maxOccurs="1"/>
0960: </xsd:choice>
0961: </xsd:sequence>
0962: </xsd:complexType>
0963:
0964: <!-- Schema for send-file -->
0965: <xsd:complexType name="_send-file">
0966: <xsd:sequence>
0967: <xsd:element name="file-groups" type="_file-groups"
0968: minOccurs="1" maxOccurs="1"/>
0969: <xsd:element name="send-file-data" type="_send-file-data"
0970: minOccurs="1" maxOccurs="unbounded"/>
0971: </xsd:sequence>
0972: </xsd:complexType>
0973:
0974: <!-- Schema for file-changed -->
0975: <xsd:complexType name="_file-changed">
0976: <xsd:sequence>
0977: <xsd:element name="file-groups" type="_file-groups"
0978: minOccurs="1" maxOccurs="1"/>
0979: <xsd:element name="file-changed-data" type="_file-changed-data"
0980: minOccurs="1" maxOccurs="unbounded"/>
0981: </xsd:sequence>
0982: </xsd:complexType>
0983:
0984: <!-- Schema for lock-region -->
0985: <xsd:complexType name="_lock-region">
0986: <xsd:sequence>
0987: <xsd:element name="file-groups" type="_file-groups"
0988: minOccurs="1" maxOccurs="1"/>
0989: <xsd:element name="lock-region-data" type="_lock-region-data"
0990: minOccurs="1" maxOccurs="unbounded"/>
0991: </xsd:sequence>
0992: </xsd:complexType>
0993:
0994: <!-- Schema for unlock-region -->
0995: <xsd:complexType name="_unlock-region">
0996: <xsd:sequence>
0997: <xsd:element name="file-groups" type="_file-groups"
0998: minOccurs="1" maxOccurs="1"/>
0999: <xsd:element name="unlock-region-data" type="_unlock-region-data"
1000: minOccurs="1" maxOccurs="unbounded"/>
1001: </xsd:sequence>
1002: </xsd:complexType>
1003:
1004: <!-- Schema for join filesharing -->
1005: <xsd:complexType name="_join-filesharing">
1006: <xsd:sequence>
1007: <xsd:choice maxOccurs="1">
1008: <xsd:element name="begin-join"
1009: minOccurs="0" maxOccurs="1"/>
1010: <xsd:element name="end-join"
1011: minOccurs="0" maxOccurs="1"/>
1012: </xsd:choice>
1013: <xsd:element name="user" type="_user"
1014: minOccurs="1" maxOccurs="1"/>
1015: </xsd:sequence>
1016: </xsd:complexType>
1017:
1018: <!-- Schema for pause filesharing -->
1019: <xsd:complexType name="_pause-filesharing">
1020: <xsd:sequence>
1021: <xsd:element name="join-user" type="_join-user"
1022: minOccurs="1" maxOccurs="1"/>
1023: <xsd:element name="moderator" type="_moderator"
1024: minOccurs="1" maxOccurs="1"/>
1025: <xsd:element name="file-owners" type="_file-owners"
1026: minOccurs="1" maxOccurs="1"/>
1027: <xsd:element name="users" type="_users"
1028: minOccurs="1" maxOccurs="1"/>
1029: <xsd:element name="file-groups" type="_file-groups"
1030: minOccurs="1" maxOccurs="1"/>
1031: </xsd:sequence>
1032: </xsd:complexType>
1033:
1034: <!-- Schema for resume filesharing -->
1035: <xsd:complexType name="_resume-filesharing">
1036: <xsd:sequence>
1037: <xsd:element name="moderator" type="_moderator"
1038: minOccurs="1" maxOccurs="1"/>
1039: </xsd:sequence>
1040: </xsd:complexType>
1041:
1042: <!-- Schema for pause filesharing -->
1043: <xsd:complexType name="_leave-filesharing">
1044: <xsd:sequence>
1045: <xsd:element name="user" type="_user"
1046: minOccurs="1" maxOccurs="1"/>
1047: <xsd:element name="new-moderator" type="_moderator"
1048: minOccurs="1" maxOccurs="1"/>
1049: <xsd:element name="new-file-owner" type="_new-file-owner"
1050: minOccurs="1" maxOccurs="1"/>
1051: <xsd:element name="file-groups" type="_file-groups"
1052: minOccurs="1" maxOccurs="1"/>
1053: </xsd:sequence>
1054: </xsd:complexType>
1055:
1056: <!-- Schema for commands -->
1057: <xsd:complexType name="_commands">
1058: <xsd:sequence>
1059: <xsd:choice maxOccurs="1">
1060: <xsd:element name="filesystem-command" type="_filesystem-command"
1061: minOccurs="1" maxOccurs="1"/>
1062: </xsd:choice>
1063: </xsd:sequence>
1064: </xsd:complexType>
1065:
1066: <!-- ===================================================== -->
1067:
1068: <xsd:complexType name="_file-groups">
1069: <xsd:sequence>
1070: <xsd:element name="file-group" type="_file-group"
1071: minOccurs="1" maxOccurs="unbounded"/>
1072: </xsd:sequence>
1073: </xsd:complexType>
1074:
1075: <xsd:complexType name="_file-group">
1076: <xsd:sequence>
1077: <xsd:element name="file-group-name" type="xsd:string"
1078: minOccurs="1" maxOccurs="1"/>
1079: <xsd:element name="user" type="_user"
1080: minOccurs="1" maxOccurs="1"/>
1081: <!-- file-name contains full path -->
1082: <xsd:element name="file-name" type="xsd:string"
1083: minOccurs="1" maxOccurs="unbounded"/>
1084: </xsd:sequence>
1085: </xsd:complexType>
1086:
1087: <xsd:complexType name="_send-file-data">
1088: <xsd:sequence>
1089: <xsd:element name="file-data" type="_file-data"
1090: minOccurs="1" maxOccurs="1"/>
1091: <xsd:element name="choose-line-region-function" type="xsd:boolean"
1092: minOccurs="1" maxOccurs="1"/>
1093: <xsd:choice maxOccurs="1">
1094: <xsd:element name="line-region-function" type="_line-region-function"
1095: minOccurs="1" maxOccurs="1"/>
1096: <xsd:element name="line-region" type="_line-region"
1097: minOccurs="1" maxOccurs="unbounded"/>
1098: </xsd:choice>
1099: <xsd:element name="content" type="_content"
1100: minOccurs="1" maxOccurs="1"/>
1101: </xsd:sequence>
1102: </xsd:complexType>
1103:
1104: <xsd:complexType name="_line-region-function">
1105: <xsd:sequence>
1106: <xsd:element name="funtion-name" type="xsd:string"
1107: minOccurs="1" maxOccurs="1"/>
1108: <xsd:element name="arguments" type="xsd:string"
1109: minOccurs="1" maxOccurs="unbounded"/>
1110: </xsd:sequence>
1111: </xsd:complexType>
1112:
1113: <xsd:complexType name="_file-data">
1114: <xsd:sequence>
1115: <!-- file-name contains full path -->
1116: <xsd:element name="file-name" type="xsd:string"
1117: minOccurs="1" maxOccurs="1"/>
1118: <xsd:element name="content-type" type="xsd:string"
1119: minOccurs="1" maxOccurs="1"/>
1120: <xsd:element name="description" type="xsd:string"
1121: minOccurs="0" maxOccurs="1"/>
1122: </xsd:sequence>
1123: </xsd:complexType>
1124:
1125: <!-- Schema for file-changed -->
1126: <xsd:complexType name="_file-changed-data">
1127: <xsd:sequence>
1128: <!-- file-name contains full path -->
1129: <xsd:element name="file-name" type="xsd:string"
1130: minOccurs="1" maxOccurs="1"/>
1131: <xsd:element name="digest" type="xsd:string"
1132: minOccurs="1" maxOccurs="1"/>
1133: <xsd:element name="region-changed" type="_region-changed"
1134: minOccurs="1" maxOccurs="unbounded"/>
1135: </xsd:sequence>
1136: </xsd:complexType>
1137:
1138: <!-- Schema for lock-region -->
1139: <xsd:complexType name="_lock-region-data">
1140: <xsd:sequence>
1141: <!-- file-name contains full path -->
1142: <xsd:element name="file-name" type="xsd:string"
1143: minOccurs="1" maxOccurs="1"/>
1144: <xsd:element name="line-region" type="_line-region"
1145: minOccurs="1" maxOccurs="unbounded"/>
1146: <xsd:choice maxOccurs="1">
1147: <xsd:element name="text-region" type="_text-region"
1148: minOccurs="1" maxOccurs="1"/>
1149: <xsd:element name="java-region" type="_java-region"
1150: minOccurs="1" maxOccurs="1"/>
1151: </xsd:choice>
1152: <xsd:element name="content" type="_content"
1153: minOccurs="1" maxOccurs="1"/>
1154: </xsd:sequence>
1155: </xsd:complexType>
1156:
1157: <!-- Schema for unlock-region -->
1158: <xsd:complexType name="_unlock-region-data">
1159: <xsd:sequence>
1160: <!-- file-name contains full path -->
1161: <xsd:element name="file-name" type="xsd:string"
1162: minOccurs="1" maxOccurs="1"/>
1163: <xsd:element name="line-region" type="_line-region"
1164: minOccurs="1" maxOccurs="unbounded"/>
1165: <xsd:choice maxOccurs="1">
1166: <xsd:element name="text-region" type="_text-region"
1167: minOccurs="1" maxOccurs="1"/>
1168: <xsd:element name="java-region" type="_java-region"
1169: minOccurs="1" maxOccurs="1"/>
1170: </xsd:choice>
1171: <xsd:element name="content" type="_content"
1172: minOccurs="1" maxOccurs="1"/>
1173: </xsd:sequence>
1174: </xsd:complexType>
1175:
1176: <!-- user elements -->
1177: <xsd:complexType name="_moderator">
1178: <xsd:sequence>
1179: <xsd:element name="users" type="_users"
1180: minOccurs="1" maxOccurs="1"/>
1181: </xsd:sequence>
1182: </xsd:complexType>
1183:
1184: <xsd:complexType name="_join-user">
1185: <xsd:sequence>
1186: <xsd:element name="user" type="_user"
1187: minOccurs="1" maxOccurs="1"/>
1188: </xsd:sequence>
1189: </xsd:complexType>
1190:
1191: <xsd:complexType name="_file-owners">
1192: <xsd:sequence>
1193: <xsd:element name="users" type="_users"
1194: minOccurs="1" maxOccurs="1"/>
1195: </xsd:sequence>
1196: </xsd:complexType>
1197:
1198: <xsd:complexType name="_new-file-owner">
1199: <xsd:sequence>
1200: <xsd:element name="users" type="_users"
1201: minOccurs="1" maxOccurs="1"/>
1202: </xsd:sequence>
1203: </xsd:complexType>
1204:
1205: <xsd:complexType name="_users">
1206: <xsd:sequence>
1207: <xsd:element name="user" type="_user"
1208: minOccurs="0" maxOccurs="unbounded"/>
1209: </xsd:sequence>
1210: </xsd:complexType>
1211:
1212: <xsd:complexType name="_user">
1213: <xsd:sequence>
1214: <xsd:element name="id" type="xsd:string"
1215: minOccurs="1" maxOccurs="1"/>
1216: <xsd:element name="name" type="xsd:string"
1217: minOccurs="0" maxOccurs="1"/>
1218: <xsd:element name="description" type="xsd:string"
1219: minOccurs="0" maxOccurs="1"/>
1220: </xsd:sequence>
1221: </xsd:complexType>
1222:
1223: <!-- filesystem command schema -->
1224: <xsd:complexType name="_filesystem-command">
1225: <xsd:sequence>
1226: <xsd:choice maxOccurs="1">
1227: <!-- file commands -->
1228: <xsd:element name="delete-file" type="_delete-file"
1229: minOccurs="1" maxOccurs="1"/>
1230: </xsd:choice>
1231: </xsd:sequence>
1232: </xsd:complexType>
1233:
1234: <xsd:complexType name="_delete-file">
1235: <xsd:sequence>
1236: <!-- file-name contains full path -->
1237: <xsd:element name="file-name" type="xsd:string"
1238: minOccurs="1" maxOccurs="1"/>
1239: </xsd:sequence>
1240: </xsd:complexType>
1241:
1242: <!-- ===================================================== -->
1243:
1244: <xsd:complexType name="_region-changed">
1245: <xsd:sequence>
1246: <xsd:choice maxOccurs="1">
1247: <xsd:element name="text-region-changed" type="_text-region-changed"
1248: minOccurs="1" maxOccurs="1"/>
1249: <xsd:element name="java-region-changed" type="_java-region-changed"
1250: minOccurs="1" maxOccurs="1"/>
1251: <xsd:element name="line-region-changed" type="_line-region-changed"
1252: minOccurs="1" maxOccurs="1"/>
1253: </xsd:choice>
1254: </xsd:sequence>
1255: </xsd:complexType>
1256:
1257: <xsd:complexType name="_text-region-changed">
1258: <xsd:sequence>
1259: <xsd:element name="text-region" type="_text-region"
1260: minOccurs="1" maxOccurs="1"/>
1261: <xsd:element name="text-change" type="_text-change"
1262: minOccurs="1" maxOccurs="1"/>
1263: </xsd:sequence>
1264: </xsd:complexType>
1265:
1266: <xsd:complexType name="_java-region-changed">
1267: <xsd:sequence>
1268: <xsd:element name="java-region" type="_java-region"
1269: minOccurs="1" maxOccurs="1"/>
1270: <xsd:element name="java-change" type="_java-change"
1271: minOccurs="1" maxOccurs="1"/>
1272: </xsd:sequence>
1273: </xsd:complexType>
1274:
1275: <xsd:complexType name="_line-region-changed">
1276: <xsd:sequence>
1277: <xsd:element name="line-region" type="_line-region"
1278: minOccurs="1" maxOccurs="1"/>
1279: <xsd:element name="line-change" type="_line-change"
1280: minOccurs="1" maxOccurs="1"/>
1281: </xsd:sequence>
1282: </xsd:complexType>
1283:
1284: <xsd:complexType name="_region" abstract="true">
1285: <xsd:sequence>
1286: <xsd:element name="region-name" type="xsd:string"
1287: minOccurs="1" maxOccurs="1">
1288: </xsd:element>
1289: </xsd:sequence>
1290: </xsd:complexType>
1291:
1292: <xsd:complexType name="_change" abstract="true"/>
1293:
1294: <xsd:complexType name="_content">
1295: <xsd:sequence>
1296: <xsd:element name="encoding" type="xsd:string"
1297: minOccurs="1" maxOccurs="1">
1298: </xsd:element>
1299: <xsd:element name="digest" type="xsd:string"
1300: minOccurs="1" maxOccurs="1">
1301: </xsd:element>
1302: <xsd:element name="data" type="xsd:string"
1303: minOccurs="1" maxOccurs="1">
1304: </xsd:element>
1305: </xsd:sequence>
1306: </xsd:complexType>
1307:
1308:
1309:
1310: <!-- ===================================================== -->
1311: <!-- ================ Text Region =================== -->
1312: <!-- ===================================================== -->
1313:
1314: <xsd:complexType name="_text-region">
1315: <xsd:complexContent>
1316: <xsd:extension base="_region">
1317: <xsd:sequence>
1318: <xsd:element name="begin-offset" type="xsd:integer"
1319: minOccurs="1" maxOccurs="1">
1320: </xsd:element>
1321: <xsd:element name="length" type="xsd:integer"
1322: minOccurs="1" maxOccurs="1">
1323: </xsd:element>
1324: </xsd:sequence>
1325: </xsd:extension>
1326: </xsd:complexContent>
1327: </xsd:complexType>
1328:
1329: <xsd:complexType name="_line-range">
1330: <xsd:sequence>
1331: <xsd:element name="from-line" type="xsd:integer"
1332: minOccurs="1" maxOccurs="1"/>
1333: <xsd:element name="to-line" type="xsd:integer"
1334: minOccurs="1" maxOccurs="1"/>
1335: </xsd:sequence>
1336: </xsd:complexType>
1337:
1338: <xsd:complexType name="_offset-range">
1339: <xsd:sequence>
1340: <xsd:element name="begin-offset" type="xsd:integer"
1341: minOccurs="1" maxOccurs="1">
1342: </xsd:element>
1343: <xsd:element name="length" type="xsd:integer"
1344: minOccurs="1" maxOccurs="1">
1345: </xsd:element>
1346: </xsd:sequence>
1347: </xsd:complexType>
1348:
1349: <xsd:complexType name="_text-change">
1350: <xsd:complexContent>
1351: <xsd:extension base="_change">
1352: <xsd:choice maxOccurs="1">
1353: <xsd:element name="change-texts" type="_change-texts"
1354: minOccurs="1" maxOccurs="1"/>
1355: <xsd:element name="content" type="_content"
1356: minOccurs="1" maxOccurs="1"/>
1357: </xsd:choice>
1358: </xsd:extension>
1359: </xsd:complexContent>
1360: </xsd:complexType>
1361:
1362:
1363:
1364: <!-- ===================================================== -->
1365: <!-- ================ Java Region =================== -->
1366: <!-- ===================================================== -->
1367: <xsd:complexType name="_java-region">
1368: <xsd:complexContent>
1369: <xsd:extension base="_region">
1370: <xsd:sequence>
1371: <xsd:element name="begin-offset" type="xsd:integer"
1372: minOccurs="1" maxOccurs="1">
1373: </xsd:element>
1374: <xsd:element name="length" type="xsd:integer"
1375: minOccurs="1" maxOccurs="1">
1376: </xsd:element>
1377: </xsd:sequence>
1378: </xsd:extension>
1379: </xsd:complexContent>
1380: </xsd:complexType>
1381:
1382: <xsd:complexType name="_java-change">
1383: <xsd:complexContent>
1384: <xsd:extension base="_change">
1385: <xsd:sequence>
1386: <xsd:choice maxOccurs="1">
1387: <xsd:element name="change-texts" type="_change-texts"
1388: minOccurs="1" maxOccurs="1"/>
1389: <xsd:element name="content" type="_content"
1390: minOccurs="1" maxOccurs="1"/>
1391: </xsd:choice>
1392: </xsd:sequence>
1393: </xsd:extension>
1394: </xsd:complexContent>
1395: </xsd:complexType>
1396:
1397:
1398:
1399: <!-- ===================================================== -->
1400: <!-- ================ Line Region =================== -->
1401: <!-- ===================================================== -->
1402: <xsd:complexType name="_line-region">
1403: <xsd:complexContent>
1404: <xsd:extension base="_region">
1405: </xsd:extension>
1406: </xsd:complexContent>
1407: </xsd:complexType>
1408:
1409: <xsd:complexType name="_line-change">
1410: <xsd:complexContent>
1411: <xsd:extension base="_change">
1412: <xsd:sequence>
1413: <xsd:choice maxOccurs="1">
1414: <xsd:element name="content" type="_content"
1415: minOccurs="1" maxOccurs="1"/>
1416: </xsd:choice>
1417: </xsd:sequence>
1418: </xsd:extension>
1419: </xsd:complexContent>
1420: </xsd:complexType>
1421:
1422:
1423:
1424: <!-- ===================================================== -->
1425: <!-- ================Common Region Type=================== -->
1426: <!-- ===================================================== -->
1427:
1428: <xsd:complexType name="_change-texts">
1429: <xsd:sequence>
1430: <xsd:element name="remove-texts" type="_remove-texts"
1431: minOccurs="1" maxOccurs="1"/>
1432: <xsd:element name="insert-texts" type="_insert-texts"
1433: minOccurs="1" maxOccurs="1"/>
1434: </xsd:sequence>
1435: </xsd:complexType>
1436:
1437: <xsd:complexType name="_remove-texts">
1438: <xsd:sequence>
1439: <xsd:element name="remove-text" type="_remove-text"
1440: minOccurs="1" maxOccurs="unbounded"/>
1441: </xsd:sequence>
1442: </xsd:complexType>
1443:
1444: <xsd:complexType name="_insert-texts">
1445: <xsd:sequence>
1446: <xsd:element name="insert-text" type="_insert-text"
1447: minOccurs="1" maxOccurs="unbounded"/>
1448: </xsd:sequence>
1449: </xsd:complexType>
1450:
1451: <xsd:complexType name="_remove-text">
1452: <xsd:sequence>
1453: <xsd:element name="offset" type="xsd:integer"
1454: minOccurs="1" maxOccurs="1"/>
1455: </xsd:sequence>
1456: </xsd:complexType>
1457:
1458: <xsd:complexType name="_insert-text">
1459: <xsd:sequence>
1460: <xsd:element name="offset" type="xsd:integer"
1461: minOccurs="1" maxOccurs="1"/>
1462: <xsd:element name="content" type="_content"
1463: minOccurs="1" maxOccurs="1"/>
1464: </xsd:sequence>
1465: </xsd:complexType>
1466:
1467: </xsd:schema>
1468:
1469: */
|