Package org.cipres.treebase.domain

Examples of org.cipres.treebase.domain.Annotation


  public boolean isCharacterMatrix() { return true; }
 
  @Transient
  public List<Annotation> getAnnotations() {
    List<Annotation> annotations = super.getAnnotations();
    annotations.add(new Annotation(Constants.TBTermsURI,"tb:type.matrix",getDataType().getDescription()));
    annotations.add(new Annotation(Constants.TBTermsURI,"tb:ntax.matrix",getnTax()));
    annotations.add(new Annotation(Constants.TBTermsURI,"tb:nchar.matrix",getnChar()));
    annotations.add(new Annotation(Constants.TBTermsURI,"tb:identifier.matrix",getId()));
    return annotations;
 
View Full Code Here


    List<Annotation> annotations = super.getAnnotations();
    try {
      TaxonVariant tv = getTaxonVariant();
      if ( null != tv ) {
        if ( null != tv.getNamebankID() ) {
          annotations.add(new Annotation(Constants.SKOSURI, "skos:closeMatch", URI.create(Constants.uBioBase+tv.getNamebankID())));         
          String fullName = tv.getFullName();
          if ( ! getLabel().equals(fullName) ) {
            annotations.add(new Annotation(Constants.SKOSURI, "skos:altLabel",fullName));
          }
          if ( null != getNcbiTaxID() ) {
            annotations.add(new Annotation(Constants.SKOSURI, "skos:closeMatch", URI.create(String.format(Constants.NCBITaxonomyFormat, getNcbiTaxID()))));
            Taxon taxon = tv.getTaxon();
            String taxonName = taxon.getLabel();
            if ( ! fullName.equals(taxonName) ) {
              annotations.add(new Annotation(Constants.SKOSURI, "skos:prefLabel",taxonName));
            }
            Integer tb1LegacyID = taxon.getTB1LegacyId();
            if ( null != tb1LegacyID && taxon.getId() != tb1LegacyID.longValue() ) {
              annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxon.tb1", tb1LegacyID.longValue()));
            }           
          }         
        }
        Integer tb1TvId = tv.getTB1LegacyId();
        if ( null != tb1TvId && tv.getId() != tb1TvId.longValue() ) {
          annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant.tb1", tb1TvId.longValue() ));
       
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant", tv.getId()));
        Taxon taxon = tv.getTaxon();
        if ( null != taxon ) {
          annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxon", taxon.getId()));
        }
      }
    }
    catch ( Exception e) {
      e.printStackTrace();
View Full Code Here

  @Transient
  public List<Annotation> getAnnotations() {
    List<Annotation> annotations = super.getAnnotations();
    try {
      if ( null != getKindDescription() ) {
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:kind.tree", getKindDescription()));
      }
      if ( null != getTypeDescription() ) {
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:type.tree", getTypeDescription()));
      }
      if ( null != getQualityDescription() ) {
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:quality.tree", getQualityDescription()));
      }
      if ( null != getnTax() ) {
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:ntax.tree", getnTax()));
     
    } catch ( Exception e ) {
      e.printStackTrace();
    }
    return annotations;
View Full Code Here

  }
 
  @Transient
  public List<Annotation> getAnnotations() {   
    List<Annotation> annotations = super.getAnnotations();
    annotations.add(new Annotation(Constants.DCTermsURI,"dcterms:bibliographicCitation",getAuthorsCitationStyleWithoutHtml()));
    annotations.add(new Annotation(Constants.DCURI,"dc:title",getTitle()));
    annotations.add(new Annotation(Constants.DCURI,"dc:creator",getAuthorsAsString()));
    for ( Person person : getAuthors() ) {
      if ( null != person ) {
        String personName = person.getFullNameCitationStyle();
        annotations.add(new Annotation(Constants.DCURI,"dc:contributor",personName));
      }
    }
    try {
      if ( null != getPublishYear() ) {
        annotations.add(new Annotation(Constants.PrismURI,"prism:publicationDate",getPublishYear().toString()));
      }
      if ( null != getDoi() ) {
        annotations.add(new Annotation(Constants.PrismURI,"prism:doi",getDoi()));
      }
      if ( null != getPages() ) {
        String[] pages = getPages().split("\\-");
        if ( pages.length == 2 ) {
          annotations.add(new Annotation(Constants.PrismURI,"prism:startingPage",pages[0]));
          annotations.add(new Annotation(Constants.PrismURI,"prism:endingPage",pages[1]));
          annotations.add(new Annotation(Constants.PrismURI,"prism:pageRange",getPages()));     
        }
      }
      if ( null != getKeywords() ) {
        String[] keywords = getKeywords().split(", ");
        for ( int i = 0; i < keywords.length; i++ ) {
          annotations.add(new Annotation(Constants.DCURI,"dc:subject",keywords[i]));
        }   
      }
      if ( this instanceof ArticleCitation ) {
        ArticleCitation ac = (ArticleCitation)this;
        String journal = ac.getJournal();
        if ( null != journal ) {
          annotations.add(new Annotation(Constants.PrismURI,"prism:publicationName",journal));
          annotations.add(new Annotation(Constants.DCURI,"dc:publisher",journal));
        }
        if ( null != ac.getVolume() ) {
          annotations.add(new Annotation(Constants.PrismURI,"prism:volume",ac.getVolume()));
        }
        if ( null != ac.getIssue() ) {
          annotations.add(new Annotation(Constants.PrismURI,"prism:number",ac.getIssue()));
        }
      }
    } catch ( Exception e ) {
      e.printStackTrace();
    }
View Full Code Here

 
  @Transient
  public List<Annotation> getAnnotations() {
    List<Annotation> annotations = super.getAnnotations();
    if ( null != getNotes() ) {
      annotations.add(new Annotation(Constants.DCTermsURI,"dcterms:description",getNotes()));
    }
    return annotations;
 
View Full Code Here

  @Transient
  public List<Annotation> getAnnotations() {
    List<Annotation> annotations = super.getAnnotations();
    try {
      if ( null != getNcbiTaxId() ) {
        annotations.add(new Annotation(Constants.SKOSURI,"skos:exactMatch",String.format(Constants.NCBITaxonomyFormat, getNcbiTaxId())));
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.ncbi", getNcbiTaxId()));       
      }
      if ( null != getUBioNamebankId() ) {
        annotations.add(new Annotation(Constants.SKOSURI,"skos:exactMatch",Constants.uBioBase + getUBioNamebankId()));
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.ubio", getUBioNamebankId()));       
      }
      if ( null != getTB1LegacyId() ) {
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxon.tb1", getTB1LegacyId()));
      }
    } catch ( Exception e ) {
      e.printStackTrace();
    }
    return annotations;
View Full Code Here

  }
 
  @Transient
  public List<Annotation> getAnnotations() {
    List<Annotation> annotations = super.getAnnotations();
    annotations.add(new Annotation(Constants.PrismURI,"prism:section","Study"));
    annotations.add(new Annotation(Constants.TBTermsURI,"tb:identifier.study",getId().toString()));
    annotations.add(new Annotation(Constants.TBTermsURI,"tb:identifier.study.tb1",getTB1StudyID()));
    if ( null != getName() ) {
      annotations.add(new Annotation(Constants.TBTermsURI,"tb:title.study",getName()));
    }     
    if ( null != getReleaseDate() ) {
      annotations.add(new Annotation(Constants.DCURI,"dc:date",getReleaseDate().toString()));
    }
    if ( null != getLastModifiedDate() ) {
      annotations.add(new Annotation(Constants.PrismURI, "prism:modificationDate", getLastModifiedDate().toString()));
    }
    if ( null != getSubmission() ) {
      if ( null != getSubmission().getSubmitter() ) {
//        annotations.add(new Annotation(Constants.DCURI,"dc:creator",getSubmission().getSubmitter().getPerson().getFullNameCitationStyle()));
      }
      if ( null != getSubmission().getCreateDate() ) {
        annotations.add(new Annotation(Constants.PrismURI,"prism:creationDate",getSubmission().getCreateDate().toString()));
      }
    }   
    if ( null != getCitation() ) { 
      try {
        List<Annotation> citationAnnotations = getCitation().getAnnotations();
        Annotation deleteme = null;
        for ( Annotation anno : citationAnnotations ) {
          if ( anno.getProperty().equals("owl:sameAs") ) {
            deleteme = anno;
          }
        }
View Full Code Here

  @Transient
  public List<Annotation> getAnnotations() {
    List<Annotation> annotations = super.getAnnotations();
    try {
      if ( null != getTB1LegacyId() ) {
        annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant.tb1", getTB1LegacyId()));
      }
    } catch ( Exception e ) {
      e.printStackTrace();
    }
    return annotations;
View Full Code Here

TOP

Related Classes of org.cipres.treebase.domain.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.