diff --git a/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/bioschema/model/BioSchemaProtein.java b/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/bioschema/model/BioSchemaProtein.java index 962644c07..d9f123963 100644 --- a/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/bioschema/model/BioSchemaProtein.java +++ b/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/bioschema/model/BioSchemaProtein.java @@ -50,6 +50,8 @@ public class BioSchemaProtein { private Link mainEntityOfPage; @JsonProperty("https://schema.org/citation") private Citation citation; + @JsonProperty("https://schema.org/hasSequenceAnnotation") + private SequenceAnnotation sequenceAnnotation; public String getId() { return id; @@ -190,6 +192,14 @@ public class BioSchemaProtein { this.mainEntityOfPage = mainEntityOfPage; } + public SequenceAnnotation getSequenceAnnotation() { + return sequenceAnnotation; + } + + public void setSequenceAnnotation(SequenceAnnotation sequenceAnnotation) { + this.sequenceAnnotation = sequenceAnnotation; + } + public Citation getCitation() { return citation; } @@ -347,6 +357,65 @@ public class BioSchemaProtein { } } + public static class SequenceAnnotation { + @JsonProperty("https://schema.org/additionalProperty") + private List additionalProperty; + + public List getAdditionalProperty() { + return additionalProperty; + } + + public void setAdditionalProperty(List additionalProperty) { + this.additionalProperty = additionalProperty; + } + } + + public static class AdditionalProperty { + @JsonProperty("https://schema.org/value") + private List propertyValue; + + public List getPropertyValue() { + return propertyValue; + } + + public void setPropertyValue(List propertyValue) { + this.propertyValue = propertyValue; + } + } + + public static class PropertyValue { + @JsonProperty("@id") + private String id; + @JsonProperty("https://schema.org/termCode") + private String termCode; + @JsonProperty("https://schema.org/name") + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getTermCode() { + return termCode; + } + + public void setTermCode(String termCode) { + this.termCode = termCode; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + public String getId() { return id; } diff --git a/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/utils/RDFConverter.java b/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/utils/RDFConverter.java index c50e7adb9..bc67565e1 100644 --- a/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/utils/RDFConverter.java +++ b/dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter/utils/RDFConverter.java @@ -161,7 +161,7 @@ public class RDFConverter { if (entry.getSameAs() != null) { entry.getSameAs().stream().filter(Objects::nonNull).forEach(sameAs -> { - log.debug("sameAs: " + sameAs.getId()); + log.debug("sameAs value: " + sameAs.getId()); addRelatedIdentifier(dataciteProtein, sameAs.getId(), "IsIdenticalTo"); }); } @@ -173,6 +173,10 @@ public class RDFConverter { }); } + if (entry.getSequenceAnnotation() !=null) { + log.debug("Sequence Annotation found " ); + } + String proteinId = ""; try { String[] identifierParts = dataciteProtein.getIdentifiers().get(0).getIdentifier().split("/");