Package org.mmisw.orrportal.gwt.client.voc2rdf

Examples of org.mmisw.orrportal.gwt.client.voc2rdf.VocabClassPanel$ImportCommand


//        public String getColValue(String sortColumn) {
//          return "";
//        }
//      });

      VocabClassPanel classPanel = new VocabClassPanel(classData, myVocabPanel, readOnly);
      baseOntologyContentsPanels.add(classPanel);

//      classPanel.importContents(classHeader, rows);
     
      vp.add(classPanel.getWidget());
     
      return vp;
    }
   
    for ( ClassData classData : classes ) {
      List<String> classHeader = classData.getDatatypeProperties();
     
      VocabClassPanel classPanel = new VocabClassPanel(classData, myVocabPanel, readOnly);
      baseOntologyContentsPanels.add(classPanel);
     
//      ViewTable viewTable = new ViewTable(colNames);
//      tp.add(viewTable.getWidget());
     

      List<IndividualInfo> individuals = classData.getIndividuals();
      log("num individuals: " +individuals.size());
     
      List<IRow> rows = new ArrayList<IRow>();
     
      for ( IndividualInfo entity : individuals ) {
       
        final Map<String, String> vals = new HashMap<String, String>();
        List<PropValue> props = entity.getProps();
        for ( PropValue pv : props ) {
          vals.put(pv.getPropName(), pv.getValueName());
        }

        vals.put("Name", entity.getLocalName());
       
        rows.add(new RowAdapter() {
          public String getColValue(String colName) {
            return vals.get(colName);
          }
        });

      }
     
      classPanel.importContents(classHeader, rows);
     
      vp.add(classPanel.getWidget());
     
    }
   
    return vp;
  }
View Full Code Here


   
    // TODO why check only the first element?
    BaseOntologyContentsPanel baseOntologyContentsPanel = baseOntologyContentsPanels.iterator().next();

    if ( baseOntologyContentsPanel instanceof VocabClassPanel ) {
      VocabClassPanel vocabClassPanel = (VocabClassPanel) baseOntologyContentsPanel;
     
      return vocabClassPanel.getCreateOntologyInfo();
    }
    else if ( baseOntologyContentsPanel instanceof VineOntologyContentsPanel ) {
      VineOntologyContentsPanel ontologyContentsPanel = (VineOntologyContentsPanel) baseOntologyContentsPanel;
     
      return ontologyContentsPanel.getCreateOntologyInfo();
View Full Code Here

        termContents.append(_sep + QUOTECHAR +colNames[i]+ QUOTECHAR);
        _sep = String.valueOf(SEPARATOR);
      }
      termContents.append("\n");
     
      VocabClassPanel classPanel = new VocabClassPanel(classData, myVocabPanel, false);
      tp.add(classPanel.getWidget());
//      ViewTable viewTable = new ViewTable(colNames);
//      tp.add(viewTable.getWidget());
     

      List<IndividualInfo> individuals = classData.getIndividuals();
      Orr.log("num individuals: " +individuals.size());
     
      for ( IndividualInfo entity : individuals ) {
       
        final Map<String, String> vals = new HashMap<String, String>();
        List<PropValue> props = entity.getProps();
        for ( PropValue pv : props ) {
          vals.put(pv.getPropName(), pv.getValueName());
        }

        vals.put("Name", entity.getLocalName());
       
        _sep = "";
        for (int i = 0; i < colNames.length; i++) {
          String val = vals.get(colNames[i]);
          if ( val == null ) {
            val = "";
          }
          termContents.append(_sep + QUOTECHAR +val+ QUOTECHAR);
          _sep = String.valueOf(SEPARATOR);
        }
       
        termContents.append("\n");
      }
     
//      viewTable.setRows(rows);
      classPanel.importContents(SEPARATOR, termContents.toString());
     
      vp.add(tp);
     
    }
   
View Full Code Here

TOP

Related Classes of org.mmisw.orrportal.gwt.client.voc2rdf.VocabClassPanel$ImportCommand

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.