org.ow2.weblab.core.extended.util
Class PoKUtil

java.lang.Object
  extended by org.ow2.weblab.core.extended.util.PoKUtil

public class PoKUtil
extends java.lang.Object

Uses to manipulate PieceOfKnowledge data field with a String.

Author:
Cassidian WebLab Team

Method Summary
static java.lang.String getPoKData(PieceOfKnowledge pok)
          Returns a String containing the RDF statements of the PieceOfKnowledge.
static void setPoKData(PieceOfKnowledge pok, java.lang.String pokStr)
          Same as setPoKData(pok, pokStr, true);
static void setPoKData(PieceOfKnowledge pok, java.lang.String pokStr, boolean strict)
          Set the PieceOfKnowledge data using a String, the parameter have to be a valid XML String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPoKData

public static java.lang.String getPoKData(PieceOfKnowledge pok)
Returns a String containing the RDF statements of the PieceOfKnowledge.

Parameters:
pok - PieceOfKnowledge you want to get the String content
Returns:
The String content of the PieceOfKnowledge

setPoKData

public static void setPoKData(PieceOfKnowledge pok,
                              java.lang.String pokStr,
                              boolean strict)
                       throws WebLabCheckedException
Set the PieceOfKnowledge data using a String, the parameter have to be a valid XML String. If the parameter don't start with '
Parameters:
pok - the PieceOfKnowledge you want to modify
pokStr - contains the RDF/XML String
strict - whether or not to be string and block some bad RDF/XML data
Throws:
WebLabCheckedException - if the String parameter is not XML valid; and also, if strict and the String parameter is not RDF/XML valid

setPoKData

public static void setPoKData(PieceOfKnowledge pok,
                              java.lang.String pokStr)
                       throws WebLabCheckedException
Same as setPoKData(pok, pokStr, true);

Parameters:
pok - the PieceOfKnowledge you want to modify
pokStr - contains the RDF/XML String
Throws:
WebLabCheckedException - if the String parameter is not RDF/XML valid
See Also:
setPoKData(PieceOfKnowledge, String, boolean)


Copyright © 2004-2010. All Rights Reserved.