|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.planetalia.dynject.sources.XMLContentSource
public class XMLContentSource
Represents a source that extracts the values of its properties from an XML tree using XPath expressions. The user provides a map between the property names and the XPath expressions used to extract that particular property. When the value of the property is needed, the XPath expression is processed and the result -evaluated as a string - is taken to be the value of the property
| Constructor Summary | |
|---|---|
XMLContentSource(org.w3c.dom.Document doc,
java.util.Map<java.lang.String,java.lang.String> xpathMap)
Creates and XMLContentSource using the specified XML document and Xpath expression map |
|
| Method Summary | |
|---|---|
protected org.w3c.dom.Node |
getNode(java.lang.String propertyName)
Returns the node corresponding to a property |
ClassPreferences |
getPropertyClass(java.lang.String propertyName)
Returns the class preferences for a property |
java.util.Set<java.lang.String> |
getPropertyNames()
Returns the set of all existing properties at the time of invocation. |
java.lang.Object |
getValue(java.lang.String propertyName)
Provides the value of a specific property |
boolean |
propertyExists(java.lang.String propertyName)
Checks whether a specific property exists. |
void |
setValue(java.lang.String propertyName,
java.lang.String value)
Sets the value of a specific property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLContentSource(org.w3c.dom.Document doc,
java.util.Map<java.lang.String,java.lang.String> xpathMap)
doc - Document to usexpathMap - Map associating property names and XPath Expressions| Method Detail |
|---|
protected org.w3c.dom.Node getNode(java.lang.String propertyName)
propertyName - Name of the requested property
public java.lang.Object getValue(java.lang.String propertyName)
IValueSource
getValue in interface IValueSource<java.lang.String>propertyName - Name of the requested property. Assumed to exist.
public boolean propertyExists(java.lang.String propertyName)
IValueSource
propertyExists in interface IValueSource<java.lang.String>propertyName - Name of the requested property
public ClassPreferences getPropertyClass(java.lang.String propertyName)
IValueSource
getPropertyClass in interface IValueSource<java.lang.String>propertyName - Name of the property
public java.util.Set<java.lang.String> getPropertyNames()
IValueSource
getPropertyNames in interface IValueSource<java.lang.String>
public void setValue(java.lang.String propertyName,
java.lang.String value)
IValueSource
setValue in interface IValueSource<java.lang.String>propertyName - Name of the requested property.value - Property value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||