Examples of UnmodifiableOntologyCollectorException


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

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

        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

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

        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

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

    @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

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

        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

Examples of org.apache.stanbol.ontologymanager.servicesapi.collector.UnmodifiableOntologyCollectorException

                "Cannot set connectivity policy on scopes. Ontology scopes only allow LOOSE connectivity policy (set by default).");
    }

    @Override
    public synchronized void setCustomSpace(OntologySpace customSpace) throws UnmodifiableOntologyCollectorException {
        if (this.customSpace != null && this.customSpace.isLocked()) throw new UnmodifiableOntologyCollectorException(
                getCustomSpace());
        this.customSpace = customSpace;
        this.customSpace.addOntologyCollectorListener(this);
    }
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.collector.UnmodifiableOntologyCollectorException

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

        // Check for error conditions.
        if (locked) throw new UnmodifiableOntologyCollectorException(this);
        if (ontologySource == null) throw new IllegalArgumentException("Ontology source cannot be null.");

        log.debug("Adding ontology to collector {}", getID());
        OWLOntologyID key = null;
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.collector.UnmodifiableOntologyCollectorException

    public void removeOntology(OWLOntologyID publicKey) throws OntologyCollectorModificationException {
        if (publicKey == null) throw new IllegalArgumentException(
                "Cannot remove an ontology by providing a null public key.");
        if (publicKey.getOntologyIRI() == null) throw new IllegalArgumentException(
                "Cannot remove an ontology whose public key has a null ontology IRI.");
        if (locked) throw new UnmodifiableOntologyCollectorException(this);

        Set<OWLOntologyID> aliases = ontologyProvider.listAliases(publicKey);
        aliases.add(publicKey);
        boolean removed = false;
        for (OWLOntologyID alias : aliases)
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.