Examples of Citation


Examples of org.cipres.treebase.domain.study.Citation

    private Map getRecordMap(Submission submission){
     
      Map map= new HashMap();
     
      Study study=submission.getStudy();
      Citation citation=study.getCitation();
      String publisher=null;
      if(!study.isPublished())return null;
     
      //System.out.println("ctype: "+citation.getCitationType());
      try{
      if(citation.getCitationType().toUpperCase().contains("BOOK"))
           publisher=((BookCitation)citation).getPublisher();
      else publisher=((ArticleCitation)citation).getJournal();
     
     
      List<Person> authors=citation.getAuthors();
      
   
      map.put("title", citation.getTitle());
      map.put("creator", authors);     
      map.put("subject", citation.getKeywords());
        if(study.getName()!=null&study.getNotes()!=null)     
          map.put("description", study.getName()+" "+study.getNotes());
        else if(study.getNotes()==null)
          map.put("description",study.getName());
        else
          map.put("description",study.getNotes());
      map.put("publisher", publisher);           
      map.put("date", citation.getPublishYear());
      map.put("identifier", "TreeBASE.org/study/TB2:s"+study.getId());
      map.put("datestamp", study.getReleaseDate());
     
      }catch(NullPointerException e){
        //study 253 citation= null, data should be fixed
View Full Code Here

Examples of org.openbel.framework.common.model.Citation

     *
     * @param statement {@link Statement}
     */
    protected void attachExpansionRuleCitation(Statement statement) {
        AnnotationGroup ag = new AnnotationGroup();
        Citation citation = getInstance().createCitation(getName());
        citation.setType(CitationType.OTHER);
        citation.setReference(getName());
        ag.setCitation(citation);
        statement.setAnnotationGroup(ag);
    }
View Full Code Here

Examples of org.openbel.framework.common.model.Citation

    @Override
    public XBELAnnotationGroup convert(AnnotationGroup source) {
        if (source == null) return null;

        List<Annotation> annotations = source.getAnnotations();
        Citation citation = source.getCitation();
        Evidence evidence = source.getEvidence();

        XBELAnnotationGroup xag = new XBELAnnotationGroup();
        List<Object> list = xag.getAnnotationOrEvidenceOrCitation();
View Full Code Here

Examples of org.openbel.framework.common.model.Citation

    public Citation convert(BELCitation bc) {
        if (bc == null) {
            return null;
        }

        Citation c = CommonModelFactory.getInstance().createCitation(
                bc.getName());

        if (bc.getPublicationDate() != null) {
            Calendar date = Calendar.getInstance();
            date.setTime(bc.getPublicationDate());

            c.setDate(date);
        }

        c.setAuthors(bc.getAuthors());
        c.setComment(bc.getComment());
        c.setReference(bc.getReference());
        c.setType(CitationType.fromString(bc.getType()));

        return c;
    }
View Full Code Here

Examples of org.openbel.framework.common.model.Citation

        }

        String name = source.getName();

        // Destination type
        Citation dest = CommonModelFactory.getInstance().createCitation(name);

        Calendar date = source.getDate();
        dest.setDate(date);

        String comment = source.getComment();
        dest.setComment(comment);

        String reference = source.getReference();
        dest.setReference(reference);

        CitationType type = source.getType();
        if (type != null) {
            dest.setType(fromString(type.value()));
        }

        if (source.isSetAuthorGroup()) {
            List<String> author = source.getAuthorGroup().getAuthor();
            dest.setAuthors(author);
        }

        return dest;
    }
View Full Code Here

Examples of org.openbel.framework.ws.model.Citation

            } else {
                citations = kAMStore.getCitations(ki, citation);
            }

            for (org.openbel.framework.api.internal.KAMStoreDaoImpl.Citation c : citations) {
                Citation c2 = convert(c);
                list.add(c2);
            }
        } catch (KAMStoreException e) {
            logger.warn(e.getMessage());
            throw new KamStoreServiceException(e);
View Full Code Here

Examples of org.openbel.framework.ws.model.Citation

    }

    public static Citation convert(org.openbel.framework.common.model.Citation citation) {
        if (citation == null) return null;

        Citation wsCitation = OBJECT_FACTORY.createCitation();
        wsCitation.setId(citation.getReference());
        if (citation.getType() != null) {
            String value = citation.getType().getDisplayValue().toUpperCase().replace(' ', '_');
            wsCitation.setCitationType(fromValue(value));
        }
        if (citation.getName() != null) {
            wsCitation.setName(citation.getName());
        }
        if (citation.getDate() != null) {
            try {
                GregorianCalendar calendar = new GregorianCalendar();
                calendar.setTime(citation.getDate().getTime());
                wsCitation.setPublicationDate(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
            } catch (DatatypeConfigurationException e) {
                // Swallowed
            }
        }
        if (citation.getAuthors() != null) {
            wsCitation.getAuthors().addAll(citation.getAuthors());
        }
        wsCitation.setComment(citation.getComment());
        return wsCitation;
    }
View Full Code Here

Examples of org.openbel.framework.ws.model.Citation

     * @return
     */
    public static Citation
            convert(KAMStoreDaoImpl.Citation objCitation) {

        Citation citation = OBJECT_FACTORY.createCitation();
        citation.setCitationType(convert(objCitation.getCitationType()));
        citation.setComment(objCitation.getComment());
        citation.setId(objCitation.getId());
        citation.setName(objCitation.getName());

        Date pubdate = objCitation.getPublicationDate();
        if (pubdate != null) {
            try {
                calendar.setTime(pubdate);
                citation.setPublicationDate(DatatypeFactory.newInstance()
                        .newXMLGregorianCalendar(calendar));
            } catch (DatatypeConfigurationException e) {
                // Swallowed
            }
        }

        List<String> authors = objCitation.getAuthors();
        if (authors != null) {
            citation.getAuthors().addAll(authors);
        }

        return citation;
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the creation of {@link NilObject} instances.
     */
    @Test
    public void testCreateNilObject() {
        final Citation citation = NilReason.TEMPLATE.createNilObject(Citation.class);
        assertInstanceOf("Unexpected proxy.", NilObject.class, citation);
        assertNull(citation.getTitle());
        assertTrue(citation.getDates().isEmpty());
        assertEquals("NilObject.toString()", "Citation[template]", citation.toString());
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the comparison of {@link NilObject} instances.
     */
    @Test
    public void testNilObjectComparison() {
        final Citation e1 = NilReason.TEMPLATE.createNilObject(Citation.class);
        final Citation e2 = NilReason.MISSING .createNilObject(Citation.class);
        final Citation e3 = NilReason.TEMPLATE.createNilObject(Citation.class);
        assertEquals("NilObject.hashCode()", e1.hashCode(), e3.hashCode());
        assertFalse ("NilObject.hashCode()", e1.hashCode() == e2.hashCode());
        assertEquals("NilObject.equals(Object)", e1, e3);
        assertFalse ("NilObject.equals(Object)", e1.equals(e2));

        assertInstanceOf("e1", LenientComparable.class, e1);
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.