• Post Reply Bookmark Topic Watch Topic
  • New Topic

java code using prize Tags  RSS feed

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Please help me for java coding using Prize Tags. Below i have written the java code that i have used in jsp page.

In this below code the the tree is already build in the ontology object and we are retrieving the tree. Let the tree be in the form like the rootnode is "thing" and child nodes are A,B,C,D. Suppose we want to create achild A1 with in node A and then we want to create a child A2 within the node A1. When we have created child A1 we are getting the parent A using session where the A stored for first case similarly we are obtaining A1, A and thing nodes(these are parent nodes) by using ITreeNode and ITree interface methods. But i want to highligt the parent under which i want to create the child for that i have used
select() method ,suppose i want to create a child with in A ie A1 for this i want to highlight the node A and for this i have used the method select(A) but the node A is not being highlighted insted the root node which is "thing" is being higligted.

if(session.getAttribute("tree.modelWb") == null && session.getAttribute("ontologyWb")!=null)
OWLOntology ontology = (OWLOntology)session.getAttribute("ontologyWb");
ITree tree = TreeBuilder.getTree(ontology);
System.out.println("The parent is "+(String)session.getAttribute("selectedParent"));
ITreeNode nodeName= tree.findNode((String)session.getAttribute("selectedParent"));
String assgnParent=(String)session.getAttribute("selectedParent");

String parentName="";
if(nodeName !=null){
ITreeNode parentNode;
ITreeNode parentNodeName=nodeName;
String parenNam=parentNode.getName();
if(session.getAttribute("selectedParent") !=null)
System.out.println("++++++ the selected node is :+++++++" +(String)session.getAttribute("selectedParent"));

session.setAttribute("tree.modelWb", tree);

With Regards
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!