Examples of HNodePath


Examples of edu.isi.karma.rep.HNodePath

  private ColumnAffinity findAffinity(ColumnTemplateTerm currentTerm,
      ColumnTemplateTerm comparisonTerm, Map<ColumnTemplateTerm, HNodePath> termToPath) {
    ColumnAffinity closestAffinity = NoColumnAffinity.INSTANCE;
    for(ColumnAffinity affinity : affinities)
    {
      HNodePath currentPath = termToPath.get(currentTerm);
      HNodePath comparisonPath= termToPath.get(comparisonTerm);
      if(affinity.isValidFor(currentPath, comparisonPath))
      {
        ColumnAffinity generatedAffinity = affinity.generateAffinity(currentPath, comparisonPath);
        if(generatedAffinity.isCloserThan(closestAffinity))
        {
View Full Code Here

Examples of edu.isi.karma.rep.HNodePath

      String hNodeIdForColumnName = translator.getHNodeIdForColumnName(term.getTemplateTermValue());
      if(hNodeIdForColumnName == null)
      {
        throw new HNodeNotFoundKarmaException("Unable to find column name while populating terms for subject template", term.getTemplateTermValue());
      }
      HNodePath path = factory.getHNode(hNodeIdForColumnName).getHNodePath(factory);
      subjectTermsToPaths.put(term, path);
    }
  }
View Full Code Here

Examples of edu.isi.karma.rep.HNodePath

    }
  }

  private void populateRowsWithDefaultValues(Worksheet worksheet, RepFactory factory) {
    SuperSelection selection = getSuperSelection(worksheet);
    HNodePath selectedPath = null;
    List<HNodePath> columnPaths = worksheet.getHeaders().getAllPaths();
    for (HNodePath path : columnPaths) {
      if (path.getLeaf().getId().equals(newHNodeId)) {
        selectedPath = path;
      }
View Full Code Here

Examples of edu.isi.karma.rep.HNodePath

    }
    if(!this.isExecutedInBatch())
      alignment.align();
   
    // Get the column name
    HNodePath currentPath = null;
    List<HNodePath> columnPaths = worksheet.getHeaders().getAllPaths();
    for (HNodePath path : columnPaths) {
      if (path.getLeaf().getId().equals(hNodeId)) {
        currentPath = path;
        columnName = path.getLeaf().getColumnName();
View Full Code Here

Examples of edu.isi.karma.rep.HNodePath

  private boolean isVisible(HTable headers, String key, RepFactory factory) {
    if (columnsJson == null)
      return true;
    HNode hn = headers.getParentHNode();   
    if (hn != null) {
      HNodePath hPath = hn.getHNodePath(factory);
      String path = hPath.toColumnNamePath() + "/" + key;
      Boolean b = columnsCache.get(path);
      if (b != null)
        return b;
      HNode first = null;
      JSONArray t = columnsJson;
      JSONObject tree = null;
      while (first != hn) {       
        first = hPath.getFirst();
        tree = getCorrespondingObject(t, first.getColumnName());
        if (tree == null || !tree.has("children")) {
          columnsCache.put(path, true);
          return true;
        }
        t = tree.getJSONArray("children");
        hPath = hPath.getRest();       
      }
      if (tree == null || !tree.has("children")) {
        columnsCache.put(path, true);
        return true;
      }
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.