setArcIMSContentType(
getResourceIdentifier().guessArcIMSContentTypeFromResourceType(getResourceType()));
}
} else if (sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_RESOURCE_URL)) {
IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_RESOURCE_URL);
if (storeable != null) {
storeable.setValues(parameter.getContent().toValueArray());
if (getArcIMSContentType().length() == 0) {
setArcIMSContentType(
getResourceIdentifier().guessArcIMSContentTypeFromUrl(getResourceUrl()));
}
}
} else if (sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_DATATHEME)) {
IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_DATATHEME);
if (storeable != null) {
String[] values = parameter.getContent().toValueArray();
if ((values != null) && (values.length > 0)) {
Map<String,String> map = makeEsriDataThemeCodes();
ArrayList<String> al = new ArrayList<String>();
for (String value: values) {
String s = map.get(value);
if (s != null) al.add(s);
else al.add(value);
}
storeable.setValues(al.toArray(new String[0]));
}
}
} else if (sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_THUMBNAIL_BINARY)) {
_thumbnailBinary = sValue;
// handle the generic case
} else {
IStoreable storeable = this._storables.get(sMeaningType);
if (storeable == null) {
// TODO log a warning
} else {
// TODO need type checking
String[] values = parameter.getContent().toValueArray();
if ((values != null) && (values.length > 0)) {
Object[] existingValues = storeable.getValues();
if ((existingValues != null) && (existingValues.length > 0)) {
java.util.ArrayList<Object> alValues = new ArrayList<Object>();
for (Object value: existingValues) alValues.add(value);
for (String value: values) alValues.add(value);
storeable.setValues(alValues.toArray());
} else {
storeable.setValues(values);
}
}
}
}