forked from D-Net/dnet-hadoop
retrieving vocabulary terms from nquads
This commit is contained in:
parent
e53a606afc
commit
41284ec2f9
|
@ -50,6 +50,8 @@ public class BioSchemaProtein {
|
||||||
private Link mainEntityOfPage;
|
private Link mainEntityOfPage;
|
||||||
@JsonProperty("https://schema.org/citation")
|
@JsonProperty("https://schema.org/citation")
|
||||||
private Citation citation;
|
private Citation citation;
|
||||||
|
@JsonProperty("https://schema.org/hasSequenceAnnotation")
|
||||||
|
private SequenceAnnotation sequenceAnnotation;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -190,6 +192,14 @@ public class BioSchemaProtein {
|
||||||
this.mainEntityOfPage = mainEntityOfPage;
|
this.mainEntityOfPage = mainEntityOfPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SequenceAnnotation getSequenceAnnotation() {
|
||||||
|
return sequenceAnnotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSequenceAnnotation(SequenceAnnotation sequenceAnnotation) {
|
||||||
|
this.sequenceAnnotation = sequenceAnnotation;
|
||||||
|
}
|
||||||
|
|
||||||
public Citation getCitation() {
|
public Citation getCitation() {
|
||||||
return citation;
|
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() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ public class RDFConverter {
|
||||||
|
|
||||||
if (entry.getSameAs() != null) {
|
if (entry.getSameAs() != null) {
|
||||||
entry.getSameAs().stream().filter(Objects::nonNull).forEach(sameAs -> {
|
entry.getSameAs().stream().filter(Objects::nonNull).forEach(sameAs -> {
|
||||||
log.debug("sameAs: " + sameAs.getId());
|
log.debug("sameAs value: " + sameAs.getId());
|
||||||
addRelatedIdentifier(dataciteProtein, sameAs.getId(), "IsIdenticalTo");
|
addRelatedIdentifier(dataciteProtein, sameAs.getId(), "IsIdenticalTo");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -173,6 +173,10 @@ public class RDFConverter {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entry.getSequenceAnnotation() !=null) {
|
||||||
|
log.debug("Sequence Annotation found " );
|
||||||
|
}
|
||||||
|
|
||||||
String proteinId = "";
|
String proteinId = "";
|
||||||
try {
|
try {
|
||||||
String[] identifierParts = dataciteProtein.getIdentifiers().get(0).getIdentifier().split("/");
|
String[] identifierParts = dataciteProtein.getIdentifiers().get(0).getIdentifier().split("/");
|
||||||
|
|
Loading…
Reference in New Issue