Compare commits

...

2 Commits

4 changed files with 88 additions and 1 deletions

View File

@ -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> additionalProperty;
public List<AdditionalProperty> getAdditionalProperty() {
return additionalProperty;
}
public void setAdditionalProperty(List<AdditionalProperty> additionalProperty) {
this.additionalProperty = additionalProperty;
}
}
public static class AdditionalProperty {
@JsonProperty("https://schema.org/value")
private List<PropertyValue> propertyValue;
public List<PropertyValue> getPropertyValue() {
return propertyValue;
}
public void setPropertyValue(List<PropertyValue> 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;
}

View File

@ -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("/");

View File

@ -38,6 +38,8 @@
<module>dhp-usage-raw-data-update</module>
<module>dhp-broker-events</module>
<module>dhp-doiboost</module>
<module>dhp-rdfconverter</module>
<module>dhp-bmuse</module>
</modules>
<pluginRepositories>

12
pom.xml
View File

@ -105,6 +105,18 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>dnet-deps</id>
<name>D-Net Dependencies</name>
<url>https://maven.d4science.org/nexus/content/repositories/dnet-deps/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<layout>default</layout>
</repository>
</repositories>
<dependencies>