forked from D-Net/dnet-hadoop
retrieving vocabulary terms from nquads
This commit is contained in:
parent
e53a606afc
commit
41284ec2f9
dhp-workflows/dhp-rdfconverter/src/main/java/eu/dnetlib/dhp/rdfconverter
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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("/");
|
||||
|
|
Loading…
Reference in New Issue