Package edu.stanford.bmir.protege.web.client.rpc.data

Examples of edu.stanford.bmir.protege.web.client.rpc.data.BioPortalReferenceData


                        return;
                    }
                    final Collection<EntityData> selected = selectable.getSelection();

                    for (EntityData data : selected) {
                        final BioPortalReferenceData bpRefData = createBioPortalReferenceData(data);
                        if (isReplace()){
                           EntityData oldValueEntityData = new EntityData(store.getAt(0).getAsString(INSTANCE_FIELD_NAME));
                            OntologyServiceManager.getInstance().replaceExternalReference(
                                getProjectId(),
                                getSubject().getName(),
View Full Code Here


        }
    }


    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;
    }
View Full Code Here

        return "<font color='" + (alert ? red_link : blue_link) + "'><b><u>" + text + "</u></b></font>";
    }

    protected void onImportReference(Record record) {
        BioPortalReferenceData bpRefData = createBioPortalReferenceDataFromRecord(record);
        if(replaceExisting && isSingleValued){
            EntityData oldValueEntityData = new EntityData(currentValue);
            OntologyServiceManager.getInstance().replaceExternalReference(projectId, currentEntity.getName(), bpRefData,
                    oldValueEntityData, Application.get().getUserId(),
                    getReplaceReferenceApplyToString(bpRefData, oldValueEntityData),
View Full Code Here

        window.show();
        doMask(panel);

        BioPortalSearchData bpSearchData = new BioPortalSearchData();
        initBioPortalSearchData(bpSearchData);
        BioPortalReferenceData bpRefData = createBioPortalReferenceDataFromRecord(record);

        OntologyServiceManager.getInstance().getBioPortalSearchContentDetails(projectId, bpSearchData,
                bpRefData, new AsyncCallback<String>() {
                    public void onFailure(Throwable caught) {
                        doUnmask(panel);
View Full Code Here

        WebProtegeDialog.showDialog(controller);
    }

    public void createDNFReference(NoteContent noteContent) {
        GWT.log("onCreateDNFReference", null);
        BioPortalReferenceData bpRefData = new BioPortalReferenceData();

        initBioPortalReferenceData(bpRefData);

        bpRefData.setBpUrl(null);
        bpRefData.setConceptId(BioPortalConstants.DNF_CONCEPT_ID);
        bpRefData.setConceptIdShort(BioPortalConstants.DNF_CONCEPT_ID_SHORT);
        bpRefData.setOntologyVersionId(null);
        bpRefData.setOntologyName(null);
        bpRefData.setPreferredName(BioPortalConstants.DNF_CONCEPT_LABEL);
        bpRefData.setBpUrl(null);//do not use the BP rest URL to find out more information about this concept
        OntologyServiceManager.getInstance().createExternalReference(
                projectId,
                currentEntity.getName(),
                bpRefData,
                Application.get().getUserId(),
View Full Code Here

                getCreateDNFConceptHandler(noteContent));
    }

    public void createReference(String ontologyVersionId, String conceptId, String conceptIdShort, String preferredName, String url) {
        GWT.log("onCreateReference", null);
        BioPortalReferenceData bpRefData = new BioPortalReferenceData();

        initBioPortalReferenceData(bpRefData);

        bpRefData.setBpUrl(url);
        bpRefData.setConceptId(conceptId);
        bpRefData.setConceptIdShort(conceptIdShort);
        bpRefData.setOntologyVersionId(ontologyVersionId);
        bpRefData.setOntologyName(null);
        bpRefData.setPreferredName(preferredName);
        bpRefData.setBpUrl(null);//do not use the BP rest URL to find out more information about this concept
        OntologyServiceManager.getInstance().createExternalReference(
                projectId,
                currentEntity.getName(),
                bpRefData,
                Application.get().getUserId(),
View Full Code Here

                getCreateManualreferenceHandler());
    }

    public void replaceReference(String ontologyVersionId, String conceptId, String conceptIdShort, String preferredName, String url, String oldInstanceName) {
        GWT.log("onCreateReference", null);
        BioPortalReferenceData bpRefData = new BioPortalReferenceData();

        initBioPortalReferenceData(bpRefData);

        bpRefData.setBpUrl(url);
        bpRefData.setConceptId(conceptId);
        bpRefData.setConceptIdShort(conceptIdShort);
        bpRefData.setOntologyVersionId(ontologyVersionId);
        bpRefData.setOntologyName(null);
        bpRefData.setPreferredName(preferredName);
        bpRefData.setBpUrl(null);//do not use the BP rest URL to find out more information about this concept

        EntityData oldValueEntityData = new EntityData(oldInstanceName);
        OntologyServiceManager.getInstance().replaceExternalReference(
                projectId,
                currentEntity. getName(),
View Full Code Here

        String conceptId = record.getAsString("conceptId");
        String conceptIdShort = record.getAsString("conceptIdShort");
        String ontologyName = record.getAsString("ontologyDisplayLabel");
        String preferredName = record.getAsString("preferredName");

        BioPortalReferenceData bpRefData = new BioPortalReferenceData();

        initBioPortalReferenceData(bpRefData);

        String url = getBioPortalVisualizeURL() + ontologyVersionId + "/?conceptid=" + URL.encodeComponent(conceptId);
        bpRefData.setBpUrl(url);

        bpRefData.setConceptId(conceptId);
        bpRefData.setConceptIdShort(conceptIdShort);
        bpRefData.setOntologyVersionId(ontologyVersionId);
        bpRefData.setOntologyName(ontologyName);
        bpRefData.setPreferredName(preferredName);
        bpRefData.setBpRestBaseUrl(getBioPortalRestBaseURL());
        bpRefData.setBpRestCallSuffix(getBioPortalRestCallSuffix());

        return bpRefData;
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.rpc.data.BioPortalReferenceData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.