public KMLRawReader(InputStream inputStream, KMLRawReader.ReadType readType,
SimpleFeatureType featureType) {
if (KMLRawReader.ReadType.SCHEMA_AND_FEATURES.equals(readType)) {
if (featureType == null) {
parser = new PullParser(new KMLConfiguration(), inputStream, KML.Placemark,
KML.Schema);
} else {
parser = new PullParser(new KMLConfiguration(), inputStream, pullParserArgs(
featureTypeSchemaNames(featureType), KML.Placemark, KML.Schema));
}
} else if (KMLRawReader.ReadType.FEATURES.equals(readType)) {
if (featureType == null) {
parser = new PullParser(new KMLConfiguration(), inputStream, KML.Placemark);
} else {
parser = new PullParser(new KMLConfiguration(), inputStream, pullParserArgs(
featureTypeSchemaNames(featureType), KML.Placemark));
}
} else {
throw new IllegalArgumentException("Unknown parse read type: " + readType.toString());
}