protected Object getStdProperty(int id) { switch (id) { case PROP_IMPL_NAME: return IMPL_NAME; case PROP_IMPL_VERSION: return IMPL_VERSION; case PROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; case PROP_SUPPORT_XMLID: return doesSupportXmlId() ? Boolean.TRUE : Boolean.FALSE; case PROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE: return returnNullForDefaultNamespace() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new IllegalStateException("Internal error: no handler for property with internal id "+id+"."); } } }
public final Object safeGetProperty(String propName) { int id = findPropertyId(propName); if (id >= 0) { return getProperty(id); } id = findStdPropertyId(propName); if (id < 0) { return null; } return getStdProperty(id); }
/** * @return True, if the specified property was <b>successfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String propName, Object value) { int id = findPropertyId(propName); if (id >= 0) { return setProperty(propName, id, value); } id = findStdPropertyId(propName); if (id < 0) { reportUnknownProperty(propName); return false; } return setStdProperty(propName, id, value); }
public boolean isPropertySupported(String propName) { return (findPropertyId(propName) >= 0) || (findStdPropertyId(propName) >= 0); }
protected Object getStdProperty(int id) { switch (id) { case PROP_IMPL_NAME: return IMPL_NAME; case PROP_IMPL_VERSION: return IMPL_VERSION; case PROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new Error("Internal error: no handler for property with internal id "+id+"."); } } }
public final boolean isPropertySupported(String propName) { return (findPropertyId(propName) >= 0) || (findStdPropertyId(propName) >= 0); }
protected Object getStdProperty(int id) { switch (id) { case PROP_IMPL_NAME: return IMPL_NAME; case PROP_IMPL_VERSION: return IMPL_VERSION; case PROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new Error("Internal error: no handler for property with internal id "+id+"."); } } }
public Object getProperty(String propName) { /* Related to [WSTX-243]; would be nice to not to have to throw an * exception; but Stax spec suggests that we do need to indicate * unrecognized property by exception. */ int id = findPropertyId(propName); if (id >= 0) { return getProperty(id); } id = findStdPropertyId(propName); if (id < 0) { reportUnknownProperty(propName); return null; } return getStdProperty(id); }
/** * @return True, if the specified property was <b>successfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String propName, Object value) { int id = findPropertyId(propName); if (id >= 0) { return setProperty(propName, id, value); } id = findStdPropertyId(propName); if (id < 0) { reportUnknownProperty(propName); return false; } return setStdProperty(propName, id, value); }
public final boolean isPropertySupported(String propName) { return (findPropertyId(propName) >= 0) || (findStdPropertyId(propName) >= 0); }
protected Object getStdProperty(int id) { switch (id) { case PROP_IMPL_NAME: return IMPL_NAME; case PROP_IMPL_VERSION: return IMPL_VERSION; case PROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; case PROP_SUPPORT_XMLID: return doesSupportXmlId() ? Boolean.TRUE : Boolean.FALSE; case PROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE: return returnNullForDefaultNamespace() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new IllegalStateException("Internal error: no handler for property with internal id "+id+"."); } } }
protected Object getStdProperty(int id) { switch (id) { case PROP_IMPL_NAME: return IMPL_NAME; case PROP_IMPL_VERSION: return IMPL_VERSION; case PROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new Error("Internal error: no handler for property with internal id "+id+"."); } } }
public final Object safeGetProperty(String propName) { int id = findPropertyId(propName); if (id >= 0) { return getProperty(id); } id = findStdPropertyId(propName); if (id < 0) { return null; } return getStdProperty(id); }
/** * @return True, if the specified property was <b>successfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String propName, Object value) { int id = findPropertyId(propName); if (id >= 0) { return setProperty(propName, id, value); } id = findStdPropertyId(propName); if (id < 0) { reportUnknownProperty(propName); return false; } return setStdProperty(propName, id, value); }
public boolean isPropertySupported(String propName) { return (findPropertyId(propName) >= 0) || (findStdPropertyId(propName) >= 0); }
protected Object getStdProperty(int id) { switch (id) { case CPROP_IMPL_NAME: return IMPL_NAME; case CPROP_IMPL_VERSION: return IMPL_VERSION; case CPROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; case CPROP_SUPPORT_XMLID: return doesSupportXmlId() ? Boolean.TRUE : Boolean.FALSE; case CPROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE: return returnNullForDefaultNamespace() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new IllegalStateException("Internal error: no handler for property with internal id "+id+"."); } } }
public final Object safeGetProperty(String propName) { int id = findPropertyId(propName); if (id >= 0) { return getProperty(id); } id = findStdPropertyId(propName); if (id < 0) { return null; } return getStdProperty(id); }
/** * @return True, if the specified property was <b>successfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String propName, Object value) { int id = findPropertyId(propName); if (id >= 0) { return setProperty(propName, id, value); } id = findStdPropertyId(propName); if (id < 0) { reportUnknownProperty(propName); return false; } return setStdProperty(propName, id, value); }
public boolean isPropertySupported(String propName) { return (findPropertyId(propName) >= 0) || (findStdPropertyId(propName) >= 0); }
protected Object getStdProperty(int id) { switch (id) { case PROP_IMPL_NAME: return IMPL_NAME; case PROP_IMPL_VERSION: return IMPL_VERSION; case PROP_SUPPORTS_XML11: return doesSupportXml11() ? Boolean.TRUE : Boolean.FALSE; case PROP_SUPPORT_XMLID: return doesSupportXmlId() ? Boolean.TRUE : Boolean.FALSE; case PROP_RETURN_NULL_FOR_DEFAULT_NAMESPACE: return returnNullForDefaultNamespace() ? Boolean.TRUE : Boolean.FALSE; default: // sanity check, should never happen throw new IllegalStateException("Internal error: no handler for property with internal id "+id+"."); } } }