Package org.mmisw.orrclient.gwt.client.rpc

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


 
  public ExternalOntologyInfo getExternalOntologyInfo(String ontologyUri) {

    log.debug("getExternalOntologyInfo: ontologyUri=" +ontologyUri);
   
    ExternalOntologyInfo oi = new ExternalOntologyInfo();
   
    oi.setUri(ontologyUri);
    oi.setDisplayLabel(ontologyUri);
   
    String error = null;
    Exception ex = null;
    try {
      // 298: Load of external ontology for mapping does not use content negotiation
      // first load the model with this new supporting routine:
      OntModel ontModel = OntInfoUtil.loadExternalModel(ontologyUri);
      OntInfoUtil.getEntities(oi, ontModel);
    }
    catch (FileNotFoundException e) {
      error = "File not found: '" +ontologyUri+ "'";
    }
    catch (UnknownHostException e) {
      error = "Unknown host: '" +ontologyUri+ "'";
    }
    catch (Exception e) {
      ex = e;
      error = e.getClass().getName() + ": " + e.getMessage();
    }
    if (log.isDebugEnabled() && ex != null) {
      log.debug("Error getting ExternalOntologyInfo: " +ontologyUri, ex);
    }
    oi.setError(error);
    return oi;
  }
View Full Code Here

TOP

Related Classes of org.mmisw.orrclient.gwt.client.rpc.ExternalOntologyInfo

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.