Package org.richfaces.model

Examples of org.richfaces.model.TreeNode


       * @param o The digital object
       */
      private static void describeLinkingAgentId(TreeNode eventNode, Event eventObj) {
          Agent agentObj = eventObj.getAgent();  
          if (agentObj != null) {
              TreeNode agentNode = addNode(eventNode,
                  ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LINKING_AGENT_IDENTIFIER.name());
        try
        {
                  TreeNode agentIdNode = addNode(agentNode,
                      ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AGENT_IDENTIFIER.name());
                  if (agentObj.getId() != null) {
                    addNode(agentIdNode, ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AgentIdentifier.TYPE.name(), "String");
                    addNode(agentIdNode, ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AgentIdentifier.VALUE.name(), agentObj.getId());
                  }
View Full Code Here


          if (propertyList != null) {
            ListIterator<Property> iter = propertyList.listIterator();
       
                if (propertyList.size() > 0)
                {
                  TreeNode propertiesNode = addNode(eventNode,
                      ModelConfiguration.DigitalObjectModel.EventsList.Event.PROPERTIES.name());
                  int index = 0;
                  while(iter.hasNext())
              {
                      TreeNode propertyNode = addNodeExt(propertiesNode,
                          ModelConfiguration.DigitalObjectModel.EventsList.Event.PropertiesList.PROPERTY.name(), index);
                Property propertyObj = iter.next();
                try
                {
                          if (propertyObj.getUri() != null) {
View Full Code Here

          if (propertyList != null) {
            ListIterator<Property> iter = propertyList.listIterator();
       
                if (propertyList.size() > 0)
                {
                  TreeNode propertiesNode = addNode(eventNode,
                      ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LINKING_OBJECT_IDENTIFIER.name());
                  int index = 0;
                  while(iter.hasNext())
              {
                Property propertyObj = iter.next();
View Full Code Here

          if (eventList != null) {
            ListIterator<Event> iter = eventList.listIterator();
       
                if (eventList.size() > 0)
                {
                  TreeNode eventsNode = addNode(childNode, ModelConfiguration.DigitalObjectModel.EVENTS.name());
                  int index = 0;
              while(iter.hasNext())
              {
                      TreeNode eventNode = addNodeExt(
                          eventsNode, ModelConfiguration.DigitalObjectModel.EventsList.EVENT.name(), index);
                Event eventObj = iter.next();
                try
                {
                          if (eventObj.getDatetime() != null) {
View Full Code Here

          if (eventList != null) {
            ListIterator<Event> iter = eventList.listIterator();
       
                if (eventList.size() > 0)
                {
                  TreeNode eventsNode = addNode(childNode, ModelConfiguration.PremisModel.LINKING_EVENT_IDENTIFIERS.name());
                  int index = 0;
              while(iter.hasNext())
              {
                      TreeNode eventNode = addNodeExt(eventsNode,
                          ModelConfiguration.PremisModel.LinkingEventIdentifier.LINKING_EVENT_IDENTIFIER.name(),
                          index);
                Event eventObj = iter.next();
                try
                {
                          TreeNode eventIdNode = addNode(eventNode,
                              ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.EVENT_IDENTIFIER.name());
                        if (eventObj.getSummary() != null) {
                          addNode(eventIdNode,
                              ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.EvnetId.EVENT_IDENTIFIER_TYPE.name(), "String");
                          addNode(eventIdNode,
View Full Code Here

                    childNode.setData(ModelConfiguration.PREMIS_MODEL.name());
                    childNode.setParent(node);
                    node.removeChild(NODE_ID);
                    node.addChild(NODE_ID, childNode);
 
                      TreeNode idNode = addNode(childNode, ModelConfiguration.PremisModel.OBJECT_IDENTIFIER.name());
                    if (o.getPermanentUri() != null) {
                      addNode(idNode, ModelConfiguration.PremisModel.ObjectIdentifier.TYPE.name(), "URI");
                      addNode(idNode, ModelConfiguration.PremisModel.ObjectIdentifier.VALUE.name(),
                          o.getPermanentUri().toString());
                    }
                    if (o.getTitle() != null) {
                      addNode(childNode, ModelConfiguration.PremisModel.ORIGINAL_NAME.name(), o.getTitle());
                    }
                      TreeNode charNode = addNode(childNode, ModelConfiguration.PremisModel.OBJECT_CHARACTERISTICS.name());
                    if (o.getFormat() != null) {
                      addNode(charNode, ModelConfiguration.PremisModel.ObjectCharacteristics.FORMAT.name(),
                          o.getFormat().toString());
                    }
                      TreeNode relationshipNode = addNode(childNode, ModelConfiguration.PremisModel.RELATIONSHIP.name());
                      addNode(relationshipNode,
                          ModelConfiguration.PremisModel.Relationship.RELATED_OBJECT_IDENTIFIER.name());
                    if (o.getManifestationOf() != null) {
                      addNode(idNode,
                          ModelConfiguration.PremisModel.Relationship.RelatedObjectIdentifier.TYPE.name(), "URI");
View Full Code Here

     * User selected a leaf node and is interested in its data attributes
     * @param event
     */
    public void processSelection(NodeSelectedEvent event) {
        HtmlTree tree = (HtmlTree) event.getComponent();
        TreeNode currentNode = tree.getTreeNode(tree.getRowKey());
        if (currentNode.isLeaf()){
           this.setSelTreeNode(currentNode);
        }    
    }
View Full Code Here

    public void processDrop(DropEvent dropEvent) {
      // resolve drag source attributes
        UITreeNode srcNode = (dropEvent.getDraggableSource() instanceof UITreeNode) ? (UITreeNode) dropEvent.getDraggableSource() : null;
        UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
        TreeRowKey dragNodeKey = (dropEvent.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) dropEvent.getDragValue() : null;
        TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
       
        log.debug("dropped key: "+dragNodeKey);
      
        //add to list of selected properties
        if(draggedNode!=null)
          this.dndSelNodes.put(((OntologyProperty)draggedNode.getData()).getURI(),draggedNode);
    }
View Full Code Here

    }
   
    private void processAddNodeActionEvent(UITreeNode srcNode){
      UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
      TreeRowKey dragNodeKey = (srcNode.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) srcNode.getDragValue() : null;
      TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
     
      log.debug("dropped key: "+dragNodeKey);
     
      //add to list of selected properties
      if(draggedNode!=null)
          this.dndSelNodes.put(((OntologyProperty)draggedNode.getData()).getURI(),draggedNode);
    }
View Full Code Here

     
      public static TreeNode standardTraverseTree(OWLNamedClass cl, List stack, TreeNode node, boolean applyfilter) {
        Collection<RDFIndividual> instances = cl.getInstances(false);

            //adding a new category - isn't backed by any data, not even name??
            TreeNode childClass = new TreeNodeImpl();
            String instanceCountText = instances.size()>0 ? " ("+instances.size()+")" : "";
            childClass.setData(new DummyOntologyProperty(cl.getLocalName()+instanceCountText));
            //addChild(key, nodeImpl
            node.addChild(cl.getURI(),childClass);

            if (instances.size() > 0) {
                for (Iterator<RDFIndividual> jt = instances.iterator(); jt.hasNext();) {
                  try{
                    RDFIndividual individual = (RDFIndividual)jt.next();
                    //OWLIndividual individual = (OWLIndividual) jt.next();   
                    TreeNode child = new TreeNodeImpl();
                      OntologyProperty ontologyProperty = new OntologyPropertyImpl(individual);
                     
                      boolean bMatchesFilter = true;
                     if(applyfilter){
                       boolean b1 = ontologyProperty.getName().toLowerCase().contains(filterTreeString.toLowerCase());
                       boolean b2 = ontologyProperty.getHumanReadableName().toLowerCase().contains(filterTreeString.toLowerCase());
                       bMatchesFilter =  b1||b2;
                     }
                     if(bMatchesFilter){
                       child.setData(ontologyProperty);
                        childClass.addChild(ontologyProperty.getURI(), child);
                    }
                  }catch(ClassCastException e){
                    log.debug("Shouldn't happen any more: Filtering out RDFIndividual");
                  }
View Full Code Here

TOP

Related Classes of org.richfaces.model.TreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.