|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.sixdml.query.SixdmlQueryResultsMap
SixdmlQueryResultsMap.java A hashtable containing mappings between the results of an XPath query over a collection and the resources the query results came from. The primary benefit of this class is its ability to convert itself to XML if it conatins nodes or nodesets.
This class is not thread-safe. Created: Wed Jan 16 00:39:15 2002
| Field Summary | |
private String |
colName
The name or path to the collection that was queried to obtain this data. |
private String |
query
The query whose results are being used to populate this collection |
private HashMap |
resultsTable
This is the table of containing mappings of resource names to query results. |
| Fields inherited from interface org.sixdml.SixdmlConstants |
SIXDML_NS, SIXDML_VERSION |
| Constructor Summary | |
SixdmlQueryResultsMap(String colName,
String query)
Default constructor initializes class. |
|
| Method Summary | |
void |
clear()
Removes all mappings from this map. |
boolean |
containsKey(String key)
Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(String value)
Returns true if this map contains a mapping for the specified value. |
Set |
entrySet()
Returns a collection view of the mappings contained in this map. |
String |
get(String key)
Returns the value to which the specified key is mapped in this identity hash map, or null if the map contains no mapping for this key. |
String |
getCollectionName()
Get the value of name of the collection that was queried to create this object. |
String |
getQuery()
Get the value of query. |
String |
getXML()
Returns an XML representation of the data in this object as a string. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
String |
put(String resource,
String queryResults)
Associates the specified value with the specified key in this map. |
String |
remove(String resource)
Removes the mapping for this key from this map if present. |
int |
size()
Returns the number of key-value mappings in this map. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private HashMap resultsTable
private String query
private String colName
| Constructor Detail |
public SixdmlQueryResultsMap(String colName,
String query)
colName - the name of the collection that this query result object
holds data for.query - the query string that generated the results.| Method Detail |
public String getCollectionName()
public String getQuery()
public void clear()
public boolean containsKey(String key)
key - The key whose presence in this map is to be tested. The key should
be the name or path to a resource in the collection that was queried to populate
this object.public boolean containsValue(String value)
value - The value whose presence in this map is to be tested. The value should
be a String.public boolean isEmpty()
public int size()
public Set entrySet()
Map.Entrypublic String get(String key)
key - the key whose associated value is to be returned. The key should
be the name or path to a resource in the collection that was queried to populate
this object.
public String put(String resource,
String queryResults)
resource - key with which the specified value is to be associated.queryResults - value to be associated with the specified key.public String remove(String resource)
resource - key whose mapping is to be removed from the map.public String getXML()
<!ELEMENT query-results (query)+ > <!ATTLIST query-results collection-name CDATA #REQUIRED > <!ATTLIST query-results query CDATA #REQUIRED > <!ELEMENT query-result (#PCDATA)> <!ATTLIST query-result resource-name CDATA #REQUIRED >
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||