Examples of TreeNodeImpl


Examples of org.richfaces.model.TreeNodeImpl

               }

               if (o != null && proceedOk) {
                   log.info("StorageBackingBean DoTreeView standardTraverseTree() o != null currentConfiguration: " + currentConfiguration);
                 if (currentConfiguration.equals(DataModelConfiguration.PLANETS)) {
                    TreeNodeImpl childNode = new TreeNodeImpl();
                    childNode.setData(ModelConfiguration.DIGITAL_OBJECT_MODEL.name());
                    childNode.setParent(node);
                    node.removeChild(NODE_ID);
                    node.addChild(NODE_ID, childNode);
 
                    if (o.getTitle() != null) {
                      addNode(childNode, ModelConfiguration.DigitalObjectModel.TITLE.name(), o.getTitle());
                    }
                    if (o.getPermanentUri() != null) {
                      addNode(childNode, ModelConfiguration.DigitalObjectModel.PLANETS_URI.name(),
                          o.getPermanentUri().toString());
                    }
                    if (o.getFormat() != null) {
                      addNode(childNode, ModelConfiguration.DigitalObjectModel.FORMAT.name(),
                          o.getFormat().toString());
                    }
                    if (o.getManifestationOf() != null) {
                      addNode(childNode, ModelConfiguration.DigitalObjectModel.MANIFESTATION_OF.name(),
                          o.getManifestationOf().toString());
                    }
                    describeMetadata(childNode, o);
                    describeEvents(childNode, o);
                 } else {
                    TreeNodeImpl childNode = new TreeNodeImpl();
                    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) {
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    private void loadTree(boolean applyFilter){
     
      PropertyDnDTreeBean.filterTreeStringOld = this.getFilterTreeString();
      this.selectedviewOld = this.getSelectedViewItem();
     
      rootNode = new TreeNodeImpl();

      if(this.selectedview.equals(VIEW_STANDARD)){
          OWLNamedClass startClass = owlModel.getOWLNamedClass("XCLOntology:specificationPropertyNames");
          this.rootNodeName = startClass.getLocalName();
          TreeViews.standardTraverseTree(startClass, new Vector(), rootNode, applyFilter);
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    public TreeNode getSelTreeNode(){
      return this.selNode;
    }
   
    public void setSelTreeNode(TreeNode node){
      this.selNode = new TreeNodeImpl();
      selNode.setData(node.getData());
    }
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

     
      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

Examples of org.richfaces.model.TreeNodeImpl

        }
       
        exclusions.add(id);
      }
     
      TreeNode node = new TreeNodeImpl();
      node.setData(xmlNodeData);
   
      this.treeNode.addChild(id, node);
      this.treeNodesList.add(this.treeNode);
      this.treeNode = node;
    }
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    return false;
  }

  public CacheableTreeDataModel(TreeDataModel model) {
    super();
    setWrappedData(new TreeNodeImpl());
    setTreeDataModel(model);
  }
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    while (!end) {
      String key = path != null ? path + '.' + counter : String.valueOf(counter);

      String value = properties.getProperty(key);
      if (value != null) {
        TreeNodeImpl nodeImpl = new TreeNodeImpl();
        nodeImpl.setData(value);
        node.addChild(new Integer(counter), nodeImpl);
       
        addNodes(key, nodeImpl, properties);
       
        counter++;
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    InputStream dataStream = externalContext.getResourceAsStream(DATA_PATH);
    try {
      Properties properties = new Properties();
      properties.load(dataStream);
     
      rootNode = new TreeNodeImpl();
      addNodes(null, rootNode, properties);
     
    } catch (IOException e) {
      throw new FacesException(e.getMessage(), e);
    } finally {
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    while (!end) {
      String key = path != null ? path + '.' + counter : String.valueOf(counter);

      String value = properties.getProperty(key);
      if (value != null) {
        TreeNodeImpl nodeImpl = new TreeNodeImpl();
        nodeImpl.setData(value);
        node.addChild(new Integer(counter), nodeImpl);
        addNodes(key, nodeImpl, properties);
        counter++;
      } else {
        end = true;
View Full Code Here

Examples of org.richfaces.model.TreeNodeImpl

    InputStream dataStream = externalContext.getResourceAsStream(DATA_PATH);
    try {
      Properties properties = new Properties();
      properties.load(dataStream);
     
      rootNode = new TreeNodeImpl();
      addNodes(null, rootNode, properties);
     
    } catch (IOException e) {
      throw new FacesException(e.getMessage(), e);
    } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.