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 FileGroup
043: * matches the schema element '_file-group'.
044: *
045: * Generated on Mon Sep 27 16:53:13 PDT 2004
046: */package org.netbeans.modules.collab.channel.filesharing.msgbean;
047:
048: public class FileGroup {
049: private java.lang.String _FileGroupName;
050: private User _User;
051: private java.util.List _FileName = new java.util.ArrayList(); // List<java.lang.String>
052:
053: public FileGroup() {
054: _FileGroupName = "";
055: _User = new User();
056: }
057:
058: // Deep copy
059: public FileGroup(
060: org.netbeans.modules.collab.channel.filesharing.msgbean.FileGroup source) {
061: _FileGroupName = source._FileGroupName;
062: _User = new org.netbeans.modules.collab.channel.filesharing.msgbean.User(
063: source._User);
064:
065: for (java.util.Iterator it = source._FileName.iterator(); it
066: .hasNext();) {
067: _FileName.add((java.lang.String) it.next());
068: }
069: }
070:
071: // This attribute is mandatory
072: public void setFileGroupName(java.lang.String value) {
073: _FileGroupName = value;
074: }
075:
076: public java.lang.String getFileGroupName() {
077: return _FileGroupName;
078: }
079:
080: // This attribute is mandatory
081: public void setUser(
082: org.netbeans.modules.collab.channel.filesharing.msgbean.User value) {
083: _User = value;
084: }
085:
086: public org.netbeans.modules.collab.channel.filesharing.msgbean.User getUser() {
087: return _User;
088: }
089:
090: // This attribute is an array containing at least one element
091: public void setFileName(java.lang.String[] value) {
092: if (value == null) {
093: value = new java.lang.String[0];
094: }
095:
096: _FileName.clear();
097:
098: for (int i = 0; i < value.length; ++i) {
099: _FileName.add(value[i]);
100: }
101: }
102:
103: public void setFileName(int index, java.lang.String value) {
104: _FileName.set(index, value);
105: }
106:
107: public java.lang.String[] getFileName() {
108: java.lang.String[] arr = new java.lang.String[_FileName.size()];
109:
110: return (java.lang.String[]) _FileName.toArray(arr);
111: }
112:
113: public java.util.List fetchFileNameList() {
114: return _FileName;
115: }
116:
117: public java.lang.String getFileName(int index) {
118: return (java.lang.String) _FileName.get(index);
119: }
120:
121: // Return the number of fileName
122: public int sizeFileName() {
123: return _FileName.size();
124: }
125:
126: public int addFileName(java.lang.String value) {
127: _FileName.add(value);
128:
129: return _FileName.size() - 1;
130: }
131:
132: // Search from the end looking for @param value, and then remove it.
133: public int removeFileName(java.lang.String value) {
134: int pos = _FileName.indexOf(value);
135:
136: if (pos >= 0) {
137: _FileName.remove(pos);
138: }
139:
140: return pos;
141: }
142:
143: public void writeNode(java.io.Writer out, String nodeName,
144: String indent) throws java.io.IOException {
145: out.write(indent);
146: out.write("<");
147: out.write(nodeName);
148: out.write(">\n");
149:
150: String nextIndent = indent + " ";
151:
152: if (_FileGroupName != null) {
153: out.write(nextIndent);
154: out.write("<file-group-name"); // NOI18N
155: out.write(">"); // NOI18N
156: org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab
157: .writeXML(out, _FileGroupName, false);
158: out.write("</file-group-name>\n"); // NOI18N
159: }
160:
161: if (_User != null) {
162: _User.writeNode(out, "user", nextIndent);
163: }
164:
165: for (java.util.Iterator it = _FileName.iterator(); it.hasNext();) {
166: java.lang.String element = (java.lang.String) it.next();
167:
168: if (element != null) {
169: out.write(nextIndent);
170: out.write("<file-name"); // NOI18N
171: out.write(">"); // NOI18N
172: org.netbeans.modules.collab.channel.filesharing.msgbean.CCollab
173: .writeXML(out, element, false);
174: out.write("</file-name>\n"); // NOI18N
175: }
176: }
177:
178: out.write(indent);
179: out.write("</" + nodeName + ">\n");
180: }
181:
182: public void readNode(org.w3c.dom.Node node) {
183: org.w3c.dom.NodeList children = node.getChildNodes();
184:
185: for (int i = 0, size = children.getLength(); i < size; ++i) {
186: org.w3c.dom.Node childNode = children.item(i);
187: String childNodeName = ((childNode.getLocalName() == null) ? childNode
188: .getNodeName().intern()
189: : childNode.getLocalName().intern());
190: String childNodeValue = "";
191:
192: if (childNode.getFirstChild() != null) {
193: childNodeValue = childNode.getFirstChild()
194: .getNodeValue();
195: }
196:
197: if (childNodeName == "file-group-name") {
198: _FileGroupName = childNodeValue;
199: } else if (childNodeName == "user") {
200: _User = new org.netbeans.modules.collab.channel.filesharing.msgbean.User();
201: _User.readNode(childNode);
202: } else if (childNodeName == "file-name") {
203: java.lang.String aFileName;
204: aFileName = childNodeValue;
205: _FileName.add(aFileName);
206: } else {
207: // Found extra unrecognized childNode
208: }
209: }
210: }
211:
212: public void changePropertyByName(String name, Object value) {
213: if (name == null) {
214: return;
215: }
216:
217: name = name.intern();
218:
219: if (name == "fileGroupName") {
220: setFileGroupName((java.lang.String) value);
221: } else if (name == "user") {
222: setUser((User) value);
223: } else if (name == "fileName") {
224: addFileName((java.lang.String) value);
225: } else if (name == "fileName[]") {
226: setFileName((java.lang.String[]) value);
227: } else {
228: throw new IllegalArgumentException(name
229: + " is not a valid property name for FileGroup");
230: }
231: }
232:
233: public Object fetchPropertyByName(String name) {
234: if (name == "fileGroupName") {
235: return getFileGroupName();
236: }
237:
238: if (name == "user") {
239: return getUser();
240: }
241:
242: if (name == "fileName[]") {
243: return getFileName();
244: }
245:
246: throw new IllegalArgumentException(name
247: + " is not a valid property name for FileGroup");
248: }
249:
250: // Return an array of all of the properties that are beans and are set.
251: public java.lang.Object[] childBeans(boolean recursive) {
252: java.util.List children = new java.util.LinkedList();
253: childBeans(recursive, children);
254:
255: java.lang.Object[] result = new java.lang.Object[children
256: .size()];
257:
258: return (java.lang.Object[]) children.toArray(result);
259: }
260:
261: // Put all child beans into the beans list.
262: public void childBeans(boolean recursive, java.util.List beans) {
263: if (_User != null) {
264: if (recursive) {
265: _User.childBeans(true, beans);
266: }
267:
268: beans.add(_User);
269: }
270: }
271:
272: public boolean equals(Object o) {
273: if (o == this ) {
274: return true;
275: }
276:
277: if (!(o instanceof org.netbeans.modules.collab.channel.filesharing.msgbean.FileGroup)) {
278: return false;
279: }
280:
281: org.netbeans.modules.collab.channel.filesharing.msgbean.FileGroup inst = (org.netbeans.modules.collab.channel.filesharing.msgbean.FileGroup) o;
282:
283: if (!((_FileGroupName == null) ? (inst._FileGroupName == null)
284: : _FileGroupName.equals(inst._FileGroupName))) {
285: return false;
286: }
287:
288: if (!((_User == null) ? (inst._User == null) : _User
289: .equals(inst._User))) {
290: return false;
291: }
292:
293: if (sizeFileName() != inst.sizeFileName()) {
294: return false;
295: }
296:
297: // Compare every element.
298: for (java.util.Iterator it = _FileName.iterator(), it2 = inst._FileName
299: .iterator(); it.hasNext() && it2.hasNext();) {
300: java.lang.String element = (java.lang.String) it.next();
301: java.lang.String element2 = (java.lang.String) it2.next();
302:
303: if (!((element == null) ? (element2 == null) : element
304: .equals(element2))) {
305: return false;
306: }
307: }
308:
309: return true;
310: }
311:
312: public int hashCode() {
313: int result = 17;
314: result = (37 * result)
315: + ((_FileGroupName == null) ? 0 : _FileGroupName
316: .hashCode());
317: result = (37 * result)
318: + ((_User == null) ? 0 : _User.hashCode());
319: result = (37 * result)
320: + ((_FileName == null) ? 0 : _FileName.hashCode());
321:
322: return result;
323: }
324: }
325:
326: /*
327: The following schema file has been used for generation:
328:
329: <?xml version="1.0" encoding="UTF-8"?>
330: <!--
331: Document : collab.xsd
332: Created on : May 21, 2004, 7:45 PM
333: Author : Ayub Khan
334: Description:
335: Purpose of the document follows.
336: -->
337: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
338: targetNamespace="http://sun.com/ns/collab/dev/1_0/filesharing"
339: xmlns:c="http://sun.com/ns/collab/dev/1_0"
340: xmlns:ch="http://sun.com/ns/collab/dev/1_0/filesharing"
341: elementFormDefault="qaulified">
342:
343: <!-- collab element -->
344: <xsd:element name="c:collab" type="_collab">
345: </xsd:element>
346:
347: <xsd:complexType name="_collab">
348: <xsd:sequence>
349: <xsd:element name="version" type="xsd:string"
350: minOccurs="1" maxOccurs="1"/>
351: <xsd:choice maxOccurs="1">
352: <xsd:element name="ch:send-file" type="_send-file"
353: minOccurs="0" maxOccurs="1"/>
354: <xsd:element name="ch:file-changed" type="_file-changed"
355: minOccurs="0" maxOccurs="1"/>
356: <xsd:element name="ch:lock-region" type="_lock-region"
357: minOccurs="0" maxOccurs="1"/>
358: <xsd:element name="ch:unlock-region" type="_unlock-region"
359: minOccurs="0" maxOccurs="1"/>
360: <xsd:element name="ch:join-filesharing" type="_join-filesharing"
361: minOccurs="0" maxOccurs="1"/>
362: <xsd:element name="ch:pause-filesharing" type="_pause-filesharing"
363: minOccurs="0" maxOccurs="1"/>
364: <xsd:element name="ch:resume-filesharing" type="_resume-filesharing"
365: minOccurs="0" maxOccurs="1"/>
366: <xsd:element name="ch:leave-filesharing" type="_leave-filesharing"
367: minOccurs="0" maxOccurs="1"/>
368: <xsd:element name="ch:commands" type="_commands"
369: minOccurs="0" maxOccurs="1"/>
370: </xsd:choice>
371: </xsd:sequence>
372: </xsd:complexType>
373:
374: <!-- Schema for send-file -->
375: <xsd:complexType name="_send-file">
376: <xsd:sequence>
377: <xsd:element name="file-groups" type="_file-groups"
378: minOccurs="1" maxOccurs="1"/>
379: <xsd:element name="send-file-data" type="_send-file-data"
380: minOccurs="1" maxOccurs="unbounded"/>
381: </xsd:sequence>
382: </xsd:complexType>
383:
384: <!-- Schema for file-changed -->
385: <xsd:complexType name="_file-changed">
386: <xsd:sequence>
387: <xsd:element name="file-groups" type="_file-groups"
388: minOccurs="1" maxOccurs="1"/>
389: <xsd:element name="file-changed-data" type="_file-changed-data"
390: minOccurs="1" maxOccurs="unbounded"/>
391: </xsd:sequence>
392: </xsd:complexType>
393:
394: <!-- Schema for lock-region -->
395: <xsd:complexType name="_lock-region">
396: <xsd:sequence>
397: <xsd:element name="file-groups" type="_file-groups"
398: minOccurs="1" maxOccurs="1"/>
399: <xsd:element name="lock-region-data" type="_lock-region-data"
400: minOccurs="1" maxOccurs="unbounded"/>
401: </xsd:sequence>
402: </xsd:complexType>
403:
404: <!-- Schema for unlock-region -->
405: <xsd:complexType name="_unlock-region">
406: <xsd:sequence>
407: <xsd:element name="file-groups" type="_file-groups"
408: minOccurs="1" maxOccurs="1"/>
409: <xsd:element name="unlock-region-data" type="_unlock-region-data"
410: minOccurs="1" maxOccurs="unbounded"/>
411: </xsd:sequence>
412: </xsd:complexType>
413:
414: <!-- Schema for join filesharing -->
415: <xsd:complexType name="_join-filesharing">
416: <xsd:sequence>
417: <xsd:choice maxOccurs="1">
418: <xsd:element name="begin-join"
419: minOccurs="0" maxOccurs="1"/>
420: <xsd:element name="end-join"
421: minOccurs="0" maxOccurs="1"/>
422: </xsd:choice>
423: <xsd:element name="user" type="_user"
424: minOccurs="1" maxOccurs="1"/>
425: </xsd:sequence>
426: </xsd:complexType>
427:
428: <!-- Schema for pause filesharing -->
429: <xsd:complexType name="_pause-filesharing">
430: <xsd:sequence>
431: <xsd:element name="join-user" type="_join-user"
432: minOccurs="1" maxOccurs="1"/>
433: <xsd:element name="moderator" type="_moderator"
434: minOccurs="1" maxOccurs="1"/>
435: <xsd:element name="file-owners" type="_file-owners"
436: minOccurs="1" maxOccurs="1"/>
437: <xsd:element name="users" type="_users"
438: minOccurs="1" maxOccurs="1"/>
439: <xsd:element name="file-groups" type="_file-groups"
440: minOccurs="1" maxOccurs="1"/>
441: </xsd:sequence>
442: </xsd:complexType>
443:
444: <!-- Schema for resume filesharing -->
445: <xsd:complexType name="_resume-filesharing">
446: <xsd:sequence>
447: <xsd:element name="moderator" type="_moderator"
448: minOccurs="1" maxOccurs="1"/>
449: </xsd:sequence>
450: </xsd:complexType>
451:
452: <!-- Schema for pause filesharing -->
453: <xsd:complexType name="_leave-filesharing">
454: <xsd:sequence>
455: <xsd:element name="user" type="_user"
456: minOccurs="1" maxOccurs="1"/>
457: <xsd:element name="new-moderator" type="_moderator"
458: minOccurs="1" maxOccurs="1"/>
459: <xsd:element name="new-file-owner" type="_new-file-owner"
460: minOccurs="1" maxOccurs="1"/>
461: <xsd:element name="file-groups" type="_file-groups"
462: minOccurs="1" maxOccurs="1"/>
463: </xsd:sequence>
464: </xsd:complexType>
465:
466: <!-- Schema for commands -->
467: <xsd:complexType name="_commands">
468: <xsd:sequence>
469: <xsd:choice maxOccurs="1">
470: <xsd:element name="filesystem-command" type="_filesystem-command"
471: minOccurs="1" maxOccurs="1"/>
472: </xsd:choice>
473: </xsd:sequence>
474: </xsd:complexType>
475:
476: <!-- ===================================================== -->
477:
478: <xsd:complexType name="_file-groups">
479: <xsd:sequence>
480: <xsd:element name="file-group" type="_file-group"
481: minOccurs="1" maxOccurs="unbounded"/>
482: </xsd:sequence>
483: </xsd:complexType>
484:
485: <xsd:complexType name="_file-group">
486: <xsd:sequence>
487: <xsd:element name="file-group-name" type="xsd:string"
488: minOccurs="1" maxOccurs="1"/>
489: <xsd:element name="user" type="_user"
490: minOccurs="1" maxOccurs="1"/>
491: <!-- file-name contains full path -->
492: <xsd:element name="file-name" type="xsd:string"
493: minOccurs="1" maxOccurs="unbounded"/>
494: </xsd:sequence>
495: </xsd:complexType>
496:
497: <xsd:complexType name="_send-file-data">
498: <xsd:sequence>
499: <xsd:element name="file-data" type="_file-data"
500: minOccurs="1" maxOccurs="1"/>
501: <xsd:element name="choose-line-region-function" type="xsd:boolean"
502: minOccurs="1" maxOccurs="1"/>
503: <xsd:choice maxOccurs="1">
504: <xsd:element name="line-region-function" type="_line-region-function"
505: minOccurs="1" maxOccurs="1"/>
506: <xsd:element name="line-region" type="_line-region"
507: minOccurs="1" maxOccurs="unbounded"/>
508: </xsd:choice>
509: <xsd:element name="content" type="_content"
510: minOccurs="1" maxOccurs="1"/>
511: </xsd:sequence>
512: </xsd:complexType>
513:
514: <xsd:complexType name="_line-region-function">
515: <xsd:sequence>
516: <xsd:element name="funtion-name" type="xsd:string"
517: minOccurs="1" maxOccurs="1"/>
518: <xsd:element name="arguments" type="xsd:string"
519: minOccurs="1" maxOccurs="unbounded"/>
520: </xsd:sequence>
521: </xsd:complexType>
522:
523: <xsd:complexType name="_file-data">
524: <xsd:sequence>
525: <!-- file-name contains full path -->
526: <xsd:element name="file-name" type="xsd:string"
527: minOccurs="1" maxOccurs="1"/>
528: <xsd:element name="content-type" type="xsd:string"
529: minOccurs="1" maxOccurs="1"/>
530: <xsd:element name="description" type="xsd:string"
531: minOccurs="0" maxOccurs="1"/>
532: </xsd:sequence>
533: </xsd:complexType>
534:
535: <!-- Schema for file-changed -->
536: <xsd:complexType name="_file-changed-data">
537: <xsd:sequence>
538: <!-- file-name contains full path -->
539: <xsd:element name="file-name" type="xsd:string"
540: minOccurs="1" maxOccurs="1"/>
541: <xsd:element name="digest" type="xsd:string"
542: minOccurs="1" maxOccurs="1"/>
543: <xsd:element name="region-changed" type="_region-changed"
544: minOccurs="1" maxOccurs="unbounded"/>
545: </xsd:sequence>
546: </xsd:complexType>
547:
548: <!-- Schema for lock-region -->
549: <xsd:complexType name="_lock-region-data">
550: <xsd:sequence>
551: <!-- file-name contains full path -->
552: <xsd:element name="file-name" type="xsd:string"
553: minOccurs="1" maxOccurs="1"/>
554: <xsd:element name="line-region" type="_line-region"
555: minOccurs="1" maxOccurs="unbounded"/>
556: <xsd:choice maxOccurs="1">
557: <xsd:element name="text-region" type="_text-region"
558: minOccurs="1" maxOccurs="1"/>
559: <xsd:element name="java-region" type="_java-region"
560: minOccurs="1" maxOccurs="1"/>
561: </xsd:choice>
562: <xsd:element name="content" type="_content"
563: minOccurs="1" maxOccurs="1"/>
564: </xsd:sequence>
565: </xsd:complexType>
566:
567: <!-- Schema for unlock-region -->
568: <xsd:complexType name="_unlock-region-data">
569: <xsd:sequence>
570: <!-- file-name contains full path -->
571: <xsd:element name="file-name" type="xsd:string"
572: minOccurs="1" maxOccurs="1"/>
573: <xsd:element name="line-region" type="_line-region"
574: minOccurs="1" maxOccurs="unbounded"/>
575: <xsd:choice maxOccurs="1">
576: <xsd:element name="text-region" type="_text-region"
577: minOccurs="1" maxOccurs="1"/>
578: <xsd:element name="java-region" type="_java-region"
579: minOccurs="1" maxOccurs="1"/>
580: </xsd:choice>
581: <xsd:element name="content" type="_content"
582: minOccurs="1" maxOccurs="1"/>
583: </xsd:sequence>
584: </xsd:complexType>
585:
586: <!-- user elements -->
587: <xsd:complexType name="_moderator">
588: <xsd:sequence>
589: <xsd:element name="users" type="_users"
590: minOccurs="1" maxOccurs="1"/>
591: </xsd:sequence>
592: </xsd:complexType>
593:
594: <xsd:complexType name="_join-user">
595: <xsd:sequence>
596: <xsd:element name="user" type="_user"
597: minOccurs="1" maxOccurs="1"/>
598: </xsd:sequence>
599: </xsd:complexType>
600:
601: <xsd:complexType name="_file-owners">
602: <xsd:sequence>
603: <xsd:element name="users" type="_users"
604: minOccurs="1" maxOccurs="1"/>
605: </xsd:sequence>
606: </xsd:complexType>
607:
608: <xsd:complexType name="_new-file-owner">
609: <xsd:sequence>
610: <xsd:element name="users" type="_users"
611: minOccurs="1" maxOccurs="1"/>
612: </xsd:sequence>
613: </xsd:complexType>
614:
615: <xsd:complexType name="_users">
616: <xsd:sequence>
617: <xsd:element name="user" type="_user"
618: minOccurs="0" maxOccurs="unbounded"/>
619: </xsd:sequence>
620: </xsd:complexType>
621:
622: <xsd:complexType name="_user">
623: <xsd:sequence>
624: <xsd:element name="id" type="xsd:string"
625: minOccurs="1" maxOccurs="1"/>
626: <xsd:element name="name" type="xsd:string"
627: minOccurs="0" maxOccurs="1"/>
628: <xsd:element name="description" type="xsd:string"
629: minOccurs="0" maxOccurs="1"/>
630: </xsd:sequence>
631: </xsd:complexType>
632:
633: <!-- filesystem command schema -->
634: <xsd:complexType name="_filesystem-command">
635: <xsd:sequence>
636: <xsd:choice maxOccurs="1">
637: <!-- file commands -->
638: <xsd:element name="delete-file" type="_delete-file"
639: minOccurs="1" maxOccurs="1"/>
640: </xsd:choice>
641: </xsd:sequence>
642: </xsd:complexType>
643:
644: <xsd:complexType name="_delete-file">
645: <xsd:sequence>
646: <!-- file-name contains full path -->
647: <xsd:element name="file-name" type="xsd:string"
648: minOccurs="1" maxOccurs="1"/>
649: </xsd:sequence>
650: </xsd:complexType>
651:
652: <!-- ===================================================== -->
653:
654: <xsd:complexType name="_region-changed">
655: <xsd:sequence>
656: <xsd:choice maxOccurs="1">
657: <xsd:element name="text-region-changed" type="_text-region-changed"
658: minOccurs="1" maxOccurs="1"/>
659: <xsd:element name="java-region-changed" type="_java-region-changed"
660: minOccurs="1" maxOccurs="1"/>
661: <xsd:element name="line-region-changed" type="_line-region-changed"
662: minOccurs="1" maxOccurs="1"/>
663: </xsd:choice>
664: </xsd:sequence>
665: </xsd:complexType>
666:
667: <xsd:complexType name="_text-region-changed">
668: <xsd:sequence>
669: <xsd:element name="text-region" type="_text-region"
670: minOccurs="1" maxOccurs="1"/>
671: <xsd:element name="text-change" type="_text-change"
672: minOccurs="1" maxOccurs="1"/>
673: </xsd:sequence>
674: </xsd:complexType>
675:
676: <xsd:complexType name="_java-region-changed">
677: <xsd:sequence>
678: <xsd:element name="java-region" type="_java-region"
679: minOccurs="1" maxOccurs="1"/>
680: <xsd:element name="java-change" type="_java-change"
681: minOccurs="1" maxOccurs="1"/>
682: </xsd:sequence>
683: </xsd:complexType>
684:
685: <xsd:complexType name="_line-region-changed">
686: <xsd:sequence>
687: <xsd:element name="line-region" type="_line-region"
688: minOccurs="1" maxOccurs="1"/>
689: <xsd:element name="line-change" type="_line-change"
690: minOccurs="1" maxOccurs="1"/>
691: </xsd:sequence>
692: </xsd:complexType>
693:
694: <xsd:complexType name="_region" abstract="true">
695: <xsd:sequence>
696: <xsd:element name="region-name" type="xsd:string"
697: minOccurs="1" maxOccurs="1">
698: </xsd:element>
699: </xsd:sequence>
700: </xsd:complexType>
701:
702: <xsd:complexType name="_change" abstract="true"/>
703:
704: <xsd:complexType name="_content">
705: <xsd:sequence>
706: <xsd:element name="encoding" type="xsd:string"
707: minOccurs="1" maxOccurs="1">
708: </xsd:element>
709: <xsd:element name="digest" type="xsd:string"
710: minOccurs="1" maxOccurs="1">
711: </xsd:element>
712: <xsd:element name="data" type="xsd:string"
713: minOccurs="1" maxOccurs="1">
714: </xsd:element>
715: </xsd:sequence>
716: </xsd:complexType>
717:
718:
719:
720: <!-- ===================================================== -->
721: <!-- ================ Text Region =================== -->
722: <!-- ===================================================== -->
723:
724: <xsd:complexType name="_text-region">
725: <xsd:complexContent>
726: <xsd:extension base="_region">
727: <xsd:sequence>
728: <xsd:element name="begin-offset" type="xsd:integer"
729: minOccurs="1" maxOccurs="1">
730: </xsd:element>
731: <xsd:element name="length" type="xsd:integer"
732: minOccurs="1" maxOccurs="1">
733: </xsd:element>
734: </xsd:sequence>
735: </xsd:extension>
736: </xsd:complexContent>
737: </xsd:complexType>
738:
739: <xsd:complexType name="_line-range">
740: <xsd:sequence>
741: <xsd:element name="from-line" type="xsd:integer"
742: minOccurs="1" maxOccurs="1"/>
743: <xsd:element name="to-line" type="xsd:integer"
744: minOccurs="1" maxOccurs="1"/>
745: </xsd:sequence>
746: </xsd:complexType>
747:
748: <xsd:complexType name="_offset-range">
749: <xsd:sequence>
750: <xsd:element name="begin-offset" type="xsd:integer"
751: minOccurs="1" maxOccurs="1">
752: </xsd:element>
753: <xsd:element name="length" type="xsd:integer"
754: minOccurs="1" maxOccurs="1">
755: </xsd:element>
756: </xsd:sequence>
757: </xsd:complexType>
758:
759: <xsd:complexType name="_text-change">
760: <xsd:complexContent>
761: <xsd:extension base="_change">
762: <xsd:choice maxOccurs="1">
763: <xsd:element name="change-texts" type="_change-texts"
764: minOccurs="1" maxOccurs="1"/>
765: <xsd:element name="content" type="_content"
766: minOccurs="1" maxOccurs="1"/>
767: </xsd:choice>
768: </xsd:extension>
769: </xsd:complexContent>
770: </xsd:complexType>
771:
772:
773:
774: <!-- ===================================================== -->
775: <!-- ================ Java Region =================== -->
776: <!-- ===================================================== -->
777: <xsd:complexType name="_java-region">
778: <xsd:complexContent>
779: <xsd:extension base="_region">
780: <xsd:sequence>
781: <xsd:element name="begin-offset" type="xsd:integer"
782: minOccurs="1" maxOccurs="1">
783: </xsd:element>
784: <xsd:element name="length" type="xsd:integer"
785: minOccurs="1" maxOccurs="1">
786: </xsd:element>
787: </xsd:sequence>
788: </xsd:extension>
789: </xsd:complexContent>
790: </xsd:complexType>
791:
792: <xsd:complexType name="_java-change">
793: <xsd:complexContent>
794: <xsd:extension base="_change">
795: <xsd:sequence>
796: <xsd:choice maxOccurs="1">
797: <xsd:element name="change-texts" type="_change-texts"
798: minOccurs="1" maxOccurs="1"/>
799: <xsd:element name="content" type="_content"
800: minOccurs="1" maxOccurs="1"/>
801: </xsd:choice>
802: </xsd:sequence>
803: </xsd:extension>
804: </xsd:complexContent>
805: </xsd:complexType>
806:
807:
808:
809: <!-- ===================================================== -->
810: <!-- ================ Line Region =================== -->
811: <!-- ===================================================== -->
812: <xsd:complexType name="_line-region">
813: <xsd:complexContent>
814: <xsd:extension base="_region">
815: </xsd:extension>
816: </xsd:complexContent>
817: </xsd:complexType>
818:
819: <xsd:complexType name="_line-change">
820: <xsd:complexContent>
821: <xsd:extension base="_change">
822: <xsd:sequence>
823: <xsd:choice maxOccurs="1">
824: <xsd:element name="content" type="_content"
825: minOccurs="1" maxOccurs="1"/>
826: </xsd:choice>
827: </xsd:sequence>
828: </xsd:extension>
829: </xsd:complexContent>
830: </xsd:complexType>
831:
832:
833:
834: <!-- ===================================================== -->
835: <!-- ================Common Region Type=================== -->
836: <!-- ===================================================== -->
837:
838: <xsd:complexType name="_change-texts">
839: <xsd:sequence>
840: <xsd:element name="remove-texts" type="_remove-texts"
841: minOccurs="1" maxOccurs="1"/>
842: <xsd:element name="insert-texts" type="_insert-texts"
843: minOccurs="1" maxOccurs="1"/>
844: </xsd:sequence>
845: </xsd:complexType>
846:
847: <xsd:complexType name="_remove-texts">
848: <xsd:sequence>
849: <xsd:element name="remove-text" type="_remove-text"
850: minOccurs="1" maxOccurs="unbounded"/>
851: </xsd:sequence>
852: </xsd:complexType>
853:
854: <xsd:complexType name="_insert-texts">
855: <xsd:sequence>
856: <xsd:element name="insert-text" type="_insert-text"
857: minOccurs="1" maxOccurs="unbounded"/>
858: </xsd:sequence>
859: </xsd:complexType>
860:
861: <xsd:complexType name="_remove-text">
862: <xsd:sequence>
863: <xsd:element name="offset" type="xsd:integer"
864: minOccurs="1" maxOccurs="1"/>
865: </xsd:sequence>
866: </xsd:complexType>
867:
868: <xsd:complexType name="_insert-text">
869: <xsd:sequence>
870: <xsd:element name="offset" type="xsd:integer"
871: minOccurs="1" maxOccurs="1"/>
872: <xsd:element name="content" type="_content"
873: minOccurs="1" maxOccurs="1"/>
874: </xsd:sequence>
875: </xsd:complexType>
876:
877: </xsd:schema>
878:
879: */
|