import org.inference_web.pml.v2.pmlj.*;
import org.inference_web.pml.v2.pmlp.*;
import org.inference_web.pml.v2.util.*;
import org.inference_web.pml.v2.vocabulary.*;
public class NodeSetGen {
public NodeSetGen () {
try {
// initializing info needed to create NodeSet
String proofURI = "http://inference-web.org/2007/primer/examples/proofs/tonys/goal.owl#goal";
String conclusionString = "(type TonysSpecialty SHELLFISH)";
String languageURI = "http://inference-web.org/registry/LG/KIF.owl#KIF";
// create NodeSet instance
IWNodeSet ns = (IWNodeSet)PMLObjectManager.createPMLObject(PMLJ.NodeSet_lname);
// set NodeSet's identification
ns.setIdentifier(PMLObjectManager.getObjectID(proofURI));
// create Information instance as conclusion
IWInformation conclusion = (IWInformation)PMLObjectManager.createPMLObject(PMLP.Information_lname);
// set conclusion string and its language
conclusion.setHasRawString(conclusionString);
conclusion.setHasLanguage(languageURI);
// assign NodeSet's hasConclusion property value
ns.setHasConclusion(conclusion);
// get NodeSet's content on screen or save it to a file
System.out.println(PMLObjectManager.printToString(ns));
//PMLObjectManager.savePMLObject(ns, "fileName");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new NodeSetGen ();
}
}