use of org.jaxen.SimpleNamespaceContext in project pentaho-platform by pentaho.
the class PentahoObjectsConfig method getObjectBeanElement.
protected Element getObjectBeanElement(String objectId) {
try {
String xPath = MessageFormat.format(BEAN_ID_XPATH, objectId);
HashMap<String, String> map = new HashMap<String, String>();
// $NON-NLS-1$
map.put("default", DEFAULT_NAMESPACE);
Dom4jXPath xpath = new Dom4jXPath(xPath);
xpath.setNamespaceContext(new SimpleNamespaceContext(map));
Element element = (Element) xpath.selectSingleNode(document);
return element;
} catch (JaxenException jex) {
return null;
}
}
use of org.jaxen.SimpleNamespaceContext in project pentaho-platform by pentaho.
the class PentahoObjectsConfig method getObjectClassName.
public String getObjectClassName(String objectId) {
try {
String xPath = MessageFormat.format(BEAN_ID_XPATH, objectId);
HashMap<String, String> map = new HashMap<String, String>();
// $NON-NLS-1$
map.put("default", DEFAULT_NAMESPACE);
Dom4jXPath xpath = new Dom4jXPath(xPath);
xpath.setNamespaceContext(new SimpleNamespaceContext(map));
Element element = (Element) xpath.selectSingleNode(document);
return element.attributeValue(CLASS_ATTRIBUTE);
} catch (JaxenException jex) {
return null;
}
}
Aggregations