public class Communities
extends java.lang.Object
implements pserver.pservlets.PService
Constructor and Description |
---|
Communities() |
Modifier and Type | Method and Description |
---|---|
void |
generateDistances(pserver.data.DBAccess dbAccess,
java.lang.String clientName,
pserver.algorithms.metrics.VectorMetric metric,
java.lang.String features)
Deletes user associations from database and then generates the user
distances.
|
void |
generateFtrDistances(pserver.data.DBAccess dbAccess,
java.lang.String clientName,
pserver.algorithms.metrics.VectorMetric metric)
Method referring to command part of process.
|
java.lang.String |
getMimeType()
Returns the mime type.
|
void |
init(java.lang.String[] params)
Overridden method of init from
PService Does nothing here. |
int |
service(pserver.data.VectorMap parameters,
java.lang.StringBuffer response,
pserver.data.DBAccess dbAccess)
Creates a service for Communities' mode when a command is sent to
PServer.
|
public void init(java.lang.String[] params) throws java.lang.Exception
PService
Does nothing here.init
in interface pserver.pservlets.PService
params
- An array of strings containing the parametersjava.lang.Exception
- Default Exception is thrown.public java.lang.String getMimeType()
getMimeType
in interface pserver.pservlets.PService
PService
.public int service(pserver.data.VectorMap parameters, java.lang.StringBuffer response, pserver.data.DBAccess dbAccess)
service
in interface pserver.pservlets.PService
parameters
- The parameters needed for this service.response
- The response string that is created.dbAccess
- The database manager.public void generateDistances(pserver.data.DBAccess dbAccess, java.lang.String clientName, pserver.algorithms.metrics.VectorMetric metric, java.lang.String features) throws java.sql.SQLException
dbAccess
- The database manager.clientName
- The name of the client.metric
- The metric that will be used to generate user distances.features
- The features in which the user distances generation will
be applied.java.sql.SQLException
- SQLException is throw on a database management
error.public void generateFtrDistances(pserver.data.DBAccess dbAccess, java.lang.String clientName, pserver.algorithms.metrics.VectorMetric metric) throws java.sql.SQLException
queryParam
- The parameters of the query.respBody
- The response message that is produced.dbAccess
- The database manager.java.sql.SQLException