}
}
private BioPortalReferenceData createBioPortalReferenceData(EntityData entityData) {
BioPortalReferenceData bpRefData = new BioPortalReferenceData();
bpRefData.setCreateAsClass(false);
bpRefData.setReferenceClassName(objectType);
//name of the property, eg #action
bpRefData.setReferencePropertyName(getProperty().getName());
bpRefData.setPreferredName(entityData.getBrowserText());
bpRefData.setBpUrl(null);
bpRefData.setConceptId(entityData.getName());
bpRefData.setConceptIdPropertyName(conceptIdPropertyName);
bpRefData.setConceptIdShort(entityData.getName());
//not sure about this one ...
bpRefData.setOntologyVersionId(null);
bpRefData.setImportFromOriginalOntology(true);
bpRefData.setConceptIdAltPropertyName("http://who.int/icps#termId");
final String url = entityData.getName();
bpRefData.setOntologyName(null);
if (url != null && url.indexOf('#') > -1){
bpRefData.setOntologyName(url.substring(0, url.indexOf('#')));
}
bpRefData.setOntologyNamePropertyName(ontologyIdPropertyName);
bpRefData.setBpRestBaseUrl(BioPortalConstants.DEFAULT_BIOPORTAL_REST_BASE_URL);
bpRefData.setBpRestCallSuffix(""); //TODO This may cause BP REST calls to fail. We should re-think this solution entirely, because creating BioPortal references to internal classes is not a good idea!!!!!!
return bpRefData;
}