Revision 33738 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wcs/wcs_1_0_0/WCSCoverage1_0_0.java
WCSCoverage1_0_0.java | ||
---|---|---|
46 | 46 |
|
47 | 47 |
import java.io.IOException; |
48 | 48 |
|
49 |
import org.gvsig.compat.CompatLocator; |
|
50 |
import org.gvsig.compat.lang.StringUtils; |
|
49 | 51 |
import org.gvsig.remoteclient.utils.BoundaryBox; |
50 | 52 |
import org.gvsig.remoteclient.utils.DescribeCoverageTags; |
51 | 53 |
import org.gvsig.remoteclient.wcs.WCSCoverage; |
... | ... | |
59 | 61 |
public class WCSCoverage1_0_0 extends WCSCoverage{ |
60 | 62 |
String axisDescriptionName; |
61 | 63 |
|
64 |
private static final StringUtils stringUtils = CompatLocator.getStringUtils(); |
|
65 |
|
|
62 | 66 |
/* (non-Javadoc) |
63 | 67 |
* @see org.gvsig.remoteClient.wcs.WCSLayer#parse(org.kxml2.io.KXmlParser) |
64 | 68 |
*/ |
... | ... | |
98 | 102 |
parser.nextTag(); |
99 | 103 |
parser.require(KXmlParser.START_TAG, null, DescribeCoverageTags.FORMATS); |
100 | 104 |
while (parser.getName().compareTo(DescribeCoverageTags.FORMATS) == 0) { |
101 |
String[] formats = parser.nextText().split(SEPARATOR);
|
|
105 |
String[] formats = stringUtils.split(parser.nextText(), SEPARATOR);
|
|
102 | 106 |
for (int i = 0; i < formats.length; i++) { |
103 | 107 |
addFormat(formats[i]); |
104 | 108 |
} |
... | ... | |
157 | 161 |
{ |
158 | 162 |
case KXmlParser.START_TAG: |
159 | 163 |
if (parser.getName().compareTo(DescribeCoverageTags.REQUEST_RESPONSE_CRSS)==0) { |
160 |
String[] values = parser.nextText().split(SEPARATOR);
|
|
164 |
String[] values = stringUtils.split(parser.nextText(), SEPARATOR);
|
|
161 | 165 |
for (int i = 0; i < values.length; i++) { |
162 | 166 |
addSRSs(values[i]); |
163 | 167 |
} |
... | ... | |
470 | 474 |
|
471 | 475 |
if (parser.getName().compareTo(DescribeCoverageTags.GML_LOW) == 0) { |
472 | 476 |
value = parser.nextText(); |
473 |
String[] ss = value.split(SEPARATOR);
|
|
477 |
String[] ss = stringUtils.split(value, SEPARATOR);
|
|
474 | 478 |
int[] limits = new int[ss.length]; |
475 | 479 |
for (int i = 0; i < limits.length; i++) { |
476 | 480 |
limits[i] = Integer.parseInt(ss[i]); |
... | ... | |
478 | 482 |
rg.addLowGridEnvelopLimit(limits); |
479 | 483 |
} else if (parser.getName().compareTo(DescribeCoverageTags.GML_HIGH) == 0) { |
480 | 484 |
value = parser.nextText(); |
481 |
String[] ss = value.split(SEPARATOR);
|
|
485 |
String[] ss = stringUtils.split(value, SEPARATOR);
|
|
482 | 486 |
int[] limits = new int[ss.length]; |
483 | 487 |
for (int i = 0; i < limits.length; i++) { |
484 | 488 |
limits[i] = Integer.parseInt(ss[i]); |
... | ... | |
549 | 553 |
|
550 | 554 |
if (parser.getName().compareTo(DescribeCoverageTags.GML_LOW) == 0) { |
551 | 555 |
value = parser.nextText(); |
552 |
String[] ss = value.split(SEPARATOR);
|
|
556 |
String[] ss = stringUtils.split(value, SEPARATOR);
|
|
553 | 557 |
int[] limits = new int[ss.length]; |
554 | 558 |
for (int i = 0; i < limits.length; i++) { |
555 | 559 |
limits[i] = Integer.parseInt(ss[i]); |
... | ... | |
557 | 561 |
rg.addLowGridEnvelopLimit(limits); |
558 | 562 |
} else if (parser.getName().compareTo(DescribeCoverageTags.GML_HIGH) == 0) { |
559 | 563 |
value = parser.nextText(); |
560 |
String[] ss = value.split(SEPARATOR);
|
|
564 |
String[] ss = stringUtils.split(value, SEPARATOR);
|
|
561 | 565 |
int[] limits = new int[ss.length]; |
562 | 566 |
for (int i = 0; i < limits.length; i++) { |
563 | 567 |
limits[i] = Integer.parseInt(ss[i]); |
... | ... | |
585 | 589 |
parser.nextTag(); |
586 | 590 |
if (parser.getName().compareTo(DescribeCoverageTags.GML_POS)==0) { |
587 | 591 |
value = parser.nextText(); |
588 |
String[] ss = value.split(SEPARATOR);
|
|
592 |
String[] ss = stringUtils.split(value, SEPARATOR);
|
|
589 | 593 |
double[] ori = new double[ss.length]; |
590 | 594 |
for (int i = 0; i < ori.length; i++) { |
591 | 595 |
ori[i] = Double.parseDouble(ss[i]); |
... | ... | |
594 | 598 |
} |
595 | 599 |
} else if (parser.getName().compareTo(DescribeCoverageTags.OFFSETVECTOR) == 0) { |
596 | 600 |
value = parser.nextText(); |
597 |
String[] ss = value.split(SEPARATOR);
|
|
601 |
String[] ss = stringUtils.split(value, SEPARATOR);
|
|
598 | 602 |
double[] offset = new double[ss.length]; |
599 | 603 |
for (int i = 0; i < offset.length; i++) { |
600 | 604 |
offset[i] = Double.parseDouble(ss[i]); |
... | ... | |
637 | 641 |
String[] coordinates; |
638 | 642 |
double minx, miny, maxx, maxy; |
639 | 643 |
value = parser.nextText(); |
640 |
coordinates = value.split(SEPARATOR);
|
|
644 |
coordinates = stringUtils.split(value, SEPARATOR);
|
|
641 | 645 |
minx = Double.parseDouble(coordinates[0]); |
642 | 646 |
miny = Double.parseDouble(coordinates[1]); |
643 | 647 |
|
... | ... | |
645 | 649 |
|
646 | 650 |
parser.require(KXmlParser.START_TAG, null, DescribeCoverageTags.GML_POS); |
647 | 651 |
value = parser.nextText(); |
648 |
coordinates = value.split(SEPARATOR);
|
|
652 |
coordinates = stringUtils.split(value, SEPARATOR);
|
|
649 | 653 |
maxx = Double.parseDouble(coordinates[0]); |
650 | 654 |
maxy = Double.parseDouble(coordinates[1]); |
651 | 655 |
|
... | ... | |
689 | 693 |
String[] coordinates; |
690 | 694 |
double minx, miny, maxx, maxy; |
691 | 695 |
value = parser.nextText(); |
692 |
coordinates = value.split(SEPARATOR);
|
|
696 |
coordinates = stringUtils.split(value, SEPARATOR);
|
|
693 | 697 |
minx = Double.parseDouble(coordinates[0]); |
694 | 698 |
miny = Double.parseDouble(coordinates[1]); |
695 | 699 |
|
... | ... | |
697 | 701 |
//parser.nextTag(); |
698 | 702 |
parser.require(KXmlParser.START_TAG, null, DescribeCoverageTags.GML_POS); |
699 | 703 |
value = parser.nextText(); |
700 |
coordinates = value.split(SEPARATOR);
|
|
704 |
coordinates = stringUtils.split(value, SEPARATOR);
|
|
701 | 705 |
maxx = Double.parseDouble(coordinates[0]); |
702 | 706 |
maxy = Double.parseDouble(coordinates[1]); |
703 | 707 |
|
Also available in: Unified diff