forked from D-Net/dnet-hadoop
Compare commits
No commits in common. "33dcf9964c1ab2be80010d7275c561e17fcb130d" and "41de8fb7859ffa5520d974bcfd68deb2d610d00c" have entirely different histories.
33dcf9964c
...
41de8fb785
|
@ -62,7 +62,7 @@ class BioschemaModelConstants extends Serializable {}
|
|||
object BioschemaModelConstants {
|
||||
|
||||
val PROTEIN_RESOURCETYPE: Qualifier =
|
||||
qualifier("0046", "Bioentity", ModelConstants.DNET_PUBLICATION_RESOURCE, ModelConstants.DNET_PUBLICATION_RESOURCE)
|
||||
qualifier("0047", "Protein", ModelConstants.DNET_PUBLICATION_RESOURCE, ModelConstants.DNET_PUBLICATION_RESOURCE)
|
||||
|
||||
val DATA_INFO: DataInfo = OafMapperUtils.dataInfo(
|
||||
false,
|
||||
|
|
|
@ -195,8 +195,6 @@ object BioschemaToOAFTransformation {
|
|||
throw new RuntimeException("Url not found")
|
||||
}
|
||||
instance.setCollectedfrom(collectedFromMap(datasourceKey))
|
||||
instance.setHostedby(collectedFromMap(datasourceKey))
|
||||
|
||||
instance.setPid(result.getPid)
|
||||
|
||||
result.setId(IdentifierFactory.createIdentifier(result))
|
||||
|
@ -213,7 +211,6 @@ object BioschemaToOAFTransformation {
|
|||
val alternativeIdentifierUrl: AlternateIdentifierType = alternativeIdentifierUrls.asJava.get(0)
|
||||
|
||||
val alternativeIdentifiers = resolvedURLPattern
|
||||
.filter(pattern => !pattern._1.contains(datasourceKey))
|
||||
.map(pattern => {
|
||||
if (alternativeIdentifierUrl.alternateIdentifier.startsWith(s"${pattern._1}")) {
|
||||
val relatedId = StringUtils.substringAfter(alternativeIdentifierUrl.alternateIdentifier, s"${pattern._1}")
|
||||
|
@ -229,19 +226,19 @@ object BioschemaToOAFTransformation {
|
|||
null
|
||||
})
|
||||
.find(s => s != null)
|
||||
.get
|
||||
|
||||
if (alternativeIdentifiers.isDefined) {
|
||||
instance.setAlternateIdentifier(List(alternativeIdentifiers.get).asJava)
|
||||
}
|
||||
|
||||
val access_rights_qualifier =
|
||||
OafMapperUtils.accessRight(
|
||||
ModelConstants.UNKNOWN,
|
||||
ModelConstants.NOT_AVAILABLE,
|
||||
ModelConstants.DNET_ACCESS_MODES,
|
||||
ModelConstants.DNET_ACCESS_MODES
|
||||
val defaultAlternatedIdentifer: StructuredProperty = OafMapperUtils.structuredProperty(
|
||||
pid,
|
||||
datasourceKey,
|
||||
datasourceKey,
|
||||
ModelConstants.DNET_PID_TYPES,
|
||||
ModelConstants.DNET_PID_TYPES,
|
||||
dataInfo
|
||||
)
|
||||
instance.setAccessright(access_rights_qualifier)
|
||||
var finalAlternativeIdentifiers: List[StructuredProperty] = List()
|
||||
finalAlternativeIdentifiers = List(alternativeIdentifiers) ::: List(defaultAlternatedIdentifer)
|
||||
instance.setAlternateIdentifier(finalAlternativeIdentifiers.asJava)
|
||||
|
||||
if (exportLinks) {
|
||||
val rels: List[RelatedIdentifierType] = for {
|
||||
|
|
Loading…
Reference in New Issue