/**
 * 
 */
package com.github.podd.exception;

import org.semanticweb.owlapi.model.IRI;

/**
 * An exception indicating that the artifact denoted by the given IRI was not managed by PODD.
 * 
 * @author Kutila
 * @since 04/01/2013
 * 
 */
public class UnmanagedArtifactIRIException extends UnmanagedSchemaException
{
    private static final long serialVersionUID = 4395800605913179651L;
    
    private final IRI artifactOntologyIRI;
    
    /**
     * 
     * @param ontology
     *            The OWL Ontology IRI that was not managed.
     * @param msg
     *            The message for this exception.
     */
    public UnmanagedArtifactIRIException(final IRI artifactOntologyIRI, final String msg)
    {
        super(msg);
        this.artifactOntologyIRI = artifactOntologyIRI;
    }
    
    /**
     * @param ontology
     *            The OWL Ontology IRI that was not managed.
     * @param msg
     *            The message for this exception.
     * @param throwable
     *            The cause for this exception.
     */
    public UnmanagedArtifactIRIException(final IRI artifactOntologyIRI, final String msg, final Throwable throwable)
    {
        super(msg, throwable);
        this.artifactOntologyIRI = artifactOntologyIRI;
    }
    
    /**
     * @param ontology
     *            The OWL Ontology IRI that was not managed.
     * @param throwable
     *            The cause for this exception.
     */
    public UnmanagedArtifactIRIException(final IRI artifactOntologyIRI, final Throwable throwable)
    {
        super(throwable);
        this.artifactOntologyIRI = artifactOntologyIRI;
    }
    
    /**
     * @return The OWL Ontology IRI that was not managed.
     */
    public IRI getOntologyID()
    {
        return this.artifactOntologyIRI;
    }
    
}

@@ -56,36 +56,151 @@
 org.
-semanticweb.owlapi.model.IRI
+openrdf.model.Model;%0Aimport org.openrdf.model.Resource;%0Aimport org.semanticweb.owlapi.model.IRI;%0A%0Aimport com.github.podd.utils.PoddRdfConstants
 ;%0A%0A/
@@ -1893,20 +1893,385 @@
 gyIRI;%0A    %7D
+%0A%0A    @Override%0A    public Model getDetailsAsModel(final Resource errorResource)%0A    %7B%0A        final Model model = super.getDetailsAsModel(errorResource);%0A        %0A        if(this.getOntologyID() != null)%0A        %7B%0A            model.add(errorResource, PoddRdfConstants.ERR_SOURCE, this.getOntologyID().toOpenRDFURI());%0A        %7D%0A        %0A        return model;%0A    %7D
 %0A    %0A%7D%0A

add Artifact IRI as "source" to error Model