diff --git a/README.md b/README.md index 40f078f..26c7905 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,29 @@ There are Message Properties which can be set in the message.properties file: | project.form.agreement | The text which will be displayed as a legend for the agreement in the editor | Einverständniserklärung | | project.form.validation.agreement | The text which will be displayed as a validation error if the agreement is not accepted | Sie müssen der Einverständniserklärung zustimmen. | +### Codemeta + +#### Metadata +Codemeta metadata view and export can be enabled via mycore.properties: + +```properties +MIR.Layout.End=%MIR.Layout.End%,export-extension +MIR.Layout.Start=%MIR.Layout.Start%,reposis-metadata-extension +MIR.Layout.Display.Div=%MIR.Layout.Display.Div%,reposis-export-extension +MCR.URIResolver.xslImports.modsmeta=%MCR.URIResolver.xslImports.modsmeta%,metadata/reposis-export-extension.xsl,metadata/reposis-metadata-extension.xsl +``` + +#### OAI +OAI Codemeta set can be enabled via mycore.properties: + +```properties +MCR.ContentTransformer.oai-codemeta.Stylesheet=xslt/mycoreobject2codemeta-jsonld.xsl,xslt/codemeta-jsonld2rdf.xsl +MCR.ContentTransformer.oai-codemeta.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl +MCR.OAIDataProvider.MetadataFormat.codemeta.Schema=http://www.openarchives.org/OAI/2.0/rdf.xsd +MCR.OAIDataProvider.MetadataFormat.codemeta.Namespace=http://www.w3.org/1999/02/22-rdf-syntax-ns# +MCR.OAIDataProvider.OAI2.Sets.codemeta.URI=webapp:oai/set_codemeta.xml +MCR.OAIDataProvider.OAI2.Sets.codemeta.Query=mods.genre:software +``` ## Development @@ -291,4 +314,4 @@ MCR.Developer.Resource.Override=/path/to/reposis_common/src/main/resources MCR.LayoutService.LastModifiedCheckPeriod=0 MCR.UseXSLTemplateCache=false MCR.SASS.DeveloperMode=true -``` \ No newline at end of file +``` diff --git a/pom.xml b/pom.xml index 9aff455..7257889 100644 --- a/pom.xml +++ b/pom.xml @@ -105,20 +105,30 @@ + + com.github.jsonld-java + jsonld-java + 0.13.4 + compile + com.google.code.gson gson + + org.mycore + mycore-pi + + --> com.google.guava guava + + commons-io + commons-io + jakarta.servlet jakarta.servlet-api @@ -127,6 +137,14 @@ org.apache.logging.log4j log4j-api + + org.eclipse.rdf4j + rdf4j-model + + + org.eclipse.rdf4j + rdf4j-model-api + org.jdom jdom2 @@ -151,10 +169,25 @@ org.mycore mycore-user2 - - com.h2database - h2 - test + + org.eclipse.rdf4j + rdf4j-rio-api + provided + + + org.eclipse.rdf4j + rdf4j-rio-jsonld + provided + + + org.eclipse.rdf4j + rdf4j-rio-rdfxml + provided + + + com.h2database + h2 + test junit diff --git a/src/main/java/de/gbv/reposis/codemeta/CodeMetaRDFConverterResolver.java b/src/main/java/de/gbv/reposis/codemeta/CodeMetaRDFConverterResolver.java new file mode 100644 index 0000000..2bd4eb1 --- /dev/null +++ b/src/main/java/de/gbv/reposis/codemeta/CodeMetaRDFConverterResolver.java @@ -0,0 +1,76 @@ +package de.gbv.reposis.codemeta; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +import javax.xml.transform.Source; +import javax.xml.transform.TransformerException; +import javax.xml.transform.URIResolver; + +import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.eclipse.rdf4j.model.Model; +import org.eclipse.rdf4j.model.impl.LinkedHashModel; +import org.eclipse.rdf4j.rio.Rio; +import org.eclipse.rdf4j.rio.helpers.JSONLDSettings; +import org.eclipse.rdf4j.rio.helpers.StatementCollector; +import org.eclipse.rdf4j.rio.jsonld.JSONLDParser; +import org.eclipse.rdf4j.rio.rdfxml.RDFXMLWriter; +import org.jdom2.Document; +import org.jdom2.input.SAXBuilder; +import org.jdom2.transform.JDOMSource; + +import com.github.jsonldjava.core.DocumentLoader; + +public class CodeMetaRDFConverterResolver implements URIResolver { + + private static final Logger LOGGER = LogManager.getLogger(); + + private static final String CODEMETA_JSONLD_PATH = "/jsonld/codemeta.jsonld"; + + private static final String CODEMETA_JSONLD_URL = "https://doi.org/10.5063/schema/codemeta-2.0"; + + /** + * Converts CodeMeta JSON-LD to RDF. + *

+ * Syntax: codemeta2rdf:{baseURI}:{json} + * + * @param href the URI in the syntax above + * @param base not used + * @return a document containing the converted RDF + * @see javax.xml.transform.URIResolver + */ + @Override + public Source resolve(final String href, final String base) throws TransformerException { + final String[] hrefParts = href.split(":", 3); + if (hrefParts.length > 2) { + final String baseURI = hrefParts[1]; + final String json = hrefParts[2]; + try (final InputStream input = new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8)); + final ByteArrayOutputStream out = new ByteArrayOutputStream()) { + final String codemetaJsonld = IOUtils.resourceToString(CODEMETA_JSONLD_PATH, StandardCharsets.UTF_8); + final DocumentLoader docLoader = new DocumentLoader(); + docLoader.addInjectedDoc(CODEMETA_JSONLD_URL, codemetaJsonld); + final JSONLDParser parser = new JSONLDParser(); + parser.getParserConfig().set(JSONLDSettings.DOCUMENT_LOADER, docLoader); + final Model model = new LinkedHashModel(); + parser.setRDFHandler(new StatementCollector(model)); + if (baseURI.isEmpty()) { + parser.parse(input, null); + } else { + parser.parse(input, baseURI); + } + final RDFXMLWriter writer = new RDFXMLWriter(out); + Rio.write(model, writer); + final Document result = new SAXBuilder().build(new ByteArrayInputStream(out.toByteArray())); + return new JDOMSource(result); + } catch (Exception e) { + LOGGER.error("Unable to convert to rdf", e); + } + } + throw new IllegalArgumentException("Invalid format of uri for retrieval of json2rdf: " + href); + } +} diff --git a/src/main/java/de/gbv/reposis/util/ValidationHelper.java b/src/main/java/de/gbv/reposis/util/ValidationHelper.java new file mode 100644 index 0000000..6fdcdbe --- /dev/null +++ b/src/main/java/de/gbv/reposis/util/ValidationHelper.java @@ -0,0 +1,17 @@ +package de.gbv.reposis.util; + +import java.net.MalformedURLException; +import java.net.URISyntaxException; +import java.net.URL; + +public class ValidationHelper { + + public static boolean validateUrl(String url) { + try { + new URL(url).toURI(); + } catch (MalformedURLException | URISyntaxException e) { + return false; + } + return true; + } +} diff --git a/src/main/resources/META-INF/resources/editor/software-includes.xed b/src/main/resources/META-INF/resources/editor/software-includes.xed new file mode 100644 index 0000000..72a0c66 --- /dev/null +++ b/src/main/resources/META-INF/resources/editor/software-includes.xed @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + +

+ + + + +
+
+ +
+ + + +
+ +
+
+ +
+ + + +
+
+
+ +
+ + + +
+
+
+ +
+ + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+
+
+ + + + + + + + + + +
+ +
+ + + +
+ +
+
+
+ + + + + + +
+ +
+ + + +
+ +
+
+
+ + + + + + +
+ +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+
+
+ + + + + + +
+ +
+ + + +
+ +
+
+
+ + + + + + + + + + + + +
+
+ +
+
+
+ + + +
+
+
+
+ + + + +
+
+
+ +
+
+
+
+ + + + + + +
+
+ +
+
+
+ + + +
+
+
+
+ + + + +
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/META-INF/resources/oai/set_codemeta.xml b/src/main/resources/META-INF/resources/oai/set_codemeta.xml new file mode 100644 index 0000000..5b71645 --- /dev/null +++ b/src/main/resources/META-INF/resources/oai/set_codemeta.xml @@ -0,0 +1,9 @@ + + + + codemeta + CodeMeta + + diff --git a/src/main/resources/config/reposis_common/messages_de.properties b/src/main/resources/config/reposis_common/messages_de.properties index 5fe639a..92cee3d 100644 --- a/src/main/resources/config/reposis_common/messages_de.properties +++ b/src/main/resources/config/reposis_common/messages_de.properties @@ -17,3 +17,86 @@ project.form.agreement.accept.post=gelesen und akzeptiere sie. project.form.agreement.accept.link=Einverst\u00E4ndniserkl\u00E4rung project.form.agreement=Einverst\u00E4ndniserkl\u00E4rung project.form.validation.agreement=Sie m\u00FCssen der Einverst\u00E4ndniserkl\u00E4rung zustimmen. + +reposis.codemeta.applicationCategory = Kategorie: +reposis.codemeta.applicationSubCategory = Unterkategorie: +reposis.codemeta.buildInstructions = Installationsanleitung: +reposis.codemeta.codeRepository = Code Repository: +reposis.codemeta.contIntegration = Continuous Integration: +reposis.codemeta.developmentStatus = Entwicklungsstatus: +reposis.codemeta.issueTracker = Issue Tracker: +reposis.codemeta.memoryRequirement = Speicher: +reposis.codemeta.operatingSystem = Betriebssystem: +reposis.codemeta.permission = Berechtigung: +reposis.codemeta.processorRequirement = Prozessor: +reposis.codemeta.programmingLanguage = Programmiersprache: +reposis.codemeta.readme = Readme: +reposis.codemeta.releaseNotes = Release Notes: +reposis.codemeta.relatedPublication = Verwandte Publikation +reposis.codemeta.runtimePlatform = Laufzeitumgebung: +reposis.codemeta.softwareHelp = Hilfe/Dokumentation: +reposis.codemeta.softwareRequirement = Software: +reposis.codemeta.softwareSuggestion = Optionale Software: +reposis.codemeta.storageRequirement = Speicherplatz: +reposis.codemeta.targetProduct = Zielprodukt: +reposis.codemeta.version = Version: +reposis.editor.codemeta.applicationCategory = Kategorie: +reposis.editor.codemeta.applicationCategory.help = Kategorische Einordnung der Anwendung (z.B. Spiel, Multimedia). +reposis.editor.codemeta.applicationSubCategory = Unterkategorie: +reposis.editor.codemeta.applicationSubCategory.help = Einordnung der Anwendung in eine Unterkategorie (z.B. Arcade Game). +reposis.editor.codemeta.buildInstructions = Installationsanleitung: +reposis.editor.codemeta.buildInstructions.help = Link zur Installationsanleitung/Dokumentation. +reposis.editor.codemeta.codeRepository = Code Repository: +reposis.editor.codemeta.codeRepository.help = Link zum Repository, in dem sich der nicht kompilierte, f\u00FCr den Menschen lesbare Code und der zugeh\u00F6rige Code befinden (SVN, GitHub, CodePlex, institutionelle GitLab-Instanz usw.). +reposis.editor.codemeta.contIntegration = Continuous Integration: +reposis.editor.codemeta.contIntegration.help = Link zu CI Service. +reposis.editor.codemeta.developmentStatus = Entwicklungsstatus: +reposis.editor.codemeta.developmentStatus.help = Beschreibung des Entwicklungsstatus, z. B. in Arbeit (wip), aktiv, inaktiv, ausgesetzt. Siehe repostatus.org f\u00FCr weitere Informationen. +reposis.editor.codemeta.issueTracker = Issue Tracker: +reposis.editor.codemeta.issueTracker.help = Link zu einem Issue Tracker. +reposis.editor.codemeta.memoryRequirement = Speicher: +reposis.editor.codemeta.memoryRequirement.help = Mindestanforderungen an den Arbeitsspeicher. +reposis.editor.codemeta.operatingSystem = Betriebssystem: +reposis.editor.codemeta.operatingSystem.help = Unterst\u00FCtzte Betriebssysteme (z. B. Windows 11, Android 1.6). +reposis.editor.codemeta.permission = Berechtigung: +reposis.editor.codemeta.permission.help = Berechtigung(en), die f\u00FCr die Ausf\u00FChrung des Codes erforderlich sind (z. B. kann eine mobile Anwendung vollen Internetzugang erfordern oder nur \u00FCber WLAN laufen). +reposis.editor.codemeta.processorRequirement = Prozessor: +reposis.editor.codemeta.processorRequirement.help = Prozessorarchitektur, die f\u00FCr die Ausf\u00FChrung der Anwendung erforderlich ist (z. B. IA64). +reposis.editor.codemeta.programmingLanguage = Programmiersprache: +reposis.editor.codemeta.programmingLanguage.help = Die zur Implementierung der Software verwendete(n) Programmiersprache(n) (z. B. Python, C++, Matlab, Fortran, Java, Julia, ...). +reposis.editor.codemeta.readme = Readme: +reposis.editor.codemeta.readme.help = Link zu Readme. +reposis.editor.codemeta.releaseNotes = Release Notes: +reposis.editor.codemeta.releaseNotes.help = Link zu Release Notes. +reposis.editor.codemeta.runtimePlatform = Laufzeitumgebung: +reposis.editor.codemeta.runtimePlatform.help = Laufzeitumgebung (z.B. Java8, Python2.3, .Net Framework 3.0). +reposis.editor.codemeta.softwareHelp = Hilfe/Dokumentation: +reposis.editor.codemeta.softwareHelp.help = Link zu Hilfetexten oder Dokumentation. +reposis.editor.codemeta.softwareRequirement = Software +reposis.editor.codemeta.softwareRequirement.help = Erforderliche Software-Abh\u00E4ngigkeit. +reposis.editor.codemeta.softwareRequirement.link = Link +reposis.editor.codemeta.softwareRequirement.name = Name +reposis.editor.codemeta.softwareSuggestion = Optionale Software: +reposis.editor.codemeta.softwareSuggestion.help = Optionale Software-Abh\u00E4ngigkeit. +reposis.editor.codemeta.softwareSuggestion.link = Link +reposis.editor.codemeta.softwareSuggestion.name = Name +reposis.editor.codemeta.storageRequirement = Speicherplatz: +reposis.editor.codemeta.storageRequirement.help = Speicherbedarf (z. B. ben\u00F6tigter freier Speicherplatz). +reposis.editor.codemeta.targetProduct = Zielprodukt: +reposis.editor.codemeta.targetProduct.help = Zielbetriebssystem/Produkt, f\u00FCr das der Code gilt. Wenn der Code f\u00FCr mehrere Versionen gilt, kann nur der Produktname verwendet werden. +reposis.editor.codemeta.version = Version: +reposis.editor.codemeta.version.help = Version der Software. +reposis.editor.software.relatedPublication = Verwandte Publikation +reposis.editor.software.relatedPublication.validation = Typ und Link oder Name sind notwendig. +reposis.editor.software.relatedPublication.genre = Genre +reposis.editor.software.relatedPublication.help = Verwandte Publikation(en). +reposis.editor.software.relatedPublication.link = Link +reposis.editor.software.relatedPublication.title = Titel +reposis.editor.software.relatedPublication.type = Typ +reposis.editor.validation.invalidUrl = Die URL ist ung\u00FCltig. Bitte geben Sie eine g\u00FC URL an. +reposis.role.copyrightHolder = Rechteinhaber(in): +reposis.role.funder = Sponsor(in): +reposis.role.maintainer = Maintainer(in): +reposis.role.provider = Anbieter(in): +reposis.role.sponsor = Sponsor(in): +reposis.validation.invalidUrl = Die URL ist ung\u00FCltig. Bitte geben Sie eine g\u00FCltige URL an. diff --git a/src/main/resources/config/reposis_common/messages_en.properties b/src/main/resources/config/reposis_common/messages_en.properties index a34fbf2..52a51d8 100644 --- a/src/main/resources/config/reposis_common/messages_en.properties +++ b/src/main/resources/config/reposis_common/messages_en.properties @@ -19,3 +19,84 @@ project.form.agreement.accept.post= and accept it. project.form.agreement.accept.link=consent form project.form.agreement=consent form project.form.validation.agreement=You have to accept the consent form to continue. + +reposis.codemeta.applicationCategory = Application Category: +reposis.codemeta.applicationSubCategory = Application Subcategory: +reposis.codemeta.buildInstructions = Build Instruction: +reposis.codemeta.codeRepository = Code Repository: +reposis.codemeta.contIntegration = Continuous Integration: +reposis.codemeta.developmentStatus = Development Status: +reposis.codemeta.issueTracker = Issue Tracker: +reposis.codemeta.memoryRequirement = Memory: +reposis.codemeta.operatingSystem = Operating System: +reposis.codemeta.permissions = Permission: +reposis.codemeta.processorRequirement = Processor: +reposis.codemeta.programmingLanguage = Programming Language: +reposis.codemeta.readme = Readme: +reposis.codemeta.releaseNotes = Release Notes: +reposis.codemeta.runtimePlatform = Runtime Platform: +reposis.codemeta.softwareHelp = Help/Documentation: +reposis.codemeta.softwareRequirement = Software: +reposis.codemeta.softwareSuggestion = Optional Software: +reposis.codemeta.storageRequirement = Storage: +reposis.codemeta.targetProduct = Target Product: +reposis.codemeta.version = Version: +reposis.editor.codemeta.applicationCategory = Application Category: +reposis.editor.codemeta.applicationCategory.help = Type of software application, e.g. Game, Multimedia. +reposis.editor.codemeta.applicationSubCategory = Application Subcategory: +reposis.editor.codemeta.applicationSubCategory.help = Subcategory of the application, e.g. Arcade Game. +reposis.editor.codemeta.buildInstructions = Build Instruction: +reposis.editor.codemeta.buildInstructions.help = Link to installation instructions/documentation. +reposis.editor.codemeta.codeRepository = Code Repository: +reposis.editor.codemeta.codeRepository.help = Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex). +reposis.editor.codemeta.contIntegration = Continuous Integration: +reposis.editor.codemeta.contIntegration.help = Link to continuous integration service. +reposis.editor.codemeta.developmentStatus = Development Status: +reposis.editor.codemeta.developmentStatus.help = Description of development status. +reposis.editor.codemeta.issueTracker = Issue Tracker: +reposis.editor.codemeta.issueTracker.help = Link to software bug reporting or issue tracking system. +reposis.editor.codemeta.memoryRequirement = Memory: +reposis.editor.codemeta.memoryRequirement.help = Minimum memory requirements. +reposis.editor.codemeta.operatingSystem = Operating System: +reposis.editor.codemeta.operatingSystem.help = Operating systems supported (Windows 11, OSX 10.6, Android 1.6). +reposis.editor.codemeta.permission = Permission: +reposis.editor.codemeta.permission.help = Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi). +reposis.editor.codemeta.processorRequirement = Processor: +reposis.editor.codemeta.processorRequirement.help = Processor architecture required to run the application (e.g. IA64). +reposis.editor.codemeta.programmingLanguage = Programming Language: +reposis.editor.codemeta.programmingLanguage.help = The computer programming language. +reposis.editor.codemeta.readme = Readme: +reposis.editor.codemeta.readme.help = Link zu Readme. +reposis.editor.codemeta.releaseNotes = Release Notes: +reposis.editor.codemeta.releaseNotes.help = Link to what changed in this version. +reposis.editor.codemeta.runtimePlatform = Runtime Platform: +reposis.editor.codemeta.runtimePlatform.help = Runtime platform or script interpreter dependencies (e.g. Java8, Python2.3, .Net Framework 3.0). +reposis.editor.codemeta.softwareHelp = Help/Documentation: +reposis.editor.codemeta.softwareHelp.help = Link to software application help. +reposis.editor.codemeta.softwareRequirement = Software: +reposis.editor.codemeta.softwareRequirement.help = Name/link to required software dependencies. +reposis.editor.codemeta.softwareRequirement.link = Link +reposis.editor.codemeta.softwareRequirement.name = Name +reposis.editor.codemeta.softwareSuggestion = Optional Software: +reposis.editor.codemeta.softwareSuggestion.help = Name/link to optional dependencies , e.g. for optional features, code development, etc. +reposis.editor.codemeta.softwareSuggestion.link = Link +reposis.editor.codemeta.softwareSuggestion.name = Name +reposis.editor.codemeta.storageRequirement = Storage: +reposis.editor.codemeta.storageRequirement.help = Storage requirements (free space required). +reposis.editor.codemeta.targetProduct = Target Product: +reposis.editor.codemeta.targetProduct.help = Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used. +reposis.editor.codemeta.version = Version: +reposis.editor.codemeta.version.help = Version of the software. +reposis.editor.software.relatedPublication = Related Publication +reposis.editor.software.relatedPublication.error = Type and link or name are necessary. +reposis.editor.software.relatedPublication.genre = Genre +reposis.editor.software.relatedPublication.help = Related publication(s). +reposis.editor.software.relatedPublication.link = Link +reposis.editor.software.relatedPublication.title = Title +reposis.editor.software.relatedPublication.type = Type +reposis.role.copyrightHolder = Copyright Holder: +reposis.role.funder = Funder: +reposis.role.maintainer = Maintainer: +reposis.role.provider = Provider: +reposis.role.sponsor = Sponsor: +reposis.validation.invalidUrl = The url is not valid. Please provide a valid url. diff --git a/src/main/resources/config/reposis_common/mycore.properties b/src/main/resources/config/reposis_common/mycore.properties index 47be87a..54954c4 100644 --- a/src/main/resources/config/reposis_common/mycore.properties +++ b/src/main/resources/config/reposis_common/mycore.properties @@ -59,3 +59,20 @@ MCR.User.Shibboleth.NewUserHandler=de.gbv.reposis.user.shibboleth.MCRDefaultConf MIR.Agreement.File=agreement.pdf MIR.Agreement.MailTemplate=agreement_mail_template.xhtml MIR.Agreement.Genres.Skip=journal,series,collection,newspaper,series,bachelor_thesis,master_thesis,matura + +############################################################################## +# Codemeta # +############################################################################## +MCR.ContentTransformer.mods2codemeta-jsonld.Stylesheet=xslt/mycoreobject2codemeta-jsonld.xsl +MCR.ContentTransformer.mods2codemeta-jsonld.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl +#MCR.ContentTransformer.oai-codemeta.Stylesheet=xslt/mycoreobject2codemeta-jsonld.xsl,xslt/codemeta-jsonld2rdf.xsl +#MCR.ContentTransformer.oai-codemeta.TransformerFactoryClass=net.sf.saxon.TransformerFactoryImpl +#MIR.Layout.End=%MIR.Layout.End%,export-extension +#MIR.Layout.Start=%MIR.Layout.Start%,reposis-metadata-extension +#MIR.Layout.Display.Div=%MIR.Layout.Display.Div%,reposis-export-extension +#MCR.OAIDataProvider.MetadataFormat.codemeta.Schema=http://www.openarchives.org/OAI/2.0/rdf.xsd +#MCR.OAIDataProvider.MetadataFormat.codemeta.Namespace=http://www.w3.org/1999/02/22-rdf-syntax-ns# +#MCR.OAIDataProvider.OAI2.Sets.codemeta.URI=webapp:oai/set_codemeta.xml +#MCR.OAIDataProvider.OAI2.Sets.codemeta.Query=mods.genre:software +#MCR.URIResolver.xslImports.modsmeta=%MCR.URIResolver.xslImports.modsmeta%,metadata/reposis-export-extension.xsl,metadata/reposis-metadata-extension.xsl +MCR.URIResolver.ModuleResolver.codemeta2rdf=de.vzg.reposis.util.codemeta.CodeMetaRDFConverterResolver diff --git a/src/main/resources/jsonld/codemeta.jsonld b/src/main/resources/jsonld/codemeta.jsonld new file mode 100644 index 0000000..2f3ea1e --- /dev/null +++ b/src/main/resources/jsonld/codemeta.jsonld @@ -0,0 +1,79 @@ +{ + "@context": { + "type": "@type", + "id": "@id", + "schema":"http://schema.org/", + "codemeta": "https://codemeta.github.io/terms/", + "Organization": {"@id": "schema:Organization"}, + "Person": {"@id": "schema:Person"}, + "SoftwareSourceCode": {"@id": "schema:SoftwareSourceCode"}, + "SoftwareApplication": {"@id": "schema:SoftwareApplication"}, + "Text": {"@id": "schema:Text"}, + "URL": {"@id": "schema:URL"}, + "address": { "@id": "schema:address"}, + "affiliation": { "@id": "schema:affiliation"}, + "applicationCategory": { "@id": "schema:applicationCategory", "@type": "@id"}, + "applicationSubCategory": { "@id": "schema:applicationSubCategory", "@type": "@id"}, + "citation": { "@id": "schema:citation"}, + "codeRepository": { "@id": "schema:codeRepository", "@type": "@id"}, + "contributor": { "@id": "schema:contributor"}, + "copyrightHolder": { "@id": "schema:copyrightHolder"}, + "copyrightYear": { "@id": "schema:copyrightYear"}, + "dateCreated": {"@id": "schema:dateCreated", "@type": "schema:Date" }, + "dateModified": {"@id": "schema:dateModified", "@type": "schema:Date" }, + "datePublished": {"@id": "schema:datePublished", "@type": "schema:Date" }, + "description": { "@id": "schema:description"}, + "downloadUrl": { "@id": "schema:downloadUrl", "@type": "@id"}, + "email": { "@id": "schema:email"}, + "editor": { "@id": "schema:editor"}, + "encoding": { "@id": "schema:encoding"}, + "familyName": { "@id": "schema:familyName"}, + "fileFormat": { "@id": "schema:fileFormat", "@type": "@id"}, + "fileSize": { "@id": "schema:fileSize"}, + "funder": { "@id": "schema:funder"}, + "givenName": { "@id": "schema:givenName"}, + "hasPart": { "@id": "schema:hasPart" }, + "identifier": { "@id": "schema:identifier", "@type": "@id"}, + "installUrl": { "@id": "schema:installUrl", "@type": "@id"}, + "isAccessibleForFree": { "@id": "schema:isAccessibleForFree"}, + "isPartOf": { "@id": "schema:isPartOf"}, + "keywords": { "@id": "schema:keywords"}, + "license": { "@id": "schema:license", "@type": "@id"}, + "memoryRequirements": { "@id": "schema:memoryRequirements", "@type": "@id"}, + "name": { "@id": "schema:name"}, + "operatingSystem": { "@id": "schema:operatingSystem"}, + "permissions": { "@id": "schema:permissions"}, + "position": { "@id": "schema:position"}, + "processorRequirements": { "@id": "schema:processorRequirements"}, + "producer": { "@id": "schema:producer"}, + "programmingLanguage": { "@id": "schema:programmingLanguage"}, + "provider": { "@id": "schema:provider"}, + "publisher": { "@id": "schema:publisher"}, + "relatedLink": { "@id": "schema:relatedLink", "@type": "@id"}, + "releaseNotes": { "@id": "schema:releaseNotes", "@type": "@id"}, + "runtimePlatform": { "@id": "schema:runtimePlatform"}, + "sameAs": { "@id": "schema:sameAs", "@type": "@id"}, + "softwareHelp": { "@id": "schema:softwareHelp"}, + "softwareRequirements": { "@id": "schema:softwareRequirements", "@type": "@id"}, + "softwareVersion": { "@id": "schema:softwareVersion"}, + "sponsor": { "@id": "schema:sponsor"}, + "storageRequirements": { "@id": "schema:storageRequirements", "@type": "@id"}, + "supportingData": { "@id": "schema:supportingData"}, + "targetProduct": { "@id": "schema:targetProduct"}, + "url": { "@id": "schema:url", "@type": "@id"}, + "version": { "@id": "schema:version"}, + + "author": { "@id": "schema:author", "@container": "@list" }, + + "softwareSuggestions": { "@id": "codemeta:softwareSuggestions", "@type": "@id"}, + "contIntegration": { "@id": "codemeta:contIntegration", "@type": "@id"}, + "buildInstructions": { "@id": "codemeta:buildInstructions", "@type": "@id"}, + "developmentStatus": { "@id": "codemeta:developmentStatus", "@type": "@id"}, + "embargoDate": { "@id":"codemeta:embargoDate", "@type": "schema:Date" }, + "funding": { "@id": "codemeta:funding" }, + "readme": { "@id":"codemeta:readme", "@type": "@id" }, + "issueTracker": { "@id":"codemeta:issueTracker", "@type": "@id" }, + "referencePublication": { "@id": "codemeta:referencePublication", "@type": "@id"}, + "maintainer": { "@id": "codemeta:maintainer" } + } +} diff --git a/src/main/resources/xsl/metadata/reposis-export-extension.xsl b/src/main/resources/xsl/metadata/reposis-export-extension.xsl new file mode 100644 index 0000000..6c88697 --- /dev/null +++ b/src/main/resources/xsl/metadata/reposis-export-extension.xsl @@ -0,0 +1,30 @@ + + + + + + + + +
+ + + + + + + +
+
+ + +
+
diff --git a/src/main/resources/xsl/metadata/reposis-metadata-extension.xsl b/src/main/resources/xsl/metadata/reposis-metadata-extension.xsl new file mode 100644 index 0000000..9c84ec4 --- /dev/null +++ b/src/main/resources/xsl/metadata/reposis-metadata-extension.xsl @@ -0,0 +1,179 @@ + + + + + + + + + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + softwareRequirement + softwareSuggestion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/xsl/metadata/reposis-metadata-utils.xsl b/src/main/resources/xsl/metadata/reposis-metadata-utils.xsl new file mode 100644 index 0000000..f2d0a32 --- /dev/null +++ b/src/main/resources/xsl/metadata/reposis-metadata-utils.xsl @@ -0,0 +1,52 @@ + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + , + + + + + + + + +
diff --git a/src/main/resources/xslt/codemeta-jsonld2rdf.xsl b/src/main/resources/xslt/codemeta-jsonld2rdf.xsl new file mode 100644 index 0000000..de5dc77 --- /dev/null +++ b/src/main/resources/xslt/codemeta-jsonld2rdf.xsl @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/src/main/resources/xslt/mycoreobject2codemeta-jsonld.xsl b/src/main/resources/xslt/mycoreobject2codemeta-jsonld.xsl new file mode 100644 index 0000000..c16f159 --- /dev/null +++ b/src/main/resources/xslt/mycoreobject2codemeta-jsonld.xsl @@ -0,0 +1,310 @@ + + + + + + + + + + + https://doi.org/10.5063/schema/codemeta-2.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://schema.org/ScholarlyArticle + + + http://schema.org/CreativeWork + + + + + + + + + + + + + + + + + + + + + + + + schema:PropertyValue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://schema.org/CreativeWork + + + + + + + + + + + + + + + + + +