diff --git a/.gitignore b/.gitignore index a656092..6a7441a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ +.project +.settings /sci-types-project/target/ /scientificcms/target/ /sci-publications/nbproject/ -/sci-publications/target/ \ No newline at end of file +/sci-publications/target/ diff --git a/sci-publications/.gitignore b/sci-publications/.gitignore new file mode 100644 index 0000000..e36fa17 --- /dev/null +++ b/sci-publications/.gitignore @@ -0,0 +1,3 @@ +.classpath +.factorypath +target diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/article.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/article.ftl new file mode 100644 index 0000000..d52c772 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/article.ftl @@ -0,0 +1,17 @@ +<#import "/ccm-cms/content-item.ftl" as ContentItem> + +<#--filedoc + Functions for publications of the types ArticleInCollectedVolume. + ArticleInJournal and InProceedings. +--> + +<#--doc + Constructs the link to the detail view for the article. + + @param article The article to use. + + @return The link to the detail view of the article. +--> +<#function getHref article> + <#return ContentItem.generateContentItemLink(article.uuid)> + diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/authors.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/authors.ftl new file mode 100644 index 0000000..aaeecc5 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/authors.ftl @@ -0,0 +1,118 @@ +<#--filedoc + Functions for processing the authors of a publication. +--> + +<#--doc + Constructs the link the homepage of the author. + + @param author The author to use. + + @param keyId The `keyId` of the contact entry providing the link to the homepage. + + @return The link to the homepage of the author. +--> +<#function getLink author keyId> + <#return author["./contacts/contact/contactentries[./keyId = '${keyId}']/value"]> + + +<#--doc + Determines if an author has a link to a homepage. + + @param author The author to use. + + @param keyId The `keyId` of the contact entry providing the link to the homepage. + + @return `true` if the author has a link to a homepage, `false` otherwise. +--> +<#function hasLink author keyId> + <#return (author["./contacts/contact/contactentries[./keyId = '${keyId}']"]?size > 0)> + + +<#--doc + Gets the ID of the author. + + @param author The author to use. + + @return The ID of the author. +--> +<#function getId author> + <#return author["./masterVersion/id"] + "_" + author["./@name"]> + + +<#--doc + Gets the position of the author in the sequence of authors. + + @param author The author to use. + + @return The position of the author. +--> +<#function getPosition author> + <#return author["./position()"]> + + +<#--doc + Determines if the author is the last author in the sequence. + + @param author The author to use. + + @return `true` if the author is the last in the sequence, `false`otherwise. +--> +<#function isLast author> + <#return author["./last()"]> + + +<#--doc + Determines if the author has a surname. + + @param author The author to use. + + @return `true` if the author has a surname, `false`otherwise. +--> +<#function hasSurname author> + <#return (author["./surname"]?size > 0)> + + +<#--doc + Gets the surname of the author. + + @param author The author to use. + + @return The surname of the author. +--> +<#function getSurname author> + <#return author.surname> + + +<#--doc + Determines if the author has a givnen name. + + @param author The author to use. + + @return `true` if the author has a given name, `false`otherwise. +--> +<#function hasGivenName author> + <#return (author.givenName??)> + + +<#--doc + Gets the given name of the author. + + @param author The author to use. + + @return The given name of the author. +--> +<#function getGivenName author> + <#return author.givenName> + + +<#--doc + Determines if the author is an editor. + + @param author The author to use. + + @return `true` if the author an editor, `false`otherwise. +--> +<#function isEditor author> + <#return author.isEditor> + + diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/collected-volume.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/collected-volume.ftl new file mode 100644 index 0000000..c338953 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/collected-volume.ftl @@ -0,0 +1,16 @@ +<#import "/ccm-cms/content-item.ftl" as ContentItem> + +<#--doc + Functions for the processing collected volumes. +--> + +<#--doc + Constructs the the link to the detail view to a collected volume. + + @param collectedVolume The Collected Volume to use. + + @return The link to the detail view of the Collected Volume. +--> +<#function getHref collectedVolume> + <#return ContentItem.generateContentItemLink(collectedVolume.uuid)> + \ No newline at end of file diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/export-links.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/export-links.ftl new file mode 100644 index 0000000..eb45fed --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/export-links.ftl @@ -0,0 +1,59 @@ +<#--filedoc + Funtions for processing the export links for publications. +--> + +<#--doc + Gets the export links of a publication. + + @param item The publication item to use. + + @return A sequence of the export links of the publication. +--> +<#function getExportLinks item> + <#return item.publicationExportLinks> + + +<#--doc + Determines if the provided publication item has export links. + + @param item The publication item to use. + + @return `true` if the publication item has export links, `false` otherwise. +--> +<#function hasExportLinks item> + <#return (item.publicationExportLinks?size > 0)> + + +<#--doc + Constructs the URL for the export link. + + @param exportLink The export link to use (as returned by `getExportLinks`). + + @return The URL of the export link. +--> +<#function getHref exportLink> + <#return "${dispatcherPrefix}/scipublications/export/?format=${exportLink.formatKey}&publication=${exportLink.publicationId}"> + + +<#--doc + Gets the format key of an export link. + + @param exportLink The export link to use (as returned by `getExportLinks`). + + @return The key for the format provided by the export link. +--> +<#function getFormatKey exportLink> + <#return exportLink.formatKey> + + +<#--doc + Gets the format name of an export link. + + @param exportLink The export link to use (as returned by `getExportLinks`). + + @return The of the export format provided by the export link. +--> +<#function getFormatName exportLink> + <#return exportLink.formatName> + + diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/journal.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/journal.ftl new file mode 100644 index 0000000..1567209 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/journal.ftl @@ -0,0 +1,63 @@ +<#import "/ccm-cms/content-item.ftl" as ContentItem> + +<#--filedoc + Functions for processing the the data of Journals. +--> + +<#--doc + Gets the value of the `firstYear` property of the journal. + + @param journal The journal to use. + + @return The value of the `firstYear` property of the Journal. +--> +<#function getFirstYear(journal)> + <#return journal.firstYear> + + +<#--doc + Constructs the link to the detail view of the journal. + + @param journal The journal to use. + + @return The URL of the detail view of the Journal. +--> +<#function getHref journal> + <#return ContentItem.generateContentItemLink(journal.uuid)> + + +<#--doc + Gets the ISSN of the Journal. + + @param journal The journal to use. + + @return The ISSN of the Journal. +--> +<#function getIssn journal> + <#return journal.issn> + + +<#--doc + Gets the value of the `lastYear` property of the journal. + + @param journal The journal to use. + + @return The value of the `firstYear` property of the Journal. +--> +<#function getLastYear(journal)> + <#return journal.lastYear> + + +<#--doc + Gets the title of the Journal. + + @param journal The journal to use. + + @return The title of the journal. +--> +<#function getTitle journal> + <#return journal.title> + + + + diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/library-signatures.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/library-signatures.ftl new file mode 100644 index 0000000..e60fea4 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/library-signatures.ftl @@ -0,0 +1,49 @@ +<#--filedoc + Functions for processing library signatures. +--> + +<#--doc + Gets the library of the signature. + + @param signature The signature to use. + + @return The library of the signature. +--> +<#function getLibrary signature> + <#return signature.library> + + +<#--doc + Gets the libray specific signature. + + @param signature The signature to use. + + @return The signature associated with the book for the a specific library. +--> +<#function getSignature signature> + <#return signature.signature> + + +<#--doc + Gets the link to the library. + + @param signature The signature to use. + + @return The link to the library of the signature. +--> +<#function getLibraryLink signature> + <#return signature.libraryLink> + + +<#--doc + Gets the value of `misc` property to the signature. + + @param signature The signature to use. + + @return The value of `misc` of the signature. +--> +<#function getMisc signature> + <#return signature.misc> + + + diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/orderer.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/orderer.ftl new file mode 100644 index 0000000..1ddc3b0 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/orderer.ftl @@ -0,0 +1,14 @@ +<#--filedoc + Functions for processing the orderer of an expertise. +--> + +<#--doc + Gets the name of the orderer. + + @param orderer The orderer to use. + + @return The name of the orderer. +--> +<#function getName orderer> + <#return orderer.title> + \ No newline at end of file diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/proceedings.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/proceedings.ftl new file mode 100644 index 0000000..ad4b164 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/proceedings.ftl @@ -0,0 +1,28 @@ +<#import "/ccm-cms/content-item.ftl" as ContentItem> + +<#--filedoc + Functions for processing Proceedings items. +--> + +<#--doc + Gets the URL of the detail view of the proceedings item. + + @param proceedings The proceedings item to use. + + @return The URL of the detail view of the proceedings. +--> +<#function getHref proceedings> + <#return ContentItem.generateContentItemLink(proceedings.uuid)> + + +<#--doc + Gets the URL of the detail of a paper (InProceedings item) of a proceedings + publication. + + @param paper The InProceedings item to use. + + @return The URL of the detail view of the paper. +--> +<#function getPaperHref paper> + <#return ContentItem.generateContentItemLink(paper.uuid)> + \ No newline at end of file diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/publications.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/publications.ftl new file mode 100644 index 0000000..2931e2f --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/publications.ftl @@ -0,0 +1,501 @@ +<#--filedoc + Commons functions for publication types. Some functions in this + module will only work for specific publication types. +--> + +<#--doc + Gets the assigned terms of an publication. + + @param item The publication item to use. + + @param domain The domain to use. + + @return The assigned terms. +--> +<#function getAssignedTermsDomains item domain> + <#return item.terms.assignedTerms.domain"]> + + +<#--doc + Gets the authors of the publication. + + @param item The publication item to use. + + @return A sequence of the authors of the publication. The authors can + be further processed by the functions provided by the `authors` library. +--> +<#function getAuthors item> + <#return item.authors> + + +<#--doc + Gets the publisher of an publication. + + @param item The publication item to use. + + @return The publisher of the publication. The `publisher` library + provides functions for processing the publisher. +--> +<#function getPublisher item> + <#return item.publisher> + + +<#--doc + Gets the value of the `yearOfPublication` property of the publication. + + @param item The publication item to use. + + @return The value of the `yearOfPublication` property of the publication. +--> +<#function getYearOfPublication item> + <#return item.yearOfPublication> + + +<#--doc + Gets the value of the `numberOfPages` property of the publication. + + @param item The publication item to use. + + @return The value of the `numberOfPages` property of the publication. +--> +<#function getNumberOfPages item> + <#return item.numberOfPages> + + +<#--doc + Gets the value of the `numberOfVolumes` property of the publication. + + @param item The publication item to use. + + @return The value of the `numberOfVolumes` property of the publication. +--> +<#function getNumberOfVolumes item> + <#return item.numberOfVolumes> + + +<#--doc + Gets the value of the `volume` property of the publication. + + @param item The publication item to use. + + @return The value of the `volume` property of the publication. +--> +<#function getVolume item> + <#return item.volume> + + +<#--doc + Gets the value of the `edition` property of the publication. + + @param item The publication item to use. + + @return The value of the `edition` property of the publication. +--> +<#function getEdition item> + <#return item.edition> + + +<#--doc + Gets the value of the `isbn` property of the publication. + + @param item The publication item to use. + + @return The value of the `isbn` property of the publication. +--> +<#function getIsbn item> + <#return item.isbn> + + +<#--doc + Gets the value of the `languageOfPublication` property of the publication. + + @param item The publication item to use. + + @return The value of the `languageOfPublication` property of the publication. +--> +<#function getLanguageOfPublication item> + <#return item.languageOfPublication> + + +<#--doc + Gets the series associated with publication. + + @param item The publication item to use. + + @return A sequence of series associated with the publication. The `series` + module provides functions for processing the returned data. +--> +<#function getSeries item> + <#return item.series> + + +<#--doc + Gets the value of the `reviewed` property of the publication. + + @param item The publication item to use. + + @return The value of the `reviewed` property of the publication. +--> +<#function isReviewed item> + <#return item.reviewed> + + +<#--doc + Gets the value of the `abstract` property of the publication. + + @param item The publication item to use. + + @return The value of the `abstract` property of the publication. +--> +<#function getAbstract item> + <#return item.abstract> + + +<#--doc + Gets the value of the `misc` property of the publication. + + @param item The publication item to use. + + @return The value of the `misc` property of the publication. +--> +<#function getMisc item> + <#return item.misc> + + +<#--doc + Determines if the publication has a value of the `languageOfPublicatiopn` property. + + @param item The publication item to use. + + @return `true` if the publication has a value for the `languageOfPublication`. +--> +<#function hasPlace item> + <#return (item.place??> + + +<#--doc + Gets the value of the `place` property of the publication. + + @param item The publication item to use. + + @return The value of the `place` property of the publication. +--> +<#function getPlace item> + <#return item.place> + + +<#--doc + Gets the value of the `pagesFrom` property of the publication. + + @param item The publication item to use. + @depcrecated Use getStartPage + + @return The value of the `getPagesFrom` property of the publication. +--> +<#function getPagesFrom item> + <#return getStartPage(item)> + + +<#--doc + Gets the value of the `startPage` property of the publication. + + @param item The publication item to use. + + @return The value of the `startPage` property of the publication. +--> +<#function getStartPage item> + <#return item.startPage> + + + +<#--doc + Gets the value of the `pagesTo` property of the publication. + + @param item The publication item to use. + @depcrecated Use getEndPage + + @return The value of the `pagesTo` property of the publication. +--> +<#function getPagesTo item> + <#return getEndPage(item)> + + +<#--doc + Gets the value of the `endPage` property of the publication. + + @param item The publication item to use. + + @return The value of the `endPage` property of the publication. +--> +<#function getEndPage item> + <#return item.endPage> + + +<#--doc + Gets the value of the `number` property of the publication. + + @param item The publication item to use. + + @return The value of the `number` property of the publication. +--> +<#function getNumber item> + <#return item.number> + + +<#--doc + Gets the value of the `yearFirstPublished` property of the publication. + + @param item The publication item to use. + + @return The value of the `yearFirstPublished` property of the publication. +--> +<#function getYearFirstPublished item> + <#return item.yearFirstPublished> + + +<#--doc + Gets the library signatures of the publication. + + @param item The publication item to use. + + @return A sequence of the library signatures associated with the + publication. The `librarySignatures` module provides functions for + processing library signatures. +--> +<#function getLibrarySignatures item> + <#return item.librarysignatures> + + +<#--doc + Gets the organizations associated with the publication. + + @param item The publication item to use. + + @return A sequence of organizations associated with the publication. +--> +<#function getOrganization item> + <#return item.organization> + + +<#--doc + Gets the orderer of the publication. + + @param item The publication item to use. + + @return A sequence or the orderers (organizations) of the publication. +--> +<#function getOrderer item> + <#return item.orderer> + + +<#--doc + Gets the value of the `issn` property of the publication. + + @param item The publication item to use. + + @return The value of the `issn` property of the publication. +--> +<#function getIssn item> + <#return item.issn> + + +<#--doc + Gets the value of the `lastAccesed` property of the publication. + + @param item The publication item to use. + + @return The value of the `lastAccessed` property of the publication. +--> +<#function getLastAccessed item> + <#return item.lastAccessed> + + +<#--doc + Gets the value of the `url` property of the publication. + + @param item The publication item to use. + + @return The value of the `url` property of the publication. +--> +<#function getUrl item> + <#return item.url> + + +<#--doc + Gets the value of the `urn` property of the publication. + + @param item The publication item to use. + + @return The value of the `urn` property of the publication. +--> +<#function getUrn item> + <#return item.urn> + + +<#--doc + Gets the value of the `doi` property of the publication. + + @param item The publication item to use. + + @return The value of the `doi` property of the publication. +--> +<#function getDoi item> + <#return item.doi> + + +<#--doc + Gets the value of the `issue` property of the publication. + + @param item The publication item to use. + + @return The value of the `issue` property of the publication. +--> +<#function getIssue item> + <#return item.issue> + + +<#--doc + Gets the journal associated with a publication. + + @param item The publication item to use. + + @return The Jornal associated with the the publication. The `journal` + module provides function for processing the journal. +--> +<#function getJournal item> + <#return item.journal> + + +<#--doc + Gets the collected volume associated with a publication. + + @param item The publication item to use. + + @return The collected volume associated with the publication. The + `collected-volume` module provides functions for processing the + collected volume. +--> +<#function getCollectedVolume item> + <#return item.collectedVolume> + + +<#--doc + Gets the value of the `chapter` property of the publication. + + @param item The publication item to use. + + @return The value of the `chapter` property of the publication. +--> +<#function getChapter item> + <#return item.chapter> + + +<#--doc + Gets the value of the `nameOfConference` property of the publication. + + @param item The publication item to use. + + @return The value of the `nameOfConference` property of the publication. +--> +<#function getNameOfConference item> + <#return item.nameOfConference> + + +<#--doc + Gets the value of the `placeOfConference` property of the publication. + + @param item The publication item to use. + + @return The value of the `placeOfConference` property of the publication. +--> +<#function getPlaceOfConference item> + <#return item.placeOfConference> + + +<#--doc + Gets the value of the `dateFromOfConference` property of the publication. + + @param item The publication item to use. + + @return The value of the `dateFromOfConference` property of the publication. +--> +<#function getDateFromOfConference item> + <#return item.dateFromOfConference> + + +<#--doc + Gets the value of the `dateToOfConference` property of the publication. + + @param item The publication item to use. + + @return The value of the `dateToOfConference` property of the publication. +--> +<#function getDateToOfConference item> + <#return item.dateToOfConference> + + +<#--doc + Gets the Proceedings item associated with a InProceedings publication + + @param item The publication item to use. + + @return The Proceedings item associated with a InProceedings publication. +--> +<#function getProceedings item> + <#return item.proceedings> + + +<#--doc + Gets the articles of a CollectedVolume, item or Journal. + + @param item The publication item to use. + + @return A sequence of articles. +--> +<#function getArticles item> + <#return item.articles> + + +<#--doc + Gets the papers of a Proceedings papers + + @param item The publication item to use. + + @return A sequence of InProccedings items. +--> +<#function getProceedingsPapers item> + <#return item.papers> + + +<#--doc + Gets the volumes of a series. + + @param item The series to use. + + @return A sequence of the publications in the series. +--> +<#function getSeriesVolumes item> + <#return item.volumes"]> + + +<#--doc + Gets the value of the `event` property of the publication. + + @param item The publication item to use. + + @return The value of the `event` property of the publication. +--> +<#function getEvent item> + <#return item.event> + + +<#--doc + Gets the value of the `dateOfTalk` property of the publication. + + @param item The publication item to use. + + @return The value of the `dateOfTalk` property of the publication. +--> +<#function getDateOfTalk item> + <#return item.dateOfTalk> + \ No newline at end of file diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/publisher.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/publisher.ftl new file mode 100644 index 0000000..c0c68c5 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/publisher.ftl @@ -0,0 +1,25 @@ +<#--filedoc + Functions for processing publishers. +--> + +<#--doc + Gets the name of a publisher. + + @param publisher The publisher to use. + + @return The name of the publisher. +--> +<#function getName publisher> + <#return publisher.publisherName> + + +<#--doc + Gets the place of the publisher. + + @param publisher The publisher to use. + + @return The place of the publisher. +--> +<#function getPlace publisher> + <#return publisher.place> + \ No newline at end of file diff --git a/sci-publications/src/main/resources/themes/freemarker/sci-publications/series.ftl b/sci-publications/src/main/resources/themes/freemarker/sci-publications/series.ftl new file mode 100644 index 0000000..6c44d48 --- /dev/null +++ b/sci-publications/src/main/resources/themes/freemarker/sci-publications/series.ftl @@ -0,0 +1,61 @@ +<#import "/ccm-cms/content-item.ftl" as ContentItem> + +<#--filedoc + Functions for processing Series items. +--> + +<#--doc + Gets the filters for the volumes list of the series. + + @param series The series to use + + @return A sequence of the filters for the list of volumes of the series. +--> +<#function getFilters series> + <#return series.filters> + + +<#--doc + Constructs the link to the details view of a series. + + @param series The series to use. + + @return The link to the detail view of the series. +--> +<#function getLink series> + <#return ContentItem.generateContentItemLink(series)> + + +<#--doc + Gets the name of the series. + + @param series The series to use. + + @return The name of the series. +--> +<#function getName series> + <#return series.title> + + +<#--doc + Gets the volumes of the series. + + @param series The series to use. + + @return A sequence of the volumes of the series. +--> +<#function getVolume series> + <#return series.volume> + + +<#--doc + Gets the link to the detail view of volume of a series. + + @param volume The volume to use. + + @return The link to the detail view of the volume. +--> +<#function getVolumeHref volume> + <#return ContentItem.generateContentItemLink(volume)> + + diff --git a/sci-types-project/.gitignore b/sci-types-project/.gitignore index eb5a316..e36fa17 100644 --- a/sci-types-project/.gitignore +++ b/sci-types-project/.gitignore @@ -1 +1,3 @@ +.classpath +.factorypath target diff --git a/scientificcms/.gitignore b/scientificcms/.gitignore index eb5a316..e36fa17 100644 --- a/scientificcms/.gitignore +++ b/scientificcms/.gitignore @@ -1 +1,3 @@ +.classpath +.factorypath target