Examples of Tree


Examples of org.molgenis.model.elements.Tree

        if (element.getAttribute("labelfield") != null && element.getAttribute("labelfield").isEmpty())
        {
          throw new MolgenisModelException("labelfield is missing for tree screen '" + name + "'");
        }

        Tree tree = new Tree(name, parent, element.getAttribute("parentfield"),
            element.getAttribute("idfield"), element.getAttribute("labelfield"));
        tree.setLabel(label);
        tree.setGroup(group);
        tree.setGroupRead(groupRead);

        if (group != null && groupRead != null && group.equals(groupRead))
        {
          throw new MolgenisModelException(
              "You cannot assign both read/write and read rights on a single tree");
        }

        tree.setNamespace(namespace);
        new_parent = tree;

        // READONLY
        tree.setReadOnly(true);
        String readonly = element.getAttribute("readonly");
        if (readonly != null)
        {
          tree.setReadOnly(Boolean.parseBoolean(readonly));
        }

        // ENTITY
        // TODO: whould have expected this in the constructor!
        DBSchema entity = model.getDatabase().getChild(element.getAttribute("entity"));
        if (entity == null)
        {
          throw new MolgenisModelException("Could not find the specified entity '"
              + element.getAttribute("entity") + "'");
        }
        tree.setRecord((Record) entity);
      }
      else if (element.getTagName().equals("plugin"))
      {
        if (element.getAttribute("type") != null && element.getAttribute("type").isEmpty())
        {
View Full Code Here

Examples of org.rascalmpl.library.vis.figure.tree.Tree

    case TIMER:
      return new Timer(env, c.get(0), c.get(1), makeChild(2,env,c,properties,childPropsNext), properties );
     
    case TREE:      
      children = makeList(env,c.get(0),properties,childPropsNext);
      return new Tree(Dimension.Y, children, properties);
     
    case TREEMAP:      
      children = makeList(env,c.get(0),properties,childPropsNext);
      return new TreeMap(children, properties);
View Full Code Here

Examples of org.telluriumsource.trump.Tree

    public static final String TAG = "tag";
    public static final String ID = "id";

    @Test
    public void testAddInOrderElement(){
        Tree tree = new Tree();
        Element e1 = new Element();
        e1.setUid("A");
        e1.setXpath("/html/body/table[@id='mt']");
        e1.addAttribute(TAG, "table");
        tree.addElement(e1);

        Element e2 = new Element();
        e2.setUid("B");
        e2.setXpath("/html/body/table[@id='mt']/tbody/tr/th[3]");
        e2.addAttribute(TAG, "th");
        tree.addElement(e2);

        Element e3 = new Element();
        e3.setUid("C");
        e3.setXpath("/html/body/table[@id='mt']/tbody/tr/th[3]/div");
        e3.addAttribute(TAG, "div");
        tree.addElement(e3);

        Element e4 = new Element();
        e4.setUid("D");
        e4.setXpath("/html/body/table[@id='mt']/tbody/tr/th[3]/div/div[4]");
        e4.addAttribute(TAG, "div");
        tree.addElement(e4);

        Element e5 = new Element();
        e5.setUid("E");
        e5.setXpath("/html/body/table[@id='mt']/tbody/tr/th[3]/div/div[4]/a");
        e5.addAttribute(TAG, "a");
        tree.addElement(e5);

        tree.printUI();
    }
View Full Code Here

Examples of org.tree.entity.Tree

          }
          parseTree(html, tree, parameters);
        }
      } else if (StringUtils.isNotBlank(treeId)) {
        // 说明是第一层
        Tree tree = getTreeFactory().find(treeId);
        if (tree == null) {
          LOG.info("not found tree. id = " + treeId);
          return null;
        }
        parseTree(html, tree, parameters);
View Full Code Here

Examples of org.zkoss.zul.Tree

   
    public void add() {

        // insert into database
        Bom obj = (Bom) viewToObj(null);
        Tree objTree = (Tree) getFellow("objTree");

        if (objTree.getSelectedItem() != null) {
            SimpleTreeNode node = (SimpleTreeNode) objTree.getSelectedItem().getValue();
            BomForm parentBomForm = (BomForm) node.getData();
            Bom parentBom = new Bom();
            try {
                BeanUtils.copyProperties(parentBom, parentBomForm);
            } catch (Exception iae) {
View Full Code Here

Examples of prefuse.data.Tree

        if ( m_root != null )
            return m_root;
       
        TupleSet ts = m_vis.getGroup(m_group);
        if ( ts instanceof Graph ) {
            Tree tree = ((Graph)ts).getSpanningTree();
            return (NodeItem)tree.getRoot();
        } else {
            throw new IllegalStateException("This action's data group does" +
                    "not resolve to a Graph instance.");
        }
    }
View Full Code Here

Examples of quickml.supervised.classifier.decisionTree.Tree

        instances.add(new InstanceImpl<AttributesMap>(attributes, "healthy"));
       
        {
           
            TreeBuilder treeBuilder = new TreeBuilder();
            Tree tree = treeBuilder.buildPredictiveModel(instances);

            attributes = AttributesMap.newHashMap() ;
            attributes.put("height",62);
            attributes.put("weight", 201);
            attributes.put("gender", "female");
            Serializable classification = tree.getClassificationByMaxProb(attributes);
            if (classification.equals("healthy")) {
                System.out.println("They are healthy!");
            } else if (classification.equals("underweight")) {
                System.out.println("They are underweight!");
            } else {
View Full Code Here

Examples of ro.fortsoft.wicket.pivot.tree.Tree

  @Override
  public Tree getColumnsHeaderTree() {
    if (columnsHeaderTree == null) {
      Node root = new Node();
      insertChildren(root, getFields(PivotField.Area.COLUMN));
      columnsHeaderTree = new Tree(root);
    }

    return columnsHeaderTree;
  }
View Full Code Here

Examples of timber.log.Timber.Tree

    FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
    log(logType, ft.getMessage(), ft.getThrowable());
  }

  private void log(LogType logType, String message, Throwable throwable) {
    Tree tree = Timber.tag(name);

    switch(logType) {
      case TRACE:
        if (throwable != null) {
          tree.v(throwable, message);
        } else {
          tree.v(message);
        }
        break;

      case DEBUG:
        if (throwable != null) {
          tree.d(throwable, message);
        } else {
          tree.d(message);
        }
        break;

      case INFO:
      default:
        if (throwable != null) {
          tree.i(throwable, message);
        } else {
          tree.i(message);
        }
        break;

      case WARN:
        if (throwable != null) {
          tree.w(throwable, message);
        } else {
          tree.w(message);
        }
        break;

      case ERROR:
        if (throwable != null) {
          tree.e(throwable, message);
        } else {
          tree.e(message);
        }
        break;
      }
  }
View Full Code Here

Examples of umat.beans.Tree

*
* @author Tudor
*/
public class NewClass {
    public static void main(String[] args){
        Tree tree=new Tree();
       XMLController ctr=new XMLController(tree);
       tree.getRoot().setData("NewTree");
       Node n1=new Node("n1",tree.getRoot());
       Node n2=new Node("n2",tree.getRoot());
       Node n3=new Node("n3",tree.getRoot());
      
       n1.setFieldName("f1");
       n1.setFieldType("String");
       n1.addField();
      
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.