|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.firstpartners.rp.back.datastore.BasicCategoryStore
public class BasicCategoryStore
Simple Meta Data Store as an XML file.
| Field Summary | |
|---|---|
protected org.apache.log4j.Logger |
logger
Logger for this class and subclasses |
(package private) static java.lang.String |
MODEL_EXTENSION
Model extension |
(package private) static java.lang.String |
MODEL_NAME
Model name |
private static java.lang.String |
SEPARATOR
Separator for the links list (categoryname/nodeid) |
| Constructor Summary | |
|---|---|
BasicCategoryStore()
|
|
| Method Summary | |
|---|---|
private com.hp.hpl.jena.rdf.model.Resource |
generateResource(NodeStruct root,
com.hp.hpl.jena.rdf.model.Model model)
Generate the RDF-Resource for the content node |
double |
getDirectScore(java.lang.String categName,
java.lang.String documID)
Get the direct score for the specified document id in the category |
double |
getImpliedScore(java.lang.String categName,
java.lang.String documID)
Get the implied score for the specified document id in the category |
private java.lang.String |
getModelPath(java.lang.String categoryname,
java.lang.String documentid)
Get the model path for the specified document in the category |
java.lang.String |
getOriginalLocation(java.lang.String path)
Get the original location of the category from the model. |
void |
store(DocumStruct doc)
Store the document data as rdf-xml. |
void |
updateCategoryScore(java.lang.String categoryname,
int userScore)
Update the category score using the categoryname and user feedback score |
void |
updateDocumentDirectScore(java.lang.String categoryname,
java.lang.String documentid,
int userScore)
Update the direct score of the document using the categoryname, document id and user feedback score |
void |
updateDocumentLinksAndScore(java.util.LinkedList listLinks,
int userScore)
Update the document with the specified links list and user feedback (+/-) |
private void |
updateModelCategoryScore(java.lang.String modelpath,
int userScore)
Update the category score of the document using the model path and user feedback score |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final java.lang.String MODEL_NAME
static final java.lang.String MODEL_EXTENSION
private static final java.lang.String SEPARATOR
protected final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public BasicCategoryStore()
| Method Detail |
|---|
public java.lang.String getOriginalLocation(java.lang.String path)
throws RpException
getOriginalLocation in interface ICategoryStorepath - Category folder path
RpException - If an error occur in reading the document location
public double getDirectScore(java.lang.String categName,
java.lang.String documID)
throws RpException
getDirectScore in interface ICategoryStorecategName - The category namedocumID - The document id
RpException - If an error occur in reading the direct score of the
document
public double getImpliedScore(java.lang.String categName,
java.lang.String documID)
throws RpException
getImpliedScore in interface ICategoryStorecategName - The category namedocumID - The document id
RpException - If an error occur in calculate the implied score of
the document
private java.lang.String getModelPath(java.lang.String categoryname,
java.lang.String documentid)
categoryname - The category namedocumentid - The document id
public void updateDocumentLinksAndScore(java.util.LinkedList listLinks,
int userScore)
updateDocumentLinksAndScore in interface ICategoryStorelistLinks - Links list to update the documentuserScore - User feedback score (+/-)
public void updateDocumentDirectScore(java.lang.String categoryname,
java.lang.String documentid,
int userScore)
updateDocumentDirectScore in interface ICategoryStorecategoryname - The category namedocumentid - The document iduserScore - The user feedback score (+1/-1)
private void updateModelCategoryScore(java.lang.String modelpath,
int userScore)
modelpath - The model pathuserScore - The user feedback score (+1/-1)
public void updateCategoryScore(java.lang.String categoryname,
int userScore)
updateCategoryScore in interface ICategoryStorecategoryname - The category nameuserScore - The user feedback score (+1/-1)
public void store(DocumStruct doc)
throws RpException
store in interface ICategoryStoredoc - Document to be stored
RpException - If an error occur in storing the data
private com.hp.hpl.jena.rdf.model.Resource generateResource(NodeStruct root,
com.hp.hpl.jena.rdf.model.Model model)
root - Node struct contentmodel - RDF-Model used for generation of the resources
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||