示例#1
0
  /**
   * @param exp
   * @param ontoInfo
   * @return
   */
  public String getExportData(ExportParameterObject exp, OntologyInfo ontoInfo) {
    String concepturi = null;
    String expformat = "";
    String datetype = "";
    String datestart = "";
    String dateend = "";
    String expfileFormat = "";

    String termcode = null;
    String scheme = null;
    boolean isIncludeChildren = false;
    boolean getLabelForRelatedConcepts = false;
    @SuppressWarnings("unused")
    ArrayList<String> explang = new ArrayList<String>();

    if (!exp.isConceptURI()) concepturi = exp.getConceptURI();
    if (!exp.isDateTypeEmpty()) datetype = exp.getDateType();
    else datetype = "create";
    if (!exp.isStartDateEmpty()) datestart = exp.getStartDate();
    if (!exp.isEndDateEmpty()) dateend = exp.getEndDate();

    if (!exp.isFormatEmpty()) expformat = exp.getExportFormat();
    if (!exp.isFileFormatEmpty()) expfileFormat = exp.getFileFormat();
    if (!exp.isSchemeURIEmpty()) scheme = exp.getSchemeURI();
    if (!exp.isTermCodeEmpty()) {
      termcode = exp.getTermCode();
    }

    if (datetype != null) datetype = "";
    if (datestart != null) datestart = "";
    if (dateend != null) dateend = "";
    isIncludeChildren = exp.isIncludeChildren();
    getLabelForRelatedConcepts = exp.isIncludeLabelsOfRelatedConcepts();

    String filename = null;
    /*System.out.println("serv concepturi = "+concepturi);
    System.out.println("serv datetype = "+datetype);
    System.out.println("serv datestart = "+datestart);
    System.out.println("serv dateend = "+dateend);

    System.out.println("serv expformat = "+expformat);
    System.out.println("serv scheme = "+scheme);
    System.out.println("serv subvocab = "+subvocab);
    System.out.println("serv termcode = "+termcode + " startcode = "+startcode);

    System.out.println("langlist status = "+exp.isLangListEmpty());*/

    if (!exp.isLangListEmpty()) {
      explang = exp.getExpLanguage();
    }

    if ((concepturi != null && !concepturi.equals("")) || (scheme != null && !scheme.equals("")))
      filename =
          VocbenchManager.exportRequest(
              ontoInfo,
              concepturi,
              isIncludeChildren,
              scheme,
              termcode,
              getLabelForRelatedConcepts,
              expfileFormat,
              expformat);
    else filename = InputOutputManager.saveRDF(ontoInfo, expfileFormat, expformat);

    return filename;
  }
示例#2
0
 /**
  * @param ontoInfo
  * @return
  */
 public InitializeExportData initData(OntologyInfo ontoInfo) {
   InitializeExportData data = new InitializeExportData();
   data.setScheme(SKOSXLManager.getAllSchemesList(ontoInfo, null));
   data.setRDFFormat(InputOutputManager.getRDFFormat(ontoInfo));
   return data;
 }