Package org.mmisw.ont.mmiuri

Examples of org.mmisw.ont.mmiuri.MmiUri


                    String withUriParam = null;

                    if ( OntServiceUtil.isOntResolvableUri(ontologyUri) ) {
                        // prefer to show the unversioned URI
                        try {
                            MmiUri mmiUri = new MmiUri(ontologyUri);
                            version = mmiUri.getVersion();
                            ontologyUri = mmiUri.copyWithVersion(null).getOntologyUri();
                        }
                        catch (URISyntaxException ignore) {
                        }
                    }
                    else {
View Full Code Here


    if (USE_UNVERSIONED) {
      model = JenaUtil2.loadModel("file:" + full_path, false);

      if (OntUtil.isOntResolvableUri(ontologyUri)) {
        MmiUri mmiUri;
        try {
          mmiUri = new MmiUri(ontologyUri);
          OntModel unversionedModel = UnversionedConverter
              .getUnversionedModel(model, mmiUri);

//          serialization = JenaUtil2.getOntModelAsString(
//              unversionedModel, "RDF/XML-ABBREV");
         
          // AG$: we don;t use the serialization; but here we need to update
          // the model reference to be unversionedModel:
          model = unversionedModel;

          ontologyUri = mmiUri.copyWithVersion(null).getOntologyUri();
        }
        catch (URISyntaxException e) {
          log.error("shouldn't happen", e);
          return;
        }
View Full Code Here

    String ontologyUri = ontology.getUri();

    if (USE_UNVERSIONED) {

      if (OntUtil.isOntResolvableUri(ontologyUri)) {
        MmiUri mmiUri;
        try {
          mmiUri = new MmiUri(ontologyUri);
          ontologyUri = mmiUri.copyWithVersion(null).getOntologyUri();
        }
        catch (URISyntaxException e) {
          log.error("shouldn't happen", e);
          return;
        }
View Full Code Here

   * @return the string that can be used as a link as stated above; null if value is not a URL.
   */
  public static String getLink(String value) {
    // try mmiUri:
    try {
      MmiUri mmiUri = new MmiUri(value);
      return mmiUri.getTermUri() + ".html";
    }
    catch (URISyntaxException e1) {
      // ignore. Try URL below.
    }
   
View Full Code Here

 
 

  private static void populateList(AttrDef attrDef, String classUri) throws URISyntaxException {
   
    MmiUri classMmiUri = new MmiUri(classUri);
    String ontologUri = classMmiUri.getOntologyUri();
    String className = classMmiUri.getTerm();
   
    if ( log.isDebugEnabled() ) {
      log.debug("reading: " +classMmiUri.getTermUri()+ " individuals to populate " +className+ " list");
    }

    // read the ontology:
    OntModel ontModel = ModelFactory.createOntologyModel();
    ontModel.read(ontologUri);
   
    // add options here termporarily
    List<Option> list = new ArrayList<Option>();
   
    Resource classRes = ResourceFactory.createResource(classMmiUri.getTermUri());
   
    ExtendedIterator<Individual> iter = ontModel.listIndividuals(classRes);
    while ( iter.hasNext() ) {
      Resource idv = (Resource) iter.next();
      String idvName = idv.getLocalName();
View Full Code Here

    // get the user RDF from the Ont service:
    String rdf = OntServiceUtil.getUsersRdf();
   
    // get the users RDF URI, assumed to be versioned:
    String generatedUsersUri = _getUsersUri(rdf);
    MmiUri mmiUri = new MmiUri(generatedUsersUri);
    String version = mmiUri.getVersion();
   
    // unversioned URI for purposes of geting possible prior version, set up auqportal filename,
    // graphId, and report it in the result back to caller:
    final String unversUsersUri = mmiUri.copyWithVersion(null).getOntologyUri();
   
    // info from previous version if any:
    String ontologyId = null;
    String ontologyUserId = null;
    RegisteredOntologyInfo usersOntology = orrClient.getOntologyInfo(unversUsersUri);
View Full Code Here

    // set some associated attributes for the registration:
    Map<String, String> newValues = _getValues(loginResult, "MMI ORR Groups",  version);
    String fileName = AquaUtil.getAquaportalFilename(unversGroupsUri);
   
    // the versioned form for the registration:
    String versionedUsersUri = new MmiUri(unversGroupsUri).copyWithVersion(version).getOntologyUri();
   
    String rdf = _getGroupsRdf(versionedUsersUri, version);
    // register:
    OntologyUploader createOnt = new OntologyUploader(
        versionedUsersUri , fileName, rdf ,
View Full Code Here

TOP

Related Classes of org.mmisw.ont.mmiuri.MmiUri

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.