001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: /**
042: * This generated bean class LockRegionData
043: * matches the schema element '_lock-region-data'.
044: *
045: * Generated on Mon Sep 27 16:53:12 PDT 2004
046: */package org.netbeans.modules.collab.channel.filesharing.msgbean;
047:
048: public class LockRegionData {
049: private java.lang.String _FileName;
050: private java.util.List _LineRegion = new java.util.ArrayList(); // List<LineRegion>
051: private TextRegion _TextRegion;
052: private JavaRegion _JavaRegion;
053: private Content _Content;
054:
055: public LockRegionData() {
056: _FileName = "";
057: _Content = new Content();
058: }
059:
060: // Deep copy
061: public LockRegionData(
062: org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegionData source) {
063: _FileName = source._FileName;
064:
065: for (java.util.Iterator it = source._LineRegion.iterator(); it
066: .hasNext();) {
067: _LineRegion
068: .add(new org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion(
069: (org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion) it
070: .next()));
071: }
072:
073: _TextRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.TextRegion(
074: source._TextRegion);
075: _JavaRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.JavaRegion(
076: source._JavaRegion);
077: _Content = new org.netbeans.modules.collab.channel.filesharing.msgbean.Content(
078: source._Content);
079: }
080:
081: // This attribute is mandatory
082: public void setFileName(java.lang.String value) {
083: _FileName = value;
084: }
085:
086: public java.lang.String getFileName() {
087: return _FileName;
088: }
089:
090: // This attribute is an array containing at least one element
091: public void setLineRegion(
092: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion[] value) {
093: if (value == null) {
094: value = new LineRegion[0];
095: }
096:
097: _LineRegion.clear();
098:
099: for (int i = 0; i < value.length; ++i) {
100: _LineRegion.add(value[i]);
101: }
102: }
103:
104: public void setLineRegion(
105: int index,
106: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion value) {
107: _LineRegion.set(index, value);
108: }
109:
110: public org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion[] getLineRegion() {
111: LineRegion[] arr = new LineRegion[_LineRegion.size()];
112:
113: return (LineRegion[]) _LineRegion.toArray(arr);
114: }
115:
116: public java.util.List fetchLineRegionList() {
117: return _LineRegion;
118: }
119:
120: public org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion getLineRegion(
121: int index) {
122: return (LineRegion) _LineRegion.get(index);
123: }
124:
125: // Return the number of lineRegion
126: public int sizeLineRegion() {
127: return _LineRegion.size();
128: }
129:
130: public int addLineRegion(
131: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion value) {
132: _LineRegion.add(value);
133:
134: return _LineRegion.size() - 1;
135: }
136:
137: // Search from the end looking for @param value, and then remove it.
138: public int removeLineRegion(
139: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion value) {
140: int pos = _LineRegion.indexOf(value);
141:
142: if (pos >= 0) {
143: _LineRegion.remove(pos);
144: }
145:
146: return pos;
147: }
148:
149: // This attribute is mandatory
150: public void setTextRegion(
151: org.netbeans.modules.collab.channel.filesharing.msgbean.TextRegion value) {
152: _TextRegion = value;
153: }
154:
155: public org.netbeans.modules.collab.channel.filesharing.msgbean.TextRegion getTextRegion() {
156: return _TextRegion;
157: }
158:
159: // This attribute is mandatory
160: public void setJavaRegion(
161: org.netbeans.modules.collab.channel.filesharing.msgbean.JavaRegion value) {
162: _JavaRegion = value;
163: }
164:
165: public org.netbeans.modules.collab.channel.filesharing.msgbean.JavaRegion getJavaRegion() {
166: return _JavaRegion;
167: }
168:
169: // This attribute is mandatory
170: public void setContent(
171: org.netbeans.modules.collab.channel.filesharing.msgbean.Content value) {
172: _Content = value;
173: }
174:
175: public org.netbeans.modules.collab.channel.filesharing.msgbean.Content getContent() {
176: return _Content;
177: }
178:
179: public void writeNode(java.io.Writer out, String nodeName,
180: String indent) throws java.io.IOException {
181: out.write(indent);
182: out.write("<");
183: out.write(nodeName);
184: out.write(">\n");
185:
186: String nextIndent = indent + " ";
187:
188: if (_FileName != null) {
189: out.write(nextIndent);
190: out.write("<file-name"); // NOI18N
191: out.write(">"); // NOI18N
192: org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab
193: .writeXML(out, _FileName, false);
194: out.write("</file-name>\n"); // NOI18N
195: }
196:
197: for (java.util.Iterator it = _LineRegion.iterator(); it
198: .hasNext();) {
199: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion element = (org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion) it
200: .next();
201:
202: if (element != null) {
203: element.writeNode(out, "line-region", nextIndent);
204: }
205: }
206:
207: if (_TextRegion != null) {
208: _TextRegion.writeNode(out, "text-region", nextIndent);
209: }
210:
211: if (_JavaRegion != null) {
212: _JavaRegion.writeNode(out, "java-region", nextIndent);
213: }
214:
215: if (_Content != null) {
216: _Content.writeNode(out, "content", nextIndent);
217: }
218:
219: out.write(indent);
220: out.write("</" + nodeName + ">\n");
221: }
222:
223: public void readNode(org.w3c.dom.Node node) {
224: org.w3c.dom.NodeList children = node.getChildNodes();
225:
226: for (int i = 0, size = children.getLength(); i < size; ++i) {
227: org.w3c.dom.Node childNode = children.item(i);
228: String childNodeName = ((childNode.getLocalName() == null) ? childNode
229: .getNodeName().intern()
230: : childNode.getLocalName().intern());
231: String childNodeValue = "";
232:
233: if (childNode.getFirstChild() != null) {
234: childNodeValue = childNode.getFirstChild()
235: .getNodeValue();
236: }
237:
238: if (childNodeName == "file-name") {
239: _FileName = childNodeValue;
240: } else if (childNodeName == "line-region") {
241: LineRegion aLineRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion();
242: aLineRegion.readNode(childNode);
243: _LineRegion.add(aLineRegion);
244: } else if (childNodeName == "text-region") {
245: _TextRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.TextRegion();
246: _TextRegion.readNode(childNode);
247: } else if (childNodeName == "java-region") {
248: _JavaRegion = new org.netbeans.modules.collab.channel.filesharing.msgbean.JavaRegion();
249: _JavaRegion.readNode(childNode);
250: } else if (childNodeName == "content") {
251: _Content = new org.netbeans.modules.collab.channel.filesharing.msgbean.Content();
252: _Content.readNode(childNode);
253: } else {
254: // Found extra unrecognized childNode
255: }
256: }
257: }
258:
259: public void changePropertyByName(String name, Object value) {
260: if (name == null) {
261: return;
262: }
263:
264: name = name.intern();
265:
266: if (name == "fileName") {
267: setFileName((java.lang.String) value);
268: } else if (name == "lineRegion") {
269: addLineRegion((LineRegion) value);
270: } else if (name == "lineRegion[]") {
271: setLineRegion((LineRegion[]) value);
272: } else if (name == "textRegion") {
273: setTextRegion((TextRegion) value);
274: } else if (name == "javaRegion") {
275: setJavaRegion((JavaRegion) value);
276: } else if (name == "content") {
277: setContent((Content) value);
278: } else {
279: throw new IllegalArgumentException(
280: name
281: + " is not a valid property name for LockRegionData");
282: }
283: }
284:
285: public Object fetchPropertyByName(String name) {
286: if (name == "fileName") {
287: return getFileName();
288: }
289:
290: if (name == "lineRegion[]") {
291: return getLineRegion();
292: }
293:
294: if (name == "textRegion") {
295: return getTextRegion();
296: }
297:
298: if (name == "javaRegion") {
299: return getJavaRegion();
300: }
301:
302: if (name == "content") {
303: return getContent();
304: }
305:
306: throw new IllegalArgumentException(name
307: + " is not a valid property name for LockRegionData");
308: }
309:
310: // Return an array of all of the properties that are beans and are set.
311: public java.lang.Object[] childBeans(boolean recursive) {
312: java.util.List children = new java.util.LinkedList();
313: childBeans(recursive, children);
314:
315: java.lang.Object[] result = new java.lang.Object[children
316: .size()];
317:
318: return (java.lang.Object[]) children.toArray(result);
319: }
320:
321: // Put all child beans into the beans list.
322: public void childBeans(boolean recursive, java.util.List beans) {
323: for (java.util.Iterator it = _LineRegion.iterator(); it
324: .hasNext();) {
325: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion element = (org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion) it
326: .next();
327:
328: if (element != null) {
329: if (recursive) {
330: element.childBeans(true, beans);
331: }
332:
333: beans.add(element);
334: }
335: }
336:
337: if (_TextRegion != null) {
338: if (recursive) {
339: _TextRegion.childBeans(true, beans);
340: }
341:
342: beans.add(_TextRegion);
343: }
344:
345: if (_JavaRegion != null) {
346: if (recursive) {
347: _JavaRegion.childBeans(true, beans);
348: }
349:
350: beans.add(_JavaRegion);
351: }
352:
353: if (_Content != null) {
354: if (recursive) {
355: _Content.childBeans(true, beans);
356: }
357:
358: beans.add(_Content);
359: }
360: }
361:
362: public boolean equals(Object o) {
363: if (o == this ) {
364: return true;
365: }
366:
367: if (!(o instanceof org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegionData)) {
368: return false;
369: }
370:
371: org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegionData inst = (org.netbeans.modules.collab.channel.filesharing.msgbean.LockRegionData) o;
372:
373: if (!((_FileName == null) ? (inst._FileName == null)
374: : _FileName.equals(inst._FileName))) {
375: return false;
376: }
377:
378: if (sizeLineRegion() != inst.sizeLineRegion()) {
379: return false;
380: }
381:
382: // Compare every element.
383: for (java.util.Iterator it = _LineRegion.iterator(), it2 = inst._LineRegion
384: .iterator(); it.hasNext() && it2.hasNext();) {
385: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion element = (org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion) it
386: .next();
387: org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion element2 = (org.netbeans.modules.collab.channel.filesharing.msgbean.LineRegion) it2
388: .next();
389:
390: if (!((element == null) ? (element2 == null) : element
391: .equals(element2))) {
392: return false;
393: }
394: }
395:
396: if (!((_TextRegion == null) ? (inst._TextRegion == null)
397: : _TextRegion.equals(inst._TextRegion))) {
398: return false;
399: }
400:
401: if (!((_JavaRegion == null) ? (inst._JavaRegion == null)
402: : _JavaRegion.equals(inst._JavaRegion))) {
403: return false;
404: }
405:
406: if (!((_Content == null) ? (inst._Content == null) : _Content
407: .equals(inst._Content))) {
408: return false;
409: }
410:
411: return true;
412: }
413:
414: public int hashCode() {
415: int result = 17;
416: result = (37 * result)
417: + ((_FileName == null) ? 0 : _FileName.hashCode());
418: result = (37 * result)
419: + ((_LineRegion == null) ? 0 : _LineRegion.hashCode());
420: result = (37 * result)
421: + ((_TextRegion == null) ? 0 : _TextRegion.hashCode());
422: result = (37 * result)
423: + ((_JavaRegion == null) ? 0 : _JavaRegion.hashCode());
424: result = (37 * result)
425: + ((_Content == null) ? 0 : _Content.hashCode());
426:
427: return result;
428: }
429: }
430:
431: /*
432: The following schema file has been used for generation:
433:
434: <?xml version="1.0" encoding="UTF-8"?>
435: <!--
436: Document : collab.xsd
437: Created on : May 21, 2004, 7:45 PM
438: Author : Ayub Khan
439: Description:
440: Purpose of the document follows.
441: -->
442: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
443: targetNamespace="http://sun.com/ns/collab/dev/1_0/filesharing"
444: xmlns:c="http://sun.com/ns/collab/dev/1_0"
445: xmlns:ch="http://sun.com/ns/collab/dev/1_0/filesharing"
446: elementFormDefault="qaulified">
447:
448: <!-- collab element -->
449: <xsd:element name="c:collab" type="_collab">
450: </xsd:element>
451:
452: <xsd:complexType name="_collab">
453: <xsd:sequence>
454: <xsd:element name="version" type="xsd:string"
455: minOccurs="1" maxOccurs="1"/>
456: <xsd:choice maxOccurs="1">
457: <xsd:element name="ch:send-file" type="_send-file"
458: minOccurs="0" maxOccurs="1"/>
459: <xsd:element name="ch:file-changed" type="_file-changed"
460: minOccurs="0" maxOccurs="1"/>
461: <xsd:element name="ch:lock-region" type="_lock-region"
462: minOccurs="0" maxOccurs="1"/>
463: <xsd:element name="ch:unlock-region" type="_unlock-region"
464: minOccurs="0" maxOccurs="1"/>
465: <xsd:element name="ch:join-filesharing" type="_join-filesharing"
466: minOccurs="0" maxOccurs="1"/>
467: <xsd:element name="ch:pause-filesharing" type="_pause-filesharing"
468: minOccurs="0" maxOccurs="1"/>
469: <xsd:element name="ch:resume-filesharing" type="_resume-filesharing"
470: minOccurs="0" maxOccurs="1"/>
471: <xsd:element name="ch:leave-filesharing" type="_leave-filesharing"
472: minOccurs="0" maxOccurs="1"/>
473: <xsd:element name="ch:commands" type="_commands"
474: minOccurs="0" maxOccurs="1"/>
475: </xsd:choice>
476: </xsd:sequence>
477: </xsd:complexType>
478:
479: <!-- Schema for send-file -->
480: <xsd:complexType name="_send-file">
481: <xsd:sequence>
482: <xsd:element name="file-groups" type="_file-groups"
483: minOccurs="1" maxOccurs="1"/>
484: <xsd:element name="send-file-data" type="_send-file-data"
485: minOccurs="1" maxOccurs="unbounded"/>
486: </xsd:sequence>
487: </xsd:complexType>
488:
489: <!-- Schema for file-changed -->
490: <xsd:complexType name="_file-changed">
491: <xsd:sequence>
492: <xsd:element name="file-groups" type="_file-groups"
493: minOccurs="1" maxOccurs="1"/>
494: <xsd:element name="file-changed-data" type="_file-changed-data"
495: minOccurs="1" maxOccurs="unbounded"/>
496: </xsd:sequence>
497: </xsd:complexType>
498:
499: <!-- Schema for lock-region -->
500: <xsd:complexType name="_lock-region">
501: <xsd:sequence>
502: <xsd:element name="file-groups" type="_file-groups"
503: minOccurs="1" maxOccurs="1"/>
504: <xsd:element name="lock-region-data" type="_lock-region-data"
505: minOccurs="1" maxOccurs="unbounded"/>
506: </xsd:sequence>
507: </xsd:complexType>
508:
509: <!-- Schema for unlock-region -->
510: <xsd:complexType name="_unlock-region">
511: <xsd:sequence>
512: <xsd:element name="file-groups" type="_file-groups"
513: minOccurs="1" maxOccurs="1"/>
514: <xsd:element name="unlock-region-data" type="_unlock-region-data"
515: minOccurs="1" maxOccurs="unbounded"/>
516: </xsd:sequence>
517: </xsd:complexType>
518:
519: <!-- Schema for join filesharing -->
520: <xsd:complexType name="_join-filesharing">
521: <xsd:sequence>
522: <xsd:choice maxOccurs="1">
523: <xsd:element name="begin-join"
524: minOccurs="0" maxOccurs="1"/>
525: <xsd:element name="end-join"
526: minOccurs="0" maxOccurs="1"/>
527: </xsd:choice>
528: <xsd:element name="user" type="_user"
529: minOccurs="1" maxOccurs="1"/>
530: </xsd:sequence>
531: </xsd:complexType>
532:
533: <!-- Schema for pause filesharing -->
534: <xsd:complexType name="_pause-filesharing">
535: <xsd:sequence>
536: <xsd:element name="join-user" type="_join-user"
537: minOccurs="1" maxOccurs="1"/>
538: <xsd:element name="moderator" type="_moderator"
539: minOccurs="1" maxOccurs="1"/>
540: <xsd:element name="file-owners" type="_file-owners"
541: minOccurs="1" maxOccurs="1"/>
542: <xsd:element name="users" type="_users"
543: minOccurs="1" maxOccurs="1"/>
544: <xsd:element name="file-groups" type="_file-groups"
545: minOccurs="1" maxOccurs="1"/>
546: </xsd:sequence>
547: </xsd:complexType>
548:
549: <!-- Schema for resume filesharing -->
550: <xsd:complexType name="_resume-filesharing">
551: <xsd:sequence>
552: <xsd:element name="moderator" type="_moderator"
553: minOccurs="1" maxOccurs="1"/>
554: </xsd:sequence>
555: </xsd:complexType>
556:
557: <!-- Schema for pause filesharing -->
558: <xsd:complexType name="_leave-filesharing">
559: <xsd:sequence>
560: <xsd:element name="user" type="_user"
561: minOccurs="1" maxOccurs="1"/>
562: <xsd:element name="new-moderator" type="_moderator"
563: minOccurs="1" maxOccurs="1"/>
564: <xsd:element name="new-file-owner" type="_new-file-owner"
565: minOccurs="1" maxOccurs="1"/>
566: <xsd:element name="file-groups" type="_file-groups"
567: minOccurs="1" maxOccurs="1"/>
568: </xsd:sequence>
569: </xsd:complexType>
570:
571: <!-- Schema for commands -->
572: <xsd:complexType name="_commands">
573: <xsd:sequence>
574: <xsd:choice maxOccurs="1">
575: <xsd:element name="filesystem-command" type="_filesystem-command"
576: minOccurs="1" maxOccurs="1"/>
577: </xsd:choice>
578: </xsd:sequence>
579: </xsd:complexType>
580:
581: <!-- ===================================================== -->
582:
583: <xsd:complexType name="_file-groups">
584: <xsd:sequence>
585: <xsd:element name="file-group" type="_file-group"
586: minOccurs="1" maxOccurs="unbounded"/>
587: </xsd:sequence>
588: </xsd:complexType>
589:
590: <xsd:complexType name="_file-group">
591: <xsd:sequence>
592: <xsd:element name="file-group-name" type="xsd:string"
593: minOccurs="1" maxOccurs="1"/>
594: <xsd:element name="user" type="_user"
595: minOccurs="1" maxOccurs="1"/>
596: <!-- file-name contains full path -->
597: <xsd:element name="file-name" type="xsd:string"
598: minOccurs="1" maxOccurs="unbounded"/>
599: </xsd:sequence>
600: </xsd:complexType>
601:
602: <xsd:complexType name="_send-file-data">
603: <xsd:sequence>
604: <xsd:element name="file-data" type="_file-data"
605: minOccurs="1" maxOccurs="1"/>
606: <xsd:element name="choose-line-region-function" type="xsd:boolean"
607: minOccurs="1" maxOccurs="1"/>
608: <xsd:choice maxOccurs="1">
609: <xsd:element name="line-region-function" type="_line-region-function"
610: minOccurs="1" maxOccurs="1"/>
611: <xsd:element name="line-region" type="_line-region"
612: minOccurs="1" maxOccurs="unbounded"/>
613: </xsd:choice>
614: <xsd:element name="content" type="_content"
615: minOccurs="1" maxOccurs="1"/>
616: </xsd:sequence>
617: </xsd:complexType>
618:
619: <xsd:complexType name="_line-region-function">
620: <xsd:sequence>
621: <xsd:element name="funtion-name" type="xsd:string"
622: minOccurs="1" maxOccurs="1"/>
623: <xsd:element name="arguments" type="xsd:string"
624: minOccurs="1" maxOccurs="unbounded"/>
625: </xsd:sequence>
626: </xsd:complexType>
627:
628: <xsd:complexType name="_file-data">
629: <xsd:sequence>
630: <!-- file-name contains full path -->
631: <xsd:element name="file-name" type="xsd:string"
632: minOccurs="1" maxOccurs="1"/>
633: <xsd:element name="content-type" type="xsd:string"
634: minOccurs="1" maxOccurs="1"/>
635: <xsd:element name="description" type="xsd:string"
636: minOccurs="0" maxOccurs="1"/>
637: </xsd:sequence>
638: </xsd:complexType>
639:
640: <!-- Schema for file-changed -->
641: <xsd:complexType name="_file-changed-data">
642: <xsd:sequence>
643: <!-- file-name contains full path -->
644: <xsd:element name="file-name" type="xsd:string"
645: minOccurs="1" maxOccurs="1"/>
646: <xsd:element name="digest" type="xsd:string"
647: minOccurs="1" maxOccurs="1"/>
648: <xsd:element name="region-changed" type="_region-changed"
649: minOccurs="1" maxOccurs="unbounded"/>
650: </xsd:sequence>
651: </xsd:complexType>
652:
653: <!-- Schema for lock-region -->
654: <xsd:complexType name="_lock-region-data">
655: <xsd:sequence>
656: <!-- file-name contains full path -->
657: <xsd:element name="file-name" type="xsd:string"
658: minOccurs="1" maxOccurs="1"/>
659: <xsd:element name="line-region" type="_line-region"
660: minOccurs="1" maxOccurs="unbounded"/>
661: <xsd:choice maxOccurs="1">
662: <xsd:element name="text-region" type="_text-region"
663: minOccurs="1" maxOccurs="1"/>
664: <xsd:element name="java-region" type="_java-region"
665: minOccurs="1" maxOccurs="1"/>
666: </xsd:choice>
667: <xsd:element name="content" type="_content"
668: minOccurs="1" maxOccurs="1"/>
669: </xsd:sequence>
670: </xsd:complexType>
671:
672: <!-- Schema for unlock-region -->
673: <xsd:complexType name="_unlock-region-data">
674: <xsd:sequence>
675: <!-- file-name contains full path -->
676: <xsd:element name="file-name" type="xsd:string"
677: minOccurs="1" maxOccurs="1"/>
678: <xsd:element name="line-region" type="_line-region"
679: minOccurs="1" maxOccurs="unbounded"/>
680: <xsd:choice maxOccurs="1">
681: <xsd:element name="text-region" type="_text-region"
682: minOccurs="1" maxOccurs="1"/>
683: <xsd:element name="java-region" type="_java-region"
684: minOccurs="1" maxOccurs="1"/>
685: </xsd:choice>
686: <xsd:element name="content" type="_content"
687: minOccurs="1" maxOccurs="1"/>
688: </xsd:sequence>
689: </xsd:complexType>
690:
691: <!-- user elements -->
692: <xsd:complexType name="_moderator">
693: <xsd:sequence>
694: <xsd:element name="users" type="_users"
695: minOccurs="1" maxOccurs="1"/>
696: </xsd:sequence>
697: </xsd:complexType>
698:
699: <xsd:complexType name="_join-user">
700: <xsd:sequence>
701: <xsd:element name="user" type="_user"
702: minOccurs="1" maxOccurs="1"/>
703: </xsd:sequence>
704: </xsd:complexType>
705:
706: <xsd:complexType name="_file-owners">
707: <xsd:sequence>
708: <xsd:element name="users" type="_users"
709: minOccurs="1" maxOccurs="1"/>
710: </xsd:sequence>
711: </xsd:complexType>
712:
713: <xsd:complexType name="_new-file-owner">
714: <xsd:sequence>
715: <xsd:element name="users" type="_users"
716: minOccurs="1" maxOccurs="1"/>
717: </xsd:sequence>
718: </xsd:complexType>
719:
720: <xsd:complexType name="_users">
721: <xsd:sequence>
722: <xsd:element name="user" type="_user"
723: minOccurs="0" maxOccurs="unbounded"/>
724: </xsd:sequence>
725: </xsd:complexType>
726:
727: <xsd:complexType name="_user">
728: <xsd:sequence>
729: <xsd:element name="id" type="xsd:string"
730: minOccurs="1" maxOccurs="1"/>
731: <xsd:element name="name" type="xsd:string"
732: minOccurs="0" maxOccurs="1"/>
733: <xsd:element name="description" type="xsd:string"
734: minOccurs="0" maxOccurs="1"/>
735: </xsd:sequence>
736: </xsd:complexType>
737:
738: <!-- filesystem command schema -->
739: <xsd:complexType name="_filesystem-command">
740: <xsd:sequence>
741: <xsd:choice maxOccurs="1">
742: <!-- file commands -->
743: <xsd:element name="delete-file" type="_delete-file"
744: minOccurs="1" maxOccurs="1"/>
745: </xsd:choice>
746: </xsd:sequence>
747: </xsd:complexType>
748:
749: <xsd:complexType name="_delete-file">
750: <xsd:sequence>
751: <!-- file-name contains full path -->
752: <xsd:element name="file-name" type="xsd:string"
753: minOccurs="1" maxOccurs="1"/>
754: </xsd:sequence>
755: </xsd:complexType>
756:
757: <!-- ===================================================== -->
758:
759: <xsd:complexType name="_region-changed">
760: <xsd:sequence>
761: <xsd:choice maxOccurs="1">
762: <xsd:element name="text-region-changed" type="_text-region-changed"
763: minOccurs="1" maxOccurs="1"/>
764: <xsd:element name="java-region-changed" type="_java-region-changed"
765: minOccurs="1" maxOccurs="1"/>
766: <xsd:element name="line-region-changed" type="_line-region-changed"
767: minOccurs="1" maxOccurs="1"/>
768: </xsd:choice>
769: </xsd:sequence>
770: </xsd:complexType>
771:
772: <xsd:complexType name="_text-region-changed">
773: <xsd:sequence>
774: <xsd:element name="text-region" type="_text-region"
775: minOccurs="1" maxOccurs="1"/>
776: <xsd:element name="text-change" type="_text-change"
777: minOccurs="1" maxOccurs="1"/>
778: </xsd:sequence>
779: </xsd:complexType>
780:
781: <xsd:complexType name="_java-region-changed">
782: <xsd:sequence>
783: <xsd:element name="java-region" type="_java-region"
784: minOccurs="1" maxOccurs="1"/>
785: <xsd:element name="java-change" type="_java-change"
786: minOccurs="1" maxOccurs="1"/>
787: </xsd:sequence>
788: </xsd:complexType>
789:
790: <xsd:complexType name="_line-region-changed">
791: <xsd:sequence>
792: <xsd:element name="line-region" type="_line-region"
793: minOccurs="1" maxOccurs="1"/>
794: <xsd:element name="line-change" type="_line-change"
795: minOccurs="1" maxOccurs="1"/>
796: </xsd:sequence>
797: </xsd:complexType>
798:
799: <xsd:complexType name="_region" abstract="true">
800: <xsd:sequence>
801: <xsd:element name="region-name" type="xsd:string"
802: minOccurs="1" maxOccurs="1">
803: </xsd:element>
804: </xsd:sequence>
805: </xsd:complexType>
806:
807: <xsd:complexType name="_change" abstract="true"/>
808:
809: <xsd:complexType name="_content">
810: <xsd:sequence>
811: <xsd:element name="encoding" type="xsd:string"
812: minOccurs="1" maxOccurs="1">
813: </xsd:element>
814: <xsd:element name="digest" type="xsd:string"
815: minOccurs="1" maxOccurs="1">
816: </xsd:element>
817: <xsd:element name="data" type="xsd:string"
818: minOccurs="1" maxOccurs="1">
819: </xsd:element>
820: </xsd:sequence>
821: </xsd:complexType>
822:
823:
824:
825: <!-- ===================================================== -->
826: <!-- ================ Text Region =================== -->
827: <!-- ===================================================== -->
828:
829: <xsd:complexType name="_text-region">
830: <xsd:complexContent>
831: <xsd:extension base="_region">
832: <xsd:sequence>
833: <xsd:element name="begin-offset" type="xsd:integer"
834: minOccurs="1" maxOccurs="1">
835: </xsd:element>
836: <xsd:element name="length" type="xsd:integer"
837: minOccurs="1" maxOccurs="1">
838: </xsd:element>
839: </xsd:sequence>
840: </xsd:extension>
841: </xsd:complexContent>
842: </xsd:complexType>
843:
844: <xsd:complexType name="_line-range">
845: <xsd:sequence>
846: <xsd:element name="from-line" type="xsd:integer"
847: minOccurs="1" maxOccurs="1"/>
848: <xsd:element name="to-line" type="xsd:integer"
849: minOccurs="1" maxOccurs="1"/>
850: </xsd:sequence>
851: </xsd:complexType>
852:
853: <xsd:complexType name="_offset-range">
854: <xsd:sequence>
855: <xsd:element name="begin-offset" type="xsd:integer"
856: minOccurs="1" maxOccurs="1">
857: </xsd:element>
858: <xsd:element name="length" type="xsd:integer"
859: minOccurs="1" maxOccurs="1">
860: </xsd:element>
861: </xsd:sequence>
862: </xsd:complexType>
863:
864: <xsd:complexType name="_text-change">
865: <xsd:complexContent>
866: <xsd:extension base="_change">
867: <xsd:choice maxOccurs="1">
868: <xsd:element name="change-texts" type="_change-texts"
869: minOccurs="1" maxOccurs="1"/>
870: <xsd:element name="content" type="_content"
871: minOccurs="1" maxOccurs="1"/>
872: </xsd:choice>
873: </xsd:extension>
874: </xsd:complexContent>
875: </xsd:complexType>
876:
877:
878:
879: <!-- ===================================================== -->
880: <!-- ================ Java Region =================== -->
881: <!-- ===================================================== -->
882: <xsd:complexType name="_java-region">
883: <xsd:complexContent>
884: <xsd:extension base="_region">
885: <xsd:sequence>
886: <xsd:element name="begin-offset" type="xsd:integer"
887: minOccurs="1" maxOccurs="1">
888: </xsd:element>
889: <xsd:element name="length" type="xsd:integer"
890: minOccurs="1" maxOccurs="1">
891: </xsd:element>
892: </xsd:sequence>
893: </xsd:extension>
894: </xsd:complexContent>
895: </xsd:complexType>
896:
897: <xsd:complexType name="_java-change">
898: <xsd:complexContent>
899: <xsd:extension base="_change">
900: <xsd:sequence>
901: <xsd:choice maxOccurs="1">
902: <xsd:element name="change-texts" type="_change-texts"
903: minOccurs="1" maxOccurs="1"/>
904: <xsd:element name="content" type="_content"
905: minOccurs="1" maxOccurs="1"/>
906: </xsd:choice>
907: </xsd:sequence>
908: </xsd:extension>
909: </xsd:complexContent>
910: </xsd:complexType>
911:
912:
913:
914: <!-- ===================================================== -->
915: <!-- ================ Line Region =================== -->
916: <!-- ===================================================== -->
917: <xsd:complexType name="_line-region">
918: <xsd:complexContent>
919: <xsd:extension base="_region">
920: </xsd:extension>
921: </xsd:complexContent>
922: </xsd:complexType>
923:
924: <xsd:complexType name="_line-change">
925: <xsd:complexContent>
926: <xsd:extension base="_change">
927: <xsd:sequence>
928: <xsd:choice maxOccurs="1">
929: <xsd:element name="content" type="_content"
930: minOccurs="1" maxOccurs="1"/>
931: </xsd:choice>
932: </xsd:sequence>
933: </xsd:extension>
934: </xsd:complexContent>
935: </xsd:complexType>
936:
937:
938:
939: <!-- ===================================================== -->
940: <!-- ================Common Region Type=================== -->
941: <!-- ===================================================== -->
942:
943: <xsd:complexType name="_change-texts">
944: <xsd:sequence>
945: <xsd:element name="remove-texts" type="_remove-texts"
946: minOccurs="1" maxOccurs="1"/>
947: <xsd:element name="insert-texts" type="_insert-texts"
948: minOccurs="1" maxOccurs="1"/>
949: </xsd:sequence>
950: </xsd:complexType>
951:
952: <xsd:complexType name="_remove-texts">
953: <xsd:sequence>
954: <xsd:element name="remove-text" type="_remove-text"
955: minOccurs="1" maxOccurs="unbounded"/>
956: </xsd:sequence>
957: </xsd:complexType>
958:
959: <xsd:complexType name="_insert-texts">
960: <xsd:sequence>
961: <xsd:element name="insert-text" type="_insert-text"
962: minOccurs="1" maxOccurs="unbounded"/>
963: </xsd:sequence>
964: </xsd:complexType>
965:
966: <xsd:complexType name="_remove-text">
967: <xsd:sequence>
968: <xsd:element name="offset" type="xsd:integer"
969: minOccurs="1" maxOccurs="1"/>
970: </xsd:sequence>
971: </xsd:complexType>
972:
973: <xsd:complexType name="_insert-text">
974: <xsd:sequence>
975: <xsd:element name="offset" type="xsd:integer"
976: minOccurs="1" maxOccurs="1"/>
977: <xsd:element name="content" type="_content"
978: minOccurs="1" maxOccurs="1"/>
979: </xsd:sequence>
980: </xsd:complexType>
981:
982: </xsd:schema>
983:
984: */
|