Examples of OtherDataCreationInfo


Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

      CreateOntologyInfo createOntologyInfo = new CreateOntologyInfo();
      createOntologyInfo.setHostingType(HostingType.FULLY_HOSTED);

      createOntologyInfo.setMetadataValues(newValues);

      OtherDataCreationInfo dataCreationInfo = new OtherDataCreationInfo();
      dataCreationInfo.setTempOntologyInfo(getTempOntologyInfo());
      createOntologyInfo.setDataCreationInfo(dataCreationInfo);

      // set info of original ontology:
      createOntologyInfo.setBaseOntologyInfo(getTempOntologyInfo());

      // set the desired authority/shortName combination:
      createOntologyInfo.setAuthority(pageFullyHosted.getAuthority());
      createOntologyInfo.setShortName(pageFullyHosted.getShortName());

      RegisterNewExecute execute = new RegisterNewExecute(createOntologyInfo);

      execute.reviewAndRegisterNewOntology();
    }

    /////////////////////////////////////////////////////////////////////
    // Finish: re-hosted registration
    else if ( currentPage == pageReHostedConfirmation ) {

      // collect information and run the "review and register"
      String error;
      Map<String, String> newValues = new HashMap<String, String>();
      if ( (error = pageReHostedMetadataPage1.mdSection.putValuesInMap(newValues, true)) != null
      ||   (error = pageReHostedMetadataPage2.mdSection.putValuesInMap(newValues, true)) != null
      ||   (error = pageReHostedMetadataPage3.mdSection.putValuesInMap(newValues, true)) != null
      ) {
        // Should not happen
        Window.alert(error);
        return;
      }

      CreateOntologyInfo createOntologyInfo = new CreateOntologyInfo();
      createOntologyInfo.setHostingType(HostingType.RE_HOSTED);

      createOntologyInfo.setMetadataValues(newValues);

      OtherDataCreationInfo dataCreationInfo = new OtherDataCreationInfo();
      dataCreationInfo.setTempOntologyInfo(getTempOntologyInfo());
      createOntologyInfo.setDataCreationInfo(dataCreationInfo);

      // set info of original ontology:
      createOntologyInfo.setBaseOntologyInfo(getTempOntologyInfo());
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

    Map<String, String> newValues = createOntologyInfo.getMetadataValues();
    assert ( newValues != null ) ;
   
    DataCreationInfo dataCreationInfo = createOntologyInfo.getDataCreationInfo();
    assert ( dataCreationInfo instanceof OtherDataCreationInfo ) ;
    final OtherDataCreationInfo otherDataCreationInfo = (OtherDataCreationInfo) dataCreationInfo;
    final TempOntologyInfo tempOntologyInfo = otherDataCreationInfo.getTempOntologyInfo();

   
    // to check if this is going to be a new submission (if ontologyId == null) or, otherwise, a new version.
    final String ontologyId = createOntologyInfo.getPriorOntologyInfo().getOntologyId();
   
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

    Map<String, String> newValues = createOntologyInfo.getMetadataValues();
    assert ( newValues != null ) ;
   
    DataCreationInfo dataCreationInfo = createOntologyInfo.getDataCreationInfo();
    assert ( dataCreationInfo instanceof OtherDataCreationInfo ) ;
    final OtherDataCreationInfo otherDataCreationInfo = (OtherDataCreationInfo) dataCreationInfo;
    final TempOntologyInfo tempOntologyInfo = otherDataCreationInfo.getTempOntologyInfo();

   
    // to check if this is going to be a new submission (if ontologyId == null) or, otherwise, a new version.
    final String ontologyId = createOntologyInfo.getPriorOntologyInfo().getOntologyId();
   
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

    // this flag will be only true in the case where an external ontology is to be registered
    // and the user indicates that the original base namespace be preserved.
    createOntologyResult.setPreserveOriginalBaseNamespace(false);
   
    if ( dataCreationInfo instanceof OtherDataCreationInfo ) {
      OtherDataCreationInfo odci = (OtherDataCreationInfo) dataCreationInfo;
      TempOntologyInfo toi = odci.getTempOntologyInfo();
      createOntologyResult.setPreserveOriginalBaseNamespace(toi != null && toi.isPreserveOriginalBaseNamespace());
    }

   
    if ( ! createOntologyResult.isPreserveOriginalBaseNamespace() ) {
      // Note: if this is the submission of a new version (ontologyId != null) of an "external" (ie, re-hosted)
      // ontology, then set this flag to true
      if ( ontologyId != null && ! OntServiceUtil.isOntResolvableUri(createOntologyInfo.getUri()) ) {
        createOntologyResult.setPreserveOriginalBaseNamespace(true);
       
        // TODO However, note that we're goint to preserve the URI of the given ontology in this submission,
        // which may not coincide with the previous one.
      }
    }
    //}pons

   
    Map<String, String> newValues = createOntologyInfo.getMetadataValues();
   
    ////////////////////////////////////////////
    // check for errors
   
    if ( createOntologyResult.getError() != null ) {
      log.info(": error: " +createOntologyResult.getError());
      return createOntologyResult;
    }
   
   
    if ( newValues == null ) {
      String error = "Unexpected: no new values assigned for review. Please report this bug";
      createOntologyResult.setError(error );
      log.info(error);
      return createOntologyResult;
    }
   
   
    final String namespaceRoot = defaultNamespaceRoot;
   
    final String orgAbbreviation = newValues.get(OmvMmi.origMaintainerCode.getURI());
    String shortName = newValues.get(Omv.acronym.getURI());
    // TODO: shortName taken NOT from acronym but from a new field explicitly for the shortName piece

    if ( ! createOntologyResult.isPreserveOriginalBaseNamespace() ) {
      //pons: check the following if regular assignment of namespace
     
      if ( orgAbbreviation == null ) {
        log.info("missing origMaintainerCode");
        createOntologyResult.setError("missing origMaintainerCode");
        return createOntologyResult;
      }
     
      if ( shortName == null ) {
       
        if ( ontologyId == null ) {
          // This is a new submission.
          log.info("missing acronym (to be used as shortName)");
          createOntologyResult.setError("missing acronym (to be used as shortName)");
          return createOntologyResult;
        }
        else {
          // take from previous information
          String originalShortName = createOntologyInfo.getShortName();
          shortName = originalShortName;
        }
      }

      if ( ontologyId == null ) {
        // This is a new submission. We need to check for any conflict with a preexisting
        // ontology in the repository with the same shortName+orgAbbreviation combination
        //
        if ( ! Util2.checkNoPreexistingOntology(namespaceRoot, orgAbbreviation, shortName, createOntologyResult) ) {
          return createOntologyResult;
        }
      }
      else {
        // This is a submission of a *new version* of an existing ontology.
        // We need to check the shortName+orgAbbreviation combination as any changes here
        // would imply a *new* ontology, not a new version.
        //
       
        String originalOrgAbbreviation = createOntologyInfo.getAuthority();
        String originalShortName = createOntologyInfo.getShortName();
       
        if ( ! Util2.checkUriKeyCombinationForNewVersion(
            originalOrgAbbreviation, originalShortName,
            orgAbbreviation, shortName, createOntologyResult) ) {
          return createOntologyResult;
        }
      }
    }
    // Else: see below, where we obtain the original namespace.
   
   
    ////////////////////////////////////////////////////////////////////////////
    // section to create the ontology the base:
   
    if ( dataCreationInfo instanceof VocabularyDataCreationInfo ) {
      // vocabulary (voc2rdf) case:
     
      VocabularyDataCreationInfo vocabularyDataCreationInfo = (VocabularyDataCreationInfo) dataCreationInfo;
     
      _createTempVocabularyOntology(createOntologyInfo, vocabularyDataCreationInfo, createOntologyResult);
      if ( createOntologyResult.getError() != null ) {
        return createOntologyResult;
      }
    }
    else if dataCreationInfo instanceof MappingDataCreationInfo ) {
      // mapping (vine case):
     
      MappingDataCreationInfo mappingDataCreationInfo = (MappingDataCreationInfo) dataCreationInfo;
     
      _createTempMappingOntology(createOntologyInfo, mappingDataCreationInfo, createOntologyResult);
      if ( createOntologyResult.getError() != null ) {
        return createOntologyResult;
      }

    }
    else if dataCreationInfo instanceof OtherDataCreationInfo) {
      // external ontology case: the base ontology is already available, just use it
      // by setting the full path in the createOntologyResult:
     
      OtherDataCreationInfo otherDataCreationInfo = (OtherDataCreationInfo) dataCreationInfo;
      TempOntologyInfo tempOntologyInfo = otherDataCreationInfo.getTempOntologyInfo();
     
      String full_path;
     
      if ( tempOntologyInfo != null ) {
        // new contents were provided. Use that:
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

      CreateOntologyInfo createOntologyInfo = new CreateOntologyInfo();
      createOntologyInfo.setHostingType(HostingType.FULLY_HOSTED);
     
      createOntologyInfo.setMetadataValues(newValues);
     
      OtherDataCreationInfo dataCreationInfo = new OtherDataCreationInfo();
      dataCreationInfo.setTempOntologyInfo(tempOntologyInfo);
      createOntologyInfo.setDataCreationInfo(dataCreationInfo);
     
      // set info of original ontology:
      createOntologyInfo.setBaseOntologyInfo(registeredOntologyInfo);
     
      createOntologyInfo.setPriorOntologyInfo(
          registeredOntologyInfo.getOntologyId(),
          registeredOntologyInfo.getOntologyUserId(),
          registeredOntologyInfo.getVersionNumber()
      );
     
      // set the desired authority/shortName combination:
      createOntologyInfo.setAuthority(registeredOntologyInfo.getAuthority());
      createOntologyInfo.setShortName(registeredOntologyInfo.getShortName());
     
      RegisterVersionExecute execute = new RegisterVersionExecute(createOntologyInfo);
     
      execute.reviewAndRegisterVersionOntology();
    }
   
    /////////////////////////////////////////////////////////////////////
    // Finish: re-hosted registration
    else if ( currentPage == pageReHostedConfirmation ) {
     
      // collect information and run the "review and register"
      String error;
      Map<String, String> newValues = new HashMap<String, String>();
      if ( (error = pageReHostedMetadataPage1.mdSection.putValuesInMap(newValues, true)) != null
      ||   (error = pageReHostedMetadataPage2.mdSection.putValuesInMap(newValues, true)) != null
      ||   (error = pageReHostedMetadataPage3.mdSection.putValuesInMap(newValues, true)) != null
      ) {
        // Should not happen
        Window.alert(error);
        return;
      }
     
      CreateOntologyInfo createOntologyInfo = new CreateOntologyInfo();
      createOntologyInfo.setHostingType(HostingType.RE_HOSTED);
     
      createOntologyInfo.setMetadataValues(newValues);
     
      OtherDataCreationInfo dataCreationInfo = new OtherDataCreationInfo();
      dataCreationInfo.setTempOntologyInfo(getTempOntologyInfo());
      createOntologyInfo.setDataCreationInfo(dataCreationInfo);
     
      // set info of original ontology:
      createOntologyInfo.setBaseOntologyInfo(registeredOntologyInfo);
     
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

 
 

  @Override
  public OtherDataCreationInfo getCreateOntologyInfo() {
    OtherDataCreationInfo odci = new OtherDataCreationInfo();

    // TODO
    Orr.log("TODO OtherOntologyContentsPanel create OtherDataCreationInfo");
    odci.setTempOntologyInfo(tempOntologyInfo);
   
    return odci;
  }
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

    createOntologyInfo.setHostingType(hostingType);
    createOntologyInfo.setUri(ontologyUri);
   
    setSomeValues(loginResult, createOntologyInfo);
   
    OtherDataCreationInfo dataCreationInfo = new OtherDataCreationInfo();
    dataCreationInfo.setTempOntologyInfo(tempOntologyInfo);
    createOntologyInfo.setDataCreationInfo(dataCreationInfo);
   
    // set info of original ontology:
    createOntologyInfo.setBaseOntologyInfo(tempOntologyInfo);
   
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

        registeredOntologyInfo.getVersionNumber()
    );
   
    setSomeValues(loginResult, createOntologyInfo);
   
    OtherDataCreationInfo dataCreationInfo = new OtherDataCreationInfo();
    dataCreationInfo.setTempOntologyInfo(tempOntologyInfo);
    createOntologyInfo.setDataCreationInfo(dataCreationInfo);
   
    // set info of original ontology:
    createOntologyInfo.setBaseOntologyInfo(tempOntologyInfo);
   
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

    Map<String, String> newValues = createOntologyInfo.getMetadataValues();
    assert ( newValues != null ) ;
   
    DataCreationInfo dataCreationInfo = createOntologyInfo.getDataCreationInfo();
    assert ( dataCreationInfo instanceof OtherDataCreationInfo ) ;
    final OtherDataCreationInfo otherDataCreationInfo = (OtherDataCreationInfo) dataCreationInfo;
    final TempOntologyInfo tempOntologyInfo = otherDataCreationInfo.getTempOntologyInfo();

   
    // to check if this is going to be a new submission (if ontologyId == null) or, otherwise, a new version.
    final String ontologyId = createOntologyInfo.getPriorOntologyInfo().getOntologyId();
   
View Full Code Here

Examples of org.mmisw.orrclient.gwt.client.rpc.OtherDataCreationInfo

    Map<String, String> newValues = createOntologyInfo.getMetadataValues();
    assert ( newValues != null ) ;
   
    DataCreationInfo dataCreationInfo = createOntologyInfo.getDataCreationInfo();
    assert ( dataCreationInfo instanceof OtherDataCreationInfo ) ;
    final OtherDataCreationInfo otherDataCreationInfo = (OtherDataCreationInfo) dataCreationInfo;
    final TempOntologyInfo tempOntologyInfo = otherDataCreationInfo.getTempOntologyInfo();

   
    // to check if this is going to be a new submission (if ontologyId == null) or, otherwise, a new version.
    final String ontologyId = createOntologyInfo.getPriorOntologyInfo().getOntologyId();
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.