This week's book giveaway is in the Game Development forum.
We're giving away four copies of Badass: Making Users Awesome and have Kathy Sierra on-line!
See this thread for details.
The moose likes JSP and the fly likes java code using prize Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "java code using prize Tags" Watch "java code using prize Tags" New topic

java code using prize Tags

sanjib kumar mandal

Joined: Jul 20, 2005
Posts: 8
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
subject: java code using prize Tags