Package owlsmx.exceptions

Examples of owlsmx.exceptions.MatchingException


    public String unfoldTerm(OntClass clazz) throws NotUnfoldableException,MatchingException {
      try {
        return unfoldTerm(new URI(clazz.getURI()));
    } catch (ConceptNotFoundException e) {   
      e.printStackTrace();
      throw new MatchingException(e.getMessage());
    } catch (URISyntaxException e) {
      e.printStackTrace();
      throw new MatchingException(e.getMessage());
    }
    }
View Full Code Here


            getKB().getTBox().split();           
          }
        ATerm term = node2term(clazz);
        if (term==null) {
            ErrorLog.instanceOf().report("Can't find Term for class " + clazz.toString());
            throw new MatchingException("Can't find Term for class " + clazz.toString());           
        }
        String result =( (ATerm) getKB().getTBox().Tu.unfoldTerm((ATermAppl) term) ).toString();
        return result;
    }
View Full Code Here

     * @return            guessed URI of the used ontology
     * @throws MatchingException  If sth goes wrong
     */
    public URI getOntologyURI(String path) throws MatchingException  {
        if (path.startsWith("#") || (!contains(path,"#")))
            throw new MatchingException(path + " doesn't contain the OntologyURL");
        try {
            return new URI(path.substring(0,path.indexOf("#")));
        }
        catch(URISyntaxException e) { throw new MatchingException("URI error: Couldn't get ontologyURI of " + path);}
    }
View Full Code Here

            return semanticMatch(inputurilist, outputurilist);
          }
        }
        catch (Exception e){
            e.printStackTrace();
            throw new MatchingException(e.toString());
        }
    }
View Full Code Here

        idf = new double[idfs.length];
        for (int i=0;i<t1.length;i++) {           
            term1[i] =t1[i];
            term2[i] =t2[i];
            if ( (t1[i]==0) && (t2[i]==0) && (term1[i]==0) && (term2[i]==0) )
                throw new MatchingException("Two unweighted terms should never be 0 ");
            idf[i=idfs[i];
        }
    }
View Full Code Here

    }
   
    public static URI getOntologyURI(URI ClassURI) throws MatchingException {
        String path = ClassURI.toString();
        if (path.startsWith("#") || (!StringUtils.contains(path,"#")))
            throw new MatchingException(ClassURI.toString() + " doesn't contain the OntologyURL");
        try {
            return new URI(path.substring(0,path.indexOf("#")));
        }
        catch(URISyntaxException e) { throw new MatchingException("URI error: Couldn't get ontologyURI of " + ClassURI.toString());}
    }
View Full Code Here

            if (current_clazz.getURI().toString().indexOf(token)>=0) {               
                return true;
            }
        }
      } catch(Exception e) {
        throw new MatchingException(e.getMessage());
      }
        return false;
    }
View Full Code Here

            clazz = (OWLClass) iter.next();
            if (classInSet(clazz,ontology_classes))
                result.add(clazz);                  
        }      
  } catch(Exception e) {
    throw new MatchingException(e.getMessage());
  }
        return result;
    }
View Full Code Here

    public static String getLocalConcept( String localURI, String absoluteURI) throws MatchingException {
        if ( containsGlobalOntologyURI(absoluteURI) ) {
            String uri = absoluteURI;
            return localURI + uri.substring(uri.lastIndexOf("#"));
        }
        throw new MatchingException("Couldn't retrieve local URI of " + absoluteURI);
    }
View Full Code Here

          System.out.println("Printing HashSet: ");
          while ( iter.hasNext() ){
          System.out.println(((OWLClass)iter.next()).getURI().toString());
          }
        } catch (Exception e) {
          throw new MatchingException(e.getMessage());
        }         
    }   
View Full Code Here

TOP

Related Classes of owlsmx.exceptions.MatchingException

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.