try {
old = arpf.getSAXParser().getProperty(str);
} catch (SAXNotSupportedException ns) {
old = null;
} catch (SAXNotRecognizedException nr) {
errorHandler.error(new UnknownPropertyException(str));
return null;
}
try {
arpf.getSAXParser().setProperty(str, obj);
} catch (SAXNotSupportedException ns) {
errorHandler.error(new JenaException(ns));
} catch (SAXNotRecognizedException nr) {
errorHandler.error(new UnknownPropertyException(str));
return null;
}
return old;
}
if (str.startsWith(saxFeaturesURL)
|| str.startsWith(apacheFeaturesURL)) {
Boolean old;
try {
old = new Boolean(arpf.getSAXParser().getFeature(str));
} catch (SAXNotSupportedException ns) {
old = null;
} catch (SAXNotRecognizedException nr) {
errorHandler.error(new UnknownPropertyException(str));
return null;
}
try {
arpf.getSAXParser().setFeature(str,
((Boolean) obj).booleanValue());
} catch (SAXNotSupportedException ns) {
errorHandler.error(new JenaException(ns));
} catch (SAXNotRecognizedException nr) {
errorHandler.error(new UnknownPropertyException(str));
return null;
} catch (ClassCastException cc) {
errorHandler.error(new JenaException(
new SAXNotSupportedException("Feature: '" + str
+ "' can only have a boolean value.")));