Examples of OntoSpreadModelException


Examples of org.ontospread.exceptions.OntoSpreadModelException

  public Concept restoreConcept(Node node) {
    try {
      return (Concept) unmarshaller.unmarshal(node);
    } catch (JAXBException je) {
      throw new OntoSpreadModelException(je, "ConceptXmlBind: Unmarshalling concept.");
    }
  }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

    try {
      Document doc = DocumentBuilderHelper.getEmptyDocument();
      marshaller.marshal(concept, doc);
      return doc;
    } catch (JAXBException je) {
      throw new OntoSpreadModelException(je, "ConceptXmlBind: Marshalling concept.");
    } catch (DocumentBuilderException e) {
      throw new OntoSpreadModelException(e, "ConceptXmlBind: Building document for marshall concept.");
    }       
  }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

  public OntoSpreadXMLState restoreOntoSpreadXMLState(Node node) {
    logger.debug("Restore OntoSpreadXMLState XML");
    try {
      return (OntoSpreadXMLState) unmarshaller.unmarshal(node);
    } catch (JAXBException je) {
      throw new OntoSpreadModelException(je, "OntoSpreadXMLStateXmlBind: Unmarshalling OntoSpreadXMLState.");
    }
  }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

    try {
      Document doc = DocumentBuilderHelper.getEmptyDocument();
      marshaller.marshal(OntoSpreadXMLState, doc);
      return doc;
    } catch (JAXBException je) {
      throw new OntoSpreadModelException(je, "OntoSpreadXMLState XmlBind: Marshalling OntoSpreadXMLState .");
    } catch (DocumentBuilderException e) {
      throw new OntoSpreadModelException(e, "OntoSpreadXMLState XmlBind: Building document for marshall OntoSpreadXMLState .");
    }       
  }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

            logger.debug("Loading OWL "+owlsources[i].getKnowledgeSourcePk());
            ontModel.read(is, "");  
            try {
                is.close();
            } catch (IOException e) {
                throw new OntoSpreadModelException(e, "JenaOWLModelWrapper reading " + owlsources[i].getKnowledgeSourcePk());
            }
            logger.debug("Loaded "+owlsources[i].getKnowledgeSourcePk());         
        }
        return ontModel;
    }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

            logger.debug("Loading OWL Reasoner "+owlsources[i].getKnowledgeSourcePk());
            ontModel.read(is, "");  
            try {
                is.close();
            } catch (IOException e) {
                throw new OntoSpreadModelException(e, "JenaOWLReasonerModelWrapper reading " + owlsources[i].getKnowledgeSourcePk());
            }
            logger.debug("Loaded  with reasoner "+owlsources[i].getKnowledgeSourcePk());
        }
        return ontModel;
    }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

            logger.debug("Loading RDF "+rdfsources[i].getKnowledgeSourcePk());
            model.read(is, "");       
            try {
                is.close();
            } catch (IOException e) {
                throw new OntoSpreadModelException(e, "JenaRDFModelWrapper reading " + rdfsources[i].getKnowledgeSourcePk());
            }
            logger.debug("RDF stream loaded, model contains " + model.size() + " triplets");         
        }       
        return model;
    }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

            in.close();
            return document;
        } catch (FileNotFoundException e) {
            throw new ResourceNotFoundException(e.getMessage()); // propagate
        } catch (Exception e) {
            throw new OntoSpreadModelException(e, "OntoSpread files resource loaded: parsing Resource file " + filename);
        }
    }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

                KnowledgeResourceTO resource = new KnowledgeResourceTO(
                    (this.openInputStream(file)),ontologyPK);
                ontologies.add(resource);
            }
        } catch (FileNotFoundException e) {
            throw new OntoSpreadModelException(e, "Resource Files getting resource file:  "+file);
        }
        return  ontologies.toArray(new KnowledgeResourceTO[ontologies.size()]);
    }
View Full Code Here

Examples of org.ontospread.exceptions.OntoSpreadModelException

      oos.writeObject(ontoSpreadState);
      oos.close();
      output.close();
      return iterations.add(output);
    } catch (IOException e) {
      throw new OntoSpreadModelException(e,"Writing iteration "+current);
    }
//    OntoSpreadXMLState xmlSerializer = OntoSpreadStateXMLSerializer.asXML(ontoSpreadState);
//    Document document = OntoSpreadXMLStateXMLBind.getInstance().serializeOntoSpreadXMLState(xmlSerializer);   
//    return iterations.add(DOMToString.print(document));
  }
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.