Package org.apache.stanbol.ontologymanager.ontonet.api.collector

Examples of org.apache.stanbol.ontologymanager.ontonet.api.collector.UnmodifiableOntologyCollectorException


        listeners.remove(listener);
    }

    @Override
    public synchronized void setCustomSpace(OntologySpace customSpace) throws UnmodifiableOntologyCollectorException {
        if (this.customSpace != null && this.customSpace.isLocked()) throw new UnmodifiableOntologyCollectorException(
                getCustomSpace());
        else if (!(customSpace instanceof CustomOntologySpace)) throw new ClassCastException(
                "supplied object is not a CustomOntologySpace instance.");
        else {
            this.customSpace = (CustomOntologySpace) customSpace;
View Full Code Here


        listeners.add(listener);
    }

    @Override
    public synchronized String addOntology(OntologyInputSource<?,?> ontologySource) throws UnmodifiableOntologyCollectorException {
        if (locked) throw new UnmodifiableOntologyCollectorException(this);
        log.debug("Trying to add ontology {} to space {}",
            ontologySource != null ? ontologySource.getRootOntology() : "<NULL>", getNamespace() + getID());
        OWLOntology o = null;
        if (ontologySource != null && ontologySource.hasRootOntology()) {
            Object r = ontologySource.getRootOntology();
View Full Code Here

        listeners.remove(listener);
    }

    @Override
    public synchronized void removeOntology(IRI ontologyId) throws OntologyCollectorModificationException {
        if (locked) throw new UnmodifiableOntologyCollectorException(this);

        // OWLOntology o = null;
        //
        // if (src != null && src.hasRootOntology()) {
        // Object r = src.getRootOntology();
View Full Code Here

    @Override
    public synchronized String addOntology(OntologyInputSource<?,?> ontologySource) throws UnmodifiableOntologyCollectorException {

        long before = System.currentTimeMillis();

        if (locked) throw new UnmodifiableOntologyCollectorException(this);

        log.debug("Adding ontology {} to space {}", ontologySource != null ? ontologySource : "<NULL>",
            getNamespace() + getID());
        if (ontologySource == null || !ontologySource.hasRootOntology()) // No ontology to add
        throw new IllegalArgumentException(
View Full Code Here

        listeners.remove(listener);
    }

    @Override
    public void removeOntology(IRI ontologyId) throws OntologyCollectorModificationException {
        if (locked) throw new UnmodifiableOntologyCollectorException(this);
        try {
            managedOntologies.remove(ontologyId);
            fireOntologyRemoved(ontologyId);
        } catch (RuntimeException ex) {
            throw new OntologyCollectorModificationException(this, ex);
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.ontonet.api.collector.UnmodifiableOntologyCollectorException

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.