|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoj.lang.statserv.StatServConnection
public class StatServConnection
StatServConnection handles all communication with a StatServ server.
StatServ TODO:
- When adding to a document set the response should contain the number of
tokens added
- A StatServRequest should be able to contain a request for a list of available
docsets, e.g.
- Support in the XML for sending a list of tag-disambiguated lemma or inflected
words to the server instead of running text (i.e. one instance of each token)
- Extend the XML request to allow sending parameters to a module
- n-gram module with configurable n
Field Summary | |
---|---|
java.lang.String |
ampersand
Characters that break the request |
java.lang.String |
procent
|
java.net.URL |
statservURL
URL to current StatServ servlet |
Constructor Summary | |
---|---|
StatServConnection()
Create a new StatServConnection to the StatServ server given in the file StatServ.properties . |
Method Summary | |
---|---|
boolean |
addModule(StatServRequest module)
Adds a StatServRequest module to the connection. |
static void |
main(java.lang.String[] args)
|
boolean |
removeModule(StatServRequest module)
Removes a StatServRequest module from the connection. |
void |
removeModules()
Removes all StatServRequest modules from the connection. |
java.lang.String |
requestXML(java.lang.String title,
java.lang.String text)
Returns the XML that constitutes a StatServConnection request. |
java.lang.String |
StatServConnect(java.lang.String title,
java.lang.String text)
Sends the text and title to a StatServ servlet
and lets each previously addedStatServRequest module request
and parse its own statistics, which is then made available through each
StatServRequest module respectively. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.net.URL statservURL
public java.lang.String ampersand
public java.lang.String procent
Constructor Detail |
---|
public StatServConnection() throws java.net.MalformedURLException
StatServ.properties
.
java.net.MalformedURLException
Method Detail |
---|
public boolean addModule(StatServRequest module)
StatServRequest
module to the connection.
module
- StatServRequest
module to add
true
on success, else false
public boolean removeModule(StatServRequest module)
StatServRequest
module from the connection.
module
- StatServRequest
module to remove
true
on success, else false
public void removeModules()
StatServRequest
modules from the connection.
public java.lang.String requestXML(java.lang.String title, java.lang.String text)
StatServConnection
request.
title
- the title of the document statistics is requested fortext
- the text statistics is requested for
StatServConnection
requestpublic java.lang.String StatServConnect(java.lang.String title, java.lang.String text)
text
and title
to a StatServ servlet
and lets each previously addedStatServRequest
module request
and parse its own statistics, which is then made available through each
StatServRequest
module respectively.
title
- the title of the document statistics is requested fortext
- the text statistics is requested for
StatServRequest
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |