Package org.nexml.model

Examples of org.nexml.model.Annotation


   * @throws URISyntaxException
   */
  private void attachAnalysisMetadata(Map<String, AnalyzedData> analyzedDataForData, Study tbStudy, Document nexDoc) throws URISyntaxException {
    for ( Analysis tbAnalysis : tbStudy.getAnalyses() ) {
      URI tbAnalysisPurl = URI.create(tbAnalysis.getPhyloWSPath().getPurl().toString());
      Annotation nexAnalysis = nexDoc.addAnnotationValue("tb:identifier.analysis", Constants.TBTermsURI, tbAnalysisPurl);
      logger.info("attached analysis identifier " + tbAnalysisPurl);
     
      for ( AnalysisStep tbAnalysisStep : tbAnalysis.getAnalysisStepsReadOnly() ) {
        URI tbAnalysisStepPurl = URI.create(tbAnalysisStep.getPhyloWSPath().getPurl().toString());
        Annotation nexAnalysisStep = nexAnalysis.addAnnotationValue("tb:identifier.analysisstep", Constants.TBTermsURI, tbAnalysisStepPurl);
        logger.info("attached analysis step identifier " + tbAnalysisStepPurl);
       
        attachAnalysisStepMetadata(tbAnalysisStep, nexAnalysisStep);       
        for ( AnalyzedData tbAnalyzedData : tbAnalysisStep.getDataSetReadOnly() ) {
          String type = tbAnalyzedData.getDataType();
View Full Code Here


   * @throws URISyntaxException
   */
  private void attachAlgorithmMetadata(Annotation nexAnalysisStep,
      Algorithm tbAlgorithm) throws URISyntaxException {
    URI tbAlgorithmPurl = tbAlgorithm.getPhyloWSPath().getPurl().toURI();
    Annotation nexAlgorithm = nexAnalysisStep.addAnnotationValue("tb:identifier.algorithm", Constants.TBTermsURI, tbAlgorithmPurl);
    logger.info("attached algorithm url "+tbAlgorithmPurl);
   
    // attach algorithm type
    if ( null != tbAlgorithm.getAlgorithmType() ) {
      nexAlgorithm.addAnnotationValue("dc:type", Constants.DCURI, tbAlgorithm.getAlgorithmType());
      logger.info("attached algorithm type");
    }
   
    // attach algorithm description
    if ( null != tbAlgorithm.getDescription() ) {
      nexAlgorithm.addAnnotationValue("dc:description", Constants.DCURI, tbAlgorithm.getDescription());
      logger.info("attached algorithm description");
    }
  }
View Full Code Here

   * @param tbSoftware
   * @throws URISyntaxException
   */
  private void attachSoftwareMetadata(Annotation nexAnalysisStep, Software tbSoftware) throws URISyntaxException {
    URI tbSoftwarePurl = tbSoftware.getPhyloWSPath().getPurl().toURI();
    Annotation nexSoftware = nexAnalysisStep.addAnnotationValue("tb:identifier.software", Constants.TBTermsURI, tbSoftwarePurl);
    logger.info("attached software identifier "+tbSoftwarePurl);
   
    // attach software name
    if ( null != tbSoftware.getName() ) {
      nexSoftware.addAnnotationValue("dc:title", Constants.DCURI, tbSoftware.getName());
      logger.info("attached software title");
    }
   
    // attach software version
    if ( null != tbSoftware.getSoftwareVersion() ) {
      nexSoftware.addAnnotationValue("dc:identifier", Constants.DCURI, tbSoftware.getSoftwareVersion());
      logger.info("attached software version");
    }
   
    // attach software url
    if ( null != tbSoftware.getSoftwareURL() ) {
      URI tbSoftwareURL = URI.create(tbSoftware.getSoftwareURL());
      nexSoftware.addAnnotationValue("dc:source", Constants.DCURI, tbSoftwareURL);
      logger.info("attached software url");
    }
  }
View Full Code Here

        org.nexml.model.MatrixRow<CharacterState> xmlRow = xmlMatrix.getRowObject(xmlOTU);
        attachTreeBaseID(xmlRow, tbRow, MatrixRow.class);
       
        // this often only happens once, when the row has only 1 segment
        for ( RowSegment tbSegment : tbSegments ) {         
          Annotation xmlSegment = xmlRow.addAnnotationValue("tb:rowSegment", Constants.TBTermsURI, new String());
          xmlSegment.addAnnotationValue("tb:startIndex", Constants.TBTermsURI, tbSegment.getStartIndex());
          xmlSegment.addAnnotationValue("tb:endIndex", Constants.TBTermsURI, tbSegment.getEndIndex());
          copyDarwinCoreAnnotations(tbSegment, xmlSegment);
        }       
      }
    } 
  }
View Full Code Here

      }
      Set<RowSegment> tbSegments = tbRow.getSegmentsReadOnly();
      org.nexml.model.MatrixRow<Double> xmlRow = xmlMatrix.getRowObject(xmlOTU);
      attachTreeBaseID(xmlRow, tbRow, MatrixRow.class);
      for ( RowSegment tbSegment : tbSegments ) {       
        Annotation xmlSegment = xmlRow.addAnnotationValue("tb:rowSegment", Constants.TBTermsURI, new String());
        xmlSegment.addAnnotationValue("tb:startIndex", Constants.TBTermsURI, tbSegment.getStartIndex());
        xmlSegment.addAnnotationValue("tb:endIndex", Constants.TBTermsURI, tbSegment.getEndIndex());       
        copyDarwinCoreAnnotations(tbSegment,xmlSegment);
      }
    }   
  } 
View Full Code Here

TOP

Related Classes of org.nexml.model.Annotation

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.