-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathIXPathQueryManager.cs
More file actions
145 lines (125 loc) · 6.7 KB
/
IXPathQueryManager.cs
File metadata and controls
145 lines (125 loc) · 6.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// WFS provider by Peter Robineau (peter.robineau@gmx.at)
// This file can be redistributed and/or modified under the terms of the GNU Lesser General Public License.
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Xml.XPath;
namespace SharpMap.Utilities.Wfs
{
/// <summary>
/// XPathQueryManager interface
/// </summary>
public interface IXPathQueryManager
{
/// <summary>
/// Method to add/register an xml-namespace
/// </summary>
/// <param name="prefix">The prefix used to identify the namespace</param>
/// <param name="ns">The full namespace qualifier</param>
void AddNamespace(string prefix, string ns);
/// <summary>
/// Method to compile a <paramref name="xPath"/> to a <see cref="XPathExpression"/>
/// </summary>
/// <param name="xPath">The xpath to compile</param>
/// <returns>The compiled <see cref="XPathExpression"/></returns>
XPathExpression Compile(string xPath);
/// <summary>
/// Function to create a deep-copy clone of this <see cref="IXPathQueryManager"/>
/// </summary>
/// <returns>An <see cref="IXPathQueryManager"/> instance resembling this one.</returns>
IXPathQueryManager Clone();
/// <summary>
/// Function to get an iterator over <paramref name="xPath"/>
/// </summary>
/// <param name="xPath">The xPath expression to iterate</param>
/// <returns>An <see cref="XPathNodeIterator"/> iterator over <paramref name="xPath"/></returns>
XPathNodeIterator GetIterator(XPathExpression xPath);
/// <summary>
/// Function to get an iterator over <paramref name="xPath"/>, narrowed by <paramref name="queryParameters"/>
/// </summary>
/// <param name="xPath">The xPath expression to iterate</param>
/// <param name="queryParameters">The parameters to narrow the <paramref name="xPath"/></param>
/// <returns>An <see cref="XPathNodeIterator"/> iterator over <paramref name="xPath"/></returns>
XPathNodeIterator GetIterator(XPathExpression xPath, DictionaryEntry[] queryParameters);
/// <summary>
/// Function to get a value from <paramref name="xPath"/>
/// </summary>
/// <param name="xPath">The <see cref="XPathExpression"/> to get the value from</param>
/// <returns>A string value</returns>
string GetValueFromNode(XPathExpression xPath);
/// <summary>
/// Function to get a value from <paramref name="xPath"/>
/// </summary>
/// <param name="xPath">The <see cref="XPathExpression"/> to get the value from</param>
/// <param name="queryParameters">The parameters for narrowing the <paramref name="xPath"/></param>
/// <returns>A string value</returns>
string GetValueFromNode(XPathExpression xPath, DictionaryEntry[] queryParameters);
/// <summary>
/// Function to get a list of value from <paramref name="xPath"/>
/// </summary>
/// <param name="xPath">The <see cref="XPathExpression"/> to get the values from</param>
/// <returns>A list of string value</returns>
List<string> GetValuesFromNodes(XPathExpression xPath);
/// <summary>
/// Function to get a list of value from <paramref name="xPath"/>
/// </summary>
/// <param name="xPath">The <see cref="XPathExpression"/> to get the values from</param>
/// <param name="queryParameters">The parameters for narrowing the <paramref name="xPath"/></param>
/// <returns>A list of string value</returns>
List<string> GetValuesFromNodes(XPathExpression xPath, DictionaryEntry[] queryParameters);
/// <summary>
/// Function to return an instance of <see cref="XPathQueryManager"/>
/// in the context of the first node the XPath expression addresses.
/// </summary>
/// <param name="xPath">The compiled XPath expression</param>
/// <returns>A <see cref="IXPathQueryManager"/></returns>
IXPathQueryManager GetXPathQueryManagerInContext(XPathExpression xPath);
/// <summary>
/// Function to return an instance of <see cref="XPathQueryManager"/>
/// in the context of the first node the XPath expression addresses.
/// </summary>
/// <param name="xPath">The compiled XPath expression</param>
/// <param name="queryParameters">Parameters for the compiled XPath expression</param>
/// <returns>A <see cref="IXPathQueryManager"/></returns>
IXPathQueryManager GetXPathQueryManagerInContext(XPathExpression xPath, DictionaryEntry[] queryParameters);
/// <summary>
/// This method moves the current instance of <see cref="XPathQueryManager"/>
/// to the context of the next node a previously handed over XPath expression addresses.
/// </summary>
bool GetContextOfNextNode();
/// <summary>
/// This method moves the current instance of <see cref="XPathQueryManager"/>
/// to the context of node[index] of current position.
/// </summary>
/// <param name="index">The index of the node to search</param>
bool GetContextOfNode(uint index);
/// <summary>
/// Method to reset/delete the current namespace context
/// </summary>
void ResetNamespaces();
/// <summary>
/// Method to reset the inherent <see cref="XPathNavigator"/>.
/// </summary>
void ResetNavigator();
/// <summary>
/// Method to set the document to parse to <paramref name="documentStream"/>
/// </summary>
/// <param name="documentStream">The document stream</param>
void SetDocumentToParse(Stream documentStream);
/// <summary>
/// Method to set the document to parse to <paramref name="document"/>
/// </summary>
/// <param name="document">The document stream</param>
void SetDocumentToParse(byte[] document);
/// <summary>
/// Method to set the document to sth defined by <see cref="HttpClientUtil"/>
/// </summary>
/// <param name="httpClientUtil">The name of the file to parse</param>
void SetDocumentToParse(HttpClientUtil httpClientUtil);
/// <summary>
/// Method to set the document to parse to a file named <paramref name="documentFilename"/>
/// </summary>
/// <param name="documentFilename">The name of the file to parse</param>
void SetDocumentToParse(string documentFilename);
}
}