You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by al...@apache.org on 2012/10/05 17:42:38 UTC
svn commit: r1394600 [2/5] - in /stanbol/trunk/ontologymanager/generic:
core/ core/src/ core/src/license/ core/src/main/ core/src/main/java/
core/src/main/java/org/ core/src/main/java/org/apache/
core/src/main/java/org/apache/stanbol/ core/src/main/jav...
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/io/SetInputSource.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/io/SetInputSource.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/io/SetInputSource.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/io/SetInputSource.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.io;
+
+@Deprecated
+public interface SetInputSource<O> extends
+ org.apache.stanbol.ontologymanager.servicesapi.io.SetInputSource<O> {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OWLExportable.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OWLExportable.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OWLExportable.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OWLExportable.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.ontology;
+
+@Deprecated
+public interface OWLExportable extends org.apache.stanbol.ontologymanager.servicesapi.ontology.OWLExportable {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OntologyProvider.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OntologyProvider.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OntologyProvider.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/ontology/OntologyProvider.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.ontology;
+
+@Deprecated
+public interface OntologyProvider<S> extends
+ org.apache.stanbol.ontologymanager.servicesapi.ontology.OntologyProvider<S> {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CoreOntologySpace.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CoreOntologySpace.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CoreOntologySpace.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CoreOntologySpace.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+@Deprecated
+public interface CoreOntologySpace extends OntologySpace {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CustomOntologySpace.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CustomOntologySpace.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CustomOntologySpace.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/CustomOntologySpace.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+@Deprecated
+public interface CustomOntologySpace extends OntologySpace {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologyScope.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologyScope.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologyScope.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologyScope.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+import org.apache.stanbol.ontologymanager.servicesapi.scope.Scope;
+
+@Deprecated
+public interface OntologyScope extends Scope {
+
+ @Override
+ CoreOntologySpace getCoreSpace();
+
+ @Override
+ CustomOntologySpace getCustomSpace();
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologySpace.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologySpace.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologySpace.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/OntologySpace.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+@Deprecated
+public interface OntologySpace extends org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListenable.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListenable.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListenable.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListenable.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+@Deprecated
+public interface ScopeEventListenable extends
+ org.apache.stanbol.ontologymanager.servicesapi.scope.ScopeEventListenable {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListener.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListener.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListener.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeEventListener.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+@Deprecated
+public interface ScopeEventListener extends
+ org.apache.stanbol.ontologymanager.servicesapi.scope.ScopeEventListener {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeRegistry.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeRegistry.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeRegistry.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/scope/ScopeRegistry.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.scope;
+
+@Deprecated
+public interface ScopeRegistry extends org.apache.stanbol.ontologymanager.servicesapi.scope.ScopeRegistry {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/Session.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/Session.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/Session.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/Session.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.session;
+
+import org.apache.stanbol.ontologymanager.obsolete.api.collector.Lockable;
+import org.apache.stanbol.ontologymanager.obsolete.api.collector.OntologyCollector;
+import org.apache.stanbol.ontologymanager.obsolete.api.ontology.OWLExportable;
+
+@Deprecated
+public interface Session extends org.apache.stanbol.ontologymanager.servicesapi.session.Session,
+ OntologyCollector, OWLExportable, Lockable, SessionListenable {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListenable.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListenable.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListenable.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListenable.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.session;
+
+@Deprecated
+public interface SessionListenable extends
+ org.apache.stanbol.ontologymanager.servicesapi.session.SessionListenable {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListener.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListener.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListener.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionListener.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.session;
+
+@Deprecated
+public interface SessionListener extends
+ org.apache.stanbol.ontologymanager.servicesapi.session.SessionListener {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionManager.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionManager.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionManager.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/obsolete/api/session/SessionManager.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.obsolete.api.session;
+
+@Deprecated
+public interface SessionManager extends org.apache.stanbol.ontologymanager.servicesapi.session.SessionManager {
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/NamedArtifact.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/NamedArtifact.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/NamedArtifact.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/NamedArtifact.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi;
+
+import org.semanticweb.owlapi.model.IRI;
+
+/**
+ * Denotes any API artifact that has an identifier. Both the identifier and the concatenation of the namespace
+ * with the identifier should be unique in the system. Having both a non-null namespace and ID is optional,
+ * but at least one of them should be non-null.
+ *
+ * @author alexdma
+ *
+ */
+public interface NamedArtifact {
+
+ /**
+ * Returns the namespace that should prefix the ID of this resource and all the resources managed thereby.
+ * This is also used by ontology collectors to dynamically generate import statements.
+ *
+ * @return the default namespace for this resources.
+ */
+ IRI getDefaultNamespace();
+
+ /**
+ * Returns a string (assumed to be unique in the system) that identifies this resource. For instance, a
+ * parent IRI of the base IRIs for the ontologies within an ontology space. Naming schemes are
+ * implementation-dependent.<br>
+ * <br>
+ * Note that in general a named resource is not aware of its uniqueness. It is not even implied that
+ * objects of different types cannot have the same ID. These aspects should be ensured by registries,
+ * indexers etc.<br>
+ * <br>
+ * XXX check if a type other than String (e.g. URI, IRI, UriRef) should be used.
+ *
+ * @return an identifier for this resource.
+ */
+ String getID();
+
+ /**
+ * @deprecated use {@link #getDefaultNamespace()} instead.
+ * @return
+ */
+ IRI getNamespace();
+
+ /**
+ * Sets the namespace that should prefix the ID of this resource and all the resources managed thereby.
+ * This is also used by ontology collectors to dynamically generate import statements.
+ *
+ * @param namespace
+ * the new default namespace for this resources.
+ */
+ void setDefaultNamespace(IRI namespace);
+
+ /**
+ * @deprecated use {@link #setDefaultNamespace(IRI)} instead.
+ * @param namespace
+ */
+ void setNamespace(IRI namespace);
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OfflineConfiguration.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OfflineConfiguration.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OfflineConfiguration.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OfflineConfiguration.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi;
+
+import java.util.List;
+
+import org.apache.stanbol.ontologymanager.servicesapi.scope.ScopeManager;
+import org.semanticweb.owlapi.model.IRI;
+
+/**
+ * Provides the configuration needed for the {@link ScopeManager}. A configuration should only be handled
+ * internally by the {@link ScopeManager} implementation.
+ *
+ * @author alexdma
+ *
+ */
+public interface OfflineConfiguration {
+
+ /**
+ * The key used to configure the base namespace of the ontology network.
+ */
+ String DEFAULT_NS = "org.apache.stanbol.ontologymanager.ontonet.ns";
+
+ /**
+ * The key used to configure the paths of local ontologies.
+ */
+ String ONTOLOGY_PATHS = "org.apache.stanbol.ontologymanager.ontonet.ontologypaths";
+
+ /**
+ * Returns the namespace that will be used as the prefix for all named artifacts when exported to RDF/OWL,
+ * unless overridden manually (e.g. by calling the RESTful API on another base IRI).
+ *
+ * @return the default ontology network namespace
+ */
+ IRI getDefaultOntologyNetworkNamespace();
+
+ /**
+ * Returns the paths of all the directories where the ontology network manager will try to locate
+ * ontologies. These directories will be prioritaire if the engine is set to run in offline mode. This
+ * list is ordered in that the higher-ordered directories generally override lower-ordered ones, that is,
+ * any ontologies found in the directories belonging to the tail of this list will supersede any
+ * ontologies with the same ID found in the directories belonging to its head.
+ *
+ * @return an ordered list of directory paths for offline ontologies.
+ */
+ List<IRI> getOntologySourceLocations();
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OntologyNetworkConfiguration.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OntologyNetworkConfiguration.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OntologyNetworkConfiguration.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/OntologyNetworkConfiguration.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.semanticweb.owlapi.model.OWLOntologyID;
+
+/**
+ * Contains ownership and collector information on all ontology networks currently configured.
+ *
+ * @author alexdma
+ *
+ */
+@Deprecated
+public class OntologyNetworkConfiguration {
+
+ private Map<String,Collection<String>> scopesForSessions;
+ private Map<String,Collection<OWLOntologyID>> coreOntologiesForScopes, customOntologiesForScopes,
+ ontologiesForSessions;
+
+ public OntologyNetworkConfiguration(Map<String,Collection<OWLOntologyID>> coreOntologiesForScopes,
+ Map<String,Collection<OWLOntologyID>> customOntologiesForScopes,
+ Map<String,Collection<OWLOntologyID>> ontologiesForSessions,
+ Map<String,Collection<String>> scopesForSessions) {
+ this.coreOntologiesForScopes = coreOntologiesForScopes;
+ this.customOntologiesForScopes = customOntologiesForScopes;
+ this.ontologiesForSessions = ontologiesForSessions;
+ this.scopesForSessions = scopesForSessions;
+ }
+
+ public Collection<String> getAttachedScopes(String sessionId) {
+ return scopesForSessions.get(sessionId);
+ }
+
+ public Collection<OWLOntologyID> getCoreOntologyKeysForScope(String scopeId) {
+ return coreOntologiesForScopes.get(scopeId);
+ }
+
+ public Collection<OWLOntologyID> getCustomOntologyKeysForScope(String scopeId) {
+ return customOntologiesForScopes.get(scopeId);
+ }
+
+ public Collection<OWLOntologyID> getOntologyKeysForSession(String sessionId) {
+ return ontologiesForSessions.get(sessionId);
+ }
+
+ public Collection<String> getScopeIDs() {
+ return coreOntologiesForScopes.keySet();
+ }
+
+ public Collection<String> getSessionIDs() {
+ return ontologiesForSessions.keySet();
+ }
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/Vocabulary.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/Vocabulary.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/Vocabulary.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/Vocabulary.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,440 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi;
+
+import org.apache.clerezza.rdf.core.UriRef;
+import org.semanticweb.owlapi.apibinding.OWLManager;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLClass;
+import org.semanticweb.owlapi.model.OWLDataFactory;
+import org.semanticweb.owlapi.model.OWLDataProperty;
+import org.semanticweb.owlapi.model.OWLIndividual;
+import org.semanticweb.owlapi.model.OWLObjectProperty;
+
+/**
+ * An internal representation of the vocabulary that Stanbol uses internally for representing stored
+ * ontologies and virtual ontology networks, and restoring them on startup. This vocabulary is not intended to
+ * be used for ontologies exposed to the public.
+ *
+ * TODO create the objects through reflection after parsing the corresponding OWL schema.
+ *
+ * @author alexdma
+ *
+ */
+public class Vocabulary {
+
+ private static OWLDataFactory __df = OWLManager.getOWLDataFactory();
+
+ /**
+ * The default namespace for the Stanbol OntoNet metadata vocabulary
+ */
+ public static final String _NS_ONTONET = "http://stanbol.apache.org/ontology/meta/ontonet#";
+
+ /**
+ * This namespace is used for representing Stanbol resources internally. It should applied to all portable
+ * resources that might be moved from one host to another, e.g. scopes and sessions.<br/>
+ * <br>
+ * This namespace MUST NOT be used for identifying resources in the outside world, e.g. RESTful services:
+ * it MUST be converted to the public namespace before exporting.
+ */
+ public static final String _NS_STANBOL_INTERNAL = "http://stanbol.apache.org/ontology/.internal/";
+
+ private static final String _SHORT_APPENDED_TO = "isAppendedTo";
+
+ private static final String _SHORT_DEPENDS_ON = "dependsOn";
+
+ private static final String _SHORT_ENTRY = "Entry";
+
+ private static final String _SHORT_GRAPH = "Graph";
+
+ private static final String _SHORT_HAS_APPENDED = "hasAppended";
+
+ private static final String _SHORT_HAS_DEPENDENT = "hasDependenct";
+
+ private static final String _SHORT_HAS_ONTOLOGY_IRI = "hasOntologyIRI";
+
+ private static final String _SHORT_HAS_SPACE_CORE = "hasCoreSpace";
+
+ private static final String _SHORT_HAS_SPACE_CUSTOM = "hasCustomSpace";
+
+ private static final String _SHORT_HAS_STATUS = "hasStatus";
+
+ private static final String _SHORT_HAS_VERSION_IRI = "hasVersionIRI";
+
+ private static final String _SHORT_IS_MANAGED_BY = "isManagedBy";
+
+ private static final String _SHORT_IS_MANAGED_BY_CORE = "isManagedByCore";
+
+ private static final String _SHORT_IS_MANAGED_BY_CUSTOM = "isManagedByCustom";
+
+ private static final String _SHORT_IS_SPACE_CORE_OF = "isCoreSpaceOf";
+
+ private static final String _SHORT_IS_SPACE_CUSTOM_OF = "isCustomSpaceOf";
+
+ private static final String _SHORT_MANAGES = "manages";
+
+ private static final String _SHORT_MANAGES_IN_CORE = "managesInCore";
+
+ private static final String _SHORT_MANAGES_IN_CUSTOM = "managesInCustom";
+
+ private static final String _SHORT_MAPS_TO_GRAPH = "mapsToGraph";
+
+ private static final String _SHORT_PRIMARY_ENTRY = "PrimaryEntry";
+
+ private static final String _SHORT_RETRIEVED_FROM = "retrievedFrom";
+
+ private static final String _SHORT_SCOPE = "Scope";
+
+ private static final String _SHORT_SESSION = "Session";
+
+ private static final String _SHORT_SIZE_IN_AXIOMS = "hasSizeInAxioms";
+
+ private static final String _SHORT_SIZE_IN_TRIPLES = "hasSizeInTriples";
+
+ private static final String _SHORT_SPACE = "Space";
+
+ private static final String _SHORT_STATUS = "Status";
+
+ private static final String _SHORT_STATUS_ACTIVE = _SHORT_STATUS + ".ACTIVE";
+
+ private static final String _SHORT_STATUS_INACTIVE = _SHORT_STATUS + ".INACTIVE";
+
+ /**
+ * The OWL <b>object property</b> <tt>isAppendedTo</tt>.
+ */
+ public static final OWLObjectProperty APPENDED_TO = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_APPENDED_TO));
+
+ /**
+ * The OWL <b>object property</b> <tt>isAppendedTo</tt> (in UriRef form).
+ */
+ public static final UriRef APPENDED_TO_URIREF = new UriRef(_NS_ONTONET + _SHORT_APPENDED_TO);
+
+ /**
+ * The OWL <b>object property</b> <tt>dependsOn</tt>.
+ */
+ public static final OWLObjectProperty DEPENDS_ON = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_DEPENDS_ON));
+
+ /**
+ * The OWL <b>object property</b> <tt>dependsOn</tt> (in UriRef form).
+ */
+ public static final UriRef DEPENDS_ON_URIREF = new UriRef(_NS_ONTONET + _SHORT_DEPENDS_ON);
+
+ /**
+ * The OWL <b>class</b> <tt>Entry</tt>.
+ */
+ public static final OWLClass ENTRY = __df.getOWLClass(IRI.create(_NS_ONTONET + _SHORT_ENTRY));
+
+ /**
+ * The OWL <b>class</b> <tt>Entry</tt> (in UriRef form).
+ */
+ public static final UriRef ENTRY_URIREF = new UriRef(_NS_ONTONET + _SHORT_ENTRY);
+
+ /**
+ * The OWL <b>class</b> <tt>Graph</tt>.
+ */
+ public static final OWLClass GRAPH = __df.getOWLClass(IRI.create(_NS_ONTONET + _SHORT_GRAPH));
+
+ /**
+ * The OWL <b>class</b> <tt>Graph</tt> (in UriRef form).
+ */
+ public static final UriRef GRAPH_URIREF = new UriRef(_NS_ONTONET + _SHORT_GRAPH);
+
+ /**
+ * The OWL <b>object property</b> <tt>hasAppended</tt>.
+ */
+ public static final OWLObjectProperty HAS_APPENDED = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_APPENDED));
+
+ /**
+ * The OWL <b>object property</b> <tt>hasAppended</tt> (in UriRef form).
+ */
+ public static final UriRef HAS_APPENDED_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_APPENDED);
+
+ /**
+ * The OWL <b>object property</b> <tt>hasDependent</tt>.
+ */
+ public static final OWLObjectProperty HAS_DEPENDENT = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_DEPENDENT));
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasDependent</tt> (in UriRef form).
+ */
+ public static final UriRef HAS_DEPENDENT_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_DEPENDENT);
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasOntologyIRI</tt>.
+ */
+ public static final OWLDataProperty HAS_ONTOLOGY_IRI = __df.getOWLDataProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_ONTOLOGY_IRI));
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasOntologyIRI</tt> (in UriRef form).
+ */
+ public static final UriRef HAS_ONTOLOGY_IRI_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_ONTOLOGY_IRI);
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedBy</tt>.
+ */
+ public static final OWLObjectProperty HAS_SPACE_CORE = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_SPACE_CORE));
+
+ /**
+ * The OWL <b>object property</b> <tt>hasCoreSpace</tt> (in UriRef form).
+ */
+ public static final UriRef HAS_SPACE_CORE_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_SPACE_CORE);
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedBy</tt>.
+ */
+ public static final OWLObjectProperty HAS_SPACE_CUSTOM = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_SPACE_CUSTOM));
+
+ /**
+ * The OWL <b>object property</b> <tt>hasCustomSpace</tt> (in UriRef form).
+ */
+ public static final UriRef HAS_SPACE_CUSTOM_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_SPACE_CUSTOM);
+
+ /**
+ * The OWL <b>object property</b> <tt>hasStatus</tt> (in UriRef form).
+ */
+ public static final OWLObjectProperty HAS_STATUS = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_STATUS));
+
+ /**
+ * The OWL <b>object property</b> <tt>hasStatus</tt>.
+ */
+ public static final UriRef HAS_STATUS_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_STATUS);
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasVersionIRI</tt>.
+ */
+ public static final OWLDataProperty HAS_VERSION_IRI = __df.getOWLDataProperty(IRI
+ .create(_NS_ONTONET + _SHORT_HAS_VERSION_IRI));
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasVersionIRI</tt> (in UriRef form).
+ */
+ public static final UriRef HAS_VERSION_IRI_URIREF = new UriRef(_NS_ONTONET + _SHORT_HAS_VERSION_IRI);
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedBy</tt>.
+ */
+ public static final OWLObjectProperty IS_MANAGED_BY = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_IS_MANAGED_BY));
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedByCore</tt>.
+ */
+ public static final OWLObjectProperty IS_MANAGED_BY_CORE = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_IS_MANAGED_BY_CORE));
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedByCore</tt> (in UriRef form).
+ */
+ public static final UriRef IS_MANAGED_BY_CORE_URIREF = new UriRef(_NS_ONTONET + _SHORT_IS_MANAGED_BY_CORE);
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedByCustom</tt>.
+ */
+ public static final OWLObjectProperty IS_MANAGED_BY_CUSTOM = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_IS_MANAGED_BY_CUSTOM));
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedByCustom</tt> (in UriRef form).
+ */
+ public static final UriRef IS_MANAGED_BY_CUSTOM_URIREF = new UriRef(_NS_ONTONET
+ + _SHORT_IS_MANAGED_BY_CUSTOM);
+
+ /**
+ * The OWL <b>object property</b> <tt>isManagedBy</tt> (in UriRef form).
+ */
+ public static final UriRef IS_MANAGED_BY_URIREF = new UriRef(_NS_ONTONET + _SHORT_IS_MANAGED_BY);
+
+ /**
+ * The OWL <b>object property</b> <tt>isCoreSpaceOf</tt>.
+ */
+ public static final OWLObjectProperty IS_SPACE_CORE_OF = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_IS_SPACE_CORE_OF));
+
+ /**
+ * The OWL <b>object property</b> <tt>isCoreSpaceOf</tt> (in UriRef form).
+ */
+ public static final UriRef IS_SPACE_CORE_OF_URIREF = new UriRef(_NS_ONTONET + _SHORT_IS_SPACE_CORE_OF);
+
+ /**
+ * The OWL <b>object property</b> <tt>isCustomSpaceOf</tt>.
+ */
+ public static final OWLObjectProperty IS_SPACE_CUSTOM_OF = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_IS_SPACE_CUSTOM_OF));
+
+ /**
+ * The OWL <b>object property</b> <tt>isCustomSpaceOf</tt> (in UriRef form).
+ */
+ public static final UriRef IS_SPACE_CUSTOM_OF_URIREF = new UriRef(_NS_ONTONET + _SHORT_IS_SPACE_CUSTOM_OF);
+
+ /**
+ * The OWL <b>object property</b> <tt>manages</tt>.
+ */
+ public static final OWLObjectProperty MANAGES = __df.getOWLObjectProperty(IRI.create(_NS_ONTONET
+ + _SHORT_MANAGES));
+
+ /**
+ * The OWL <b>object property</b> <tt>managesInCore</tt>.
+ */
+ public static final OWLObjectProperty MANAGES_IN_CORE = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_MANAGES_IN_CORE));
+
+ /**
+ * The OWL <b>object property</b> <tt>managesInCore</tt> (in UriRef form).
+ */
+ public static final UriRef MANAGES_IN_CORE_URIREF = new UriRef(_NS_ONTONET + _SHORT_MANAGES_IN_CORE);
+ /**
+ * The OWL <b>object property</b> <tt>managesInCustom</tt>.
+ */
+ public static final OWLObjectProperty MANAGES_IN_CUSTOM = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_MANAGES_IN_CUSTOM));
+
+ /**
+ * The OWL <b>object property</b> <tt>managesInCustom</tt> (in UriRef form).
+ */
+ public static final UriRef MANAGES_IN_CUSTOM_URIREF = new UriRef(_NS_ONTONET + _SHORT_MANAGES_IN_CUSTOM);
+
+ /**
+ * The OWL <b>object property</b> <tt>manages</tt> (in UriRef form).
+ */
+ public static final UriRef MANAGES_URIREF = new UriRef(_NS_ONTONET + _SHORT_MANAGES);
+
+ /**
+ * The OWL <b>object property</b> <tt>mapsToGraph</tt>.
+ */
+ public static final OWLObjectProperty MAPS_TO_GRAPH = __df.getOWLObjectProperty(IRI
+ .create(_NS_ONTONET + _SHORT_MAPS_TO_GRAPH));
+
+ /**
+ * The OWL <b>object property</b> <tt>mapsToGraph</tt> (in UriRef form).
+ */
+ public static final UriRef MAPS_TO_GRAPH_URIREF = new UriRef(_NS_ONTONET + _SHORT_MAPS_TO_GRAPH);
+
+ /**
+ * The OWL <b>class</b> <tt>PrimaryEntry</tt>.
+ */
+ public static final OWLClass PRIMARY_ENTRY = __df.getOWLClass(IRI.create(_NS_ONTONET
+ + _SHORT_PRIMARY_ENTRY));
+
+ /**
+ * The OWL <b>class</b> <tt>PrimaryEntry</tt> (in UriRef form).
+ */
+ public static final UriRef PRIMARY_ENTRY_URIREF = new UriRef(_NS_ONTONET + _SHORT_PRIMARY_ENTRY);
+
+ /**
+ * The OWL <b>datatype property</b> <tt>retrievedFrom</tt>.
+ */
+ public static final OWLDataProperty RETRIEVED_FROM = __df.getOWLDataProperty(IRI
+ .create(_NS_ONTONET + _SHORT_RETRIEVED_FROM));
+
+ /**
+ * The OWL <b>datatype property</b> <tt>retrievedFrom</tt> (in UriRef form).
+ */
+ public static final UriRef RETRIEVED_FROM_URIREF = new UriRef(_NS_ONTONET + _SHORT_RETRIEVED_FROM);
+
+ /**
+ * The OWL <b>class</b> <tt>Scope</tt>.
+ */
+ public static final OWLClass SCOPE = __df.getOWLClass(IRI.create(_NS_ONTONET + _SHORT_SCOPE));
+
+ /**
+ * The OWL <b>class</b> <tt>Scope</tt> (in UriRef form).
+ */
+ public static final UriRef SCOPE_URIREF = new UriRef(_NS_ONTONET + _SHORT_SCOPE);
+
+ /**
+ * The OWL <b>class</b> <tt>Session</tt>.
+ */
+ public static final OWLClass SESSION = __df.getOWLClass(IRI.create(_NS_ONTONET + _SHORT_SESSION));
+
+ /**
+ * The OWL <b>class</b> <tt>Session</tt> (in UriRef form).
+ */
+ public static final UriRef SESSION_URIREF = new UriRef(_NS_ONTONET + _SHORT_SESSION);
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasSizeInAxioms</tt>.
+ */
+ public static final OWLDataProperty SIZE_IN_AXIOMS = __df.getOWLDataProperty(IRI
+ .create(_NS_ONTONET + _SHORT_SIZE_IN_AXIOMS));
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasSizeInAxioms</tt> (in UriRef form).
+ */
+ public static final UriRef SIZE_IN_AXIOMS_URIREF = new UriRef(_NS_ONTONET + _SHORT_SIZE_IN_AXIOMS);
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasSizeInTriples</tt>.
+ */
+ public static final OWLDataProperty SIZE_IN_TRIPLES = __df.getOWLDataProperty(IRI
+ .create(_NS_ONTONET + _SHORT_SIZE_IN_TRIPLES));
+
+ /**
+ * The OWL <b>datatype property</b> <tt>hasSizeInTriples</tt> (in UriRef form).
+ */
+ public static final UriRef SIZE_IN_TRIPLES_URIREF = new UriRef(_NS_ONTONET + _SHORT_SIZE_IN_TRIPLES);
+
+ /**
+ * The OWL <b>class</b> <tt>Space</tt>.
+ */
+ public static final OWLClass SPACE = __df.getOWLClass(IRI.create(_NS_ONTONET + _SHORT_SPACE));
+
+ /**
+ * The OWL <b>class</b> <tt>Space</tt> (in UriRef form).
+ */
+ public static final UriRef SPACE_URIREF = new UriRef(_NS_ONTONET + _SHORT_SPACE);
+
+ /**
+ * The OWL <b>class</b> <tt>Status</tt>.
+ */
+ public static final OWLClass STATUS = __df.getOWLClass(IRI.create(_NS_ONTONET + _SHORT_STATUS));
+
+ /**
+ * The OWL <b>individual</b> <tt>Status.ACTIVE</tt>.
+ */
+ public static final OWLIndividual STATUS_ACTIVE = __df.getOWLNamedIndividual(IRI
+ .create(_NS_ONTONET + _SHORT_STATUS_ACTIVE));
+
+ /**
+ * The OWL <b>individual</b> <tt>Status.ACTIVE</tt> (in UriRef form).
+ */
+ public static final UriRef STATUS_ACTIVE_URIREF = new UriRef(_NS_ONTONET + _SHORT_STATUS_ACTIVE);
+
+ /**
+ * The OWL <b>individual</b> <tt>Status.INACTIVE</tt>.
+ */
+ public static final OWLIndividual STATUS_INACTIVE = __df.getOWLNamedIndividual(IRI
+ .create(_NS_ONTONET + _SHORT_STATUS_INACTIVE));
+
+ /**
+ * The OWL <b>individual</b> <tt>Status.INACTIVE</tt> (in UriRef form).
+ */
+ public static final UriRef STATUS_INACTIVE_URIREF = new UriRef(_NS_ONTONET + _SHORT_STATUS_INACTIVE);
+
+ /**
+ * The OWL <b>class</b> <tt>Status</tt> (in UriRef form).
+ */
+ public static final UriRef STATUS_URIREF = new UriRef(_NS_ONTONET + _SHORT_STATUS);
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/DuplicateIDException.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/DuplicateIDException.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/DuplicateIDException.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/DuplicateIDException.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+/**
+ * Indicates an attempt to illegally create a resource by assigning it an IRI that already identifies another
+ * known resource. This exception typically results in the new resource not being created at all.<br>
+ * <br>
+ * This exception can be subclassed for managing specific resource type-based behaviour (e.g. scopes, spaces
+ * or sessions).
+ *
+ * @author alexdma
+ *
+ */
+public class DuplicateIDException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 802959772682427494L;
+
+ /**
+ * The duplicate identifier
+ */
+ protected String dupe;
+
+ /**
+ * Returns the IRI that identifies the existing resource. This can be use to obtain the resource itself by
+ * passing it onto appropriate managers.
+ *
+ * @return the duplicate identifier
+ */
+ public String getDuplicateID() {
+ return dupe;
+ }
+
+ /**
+ * Creates a new instance of DuplicateIDException.
+ *
+ * @param dupe
+ * the duplicate ID.
+ */
+ public DuplicateIDException(String dupe) {
+ this.dupe = dupe;
+ }
+
+ /**
+ * Creates a new instance of DuplicateIDException.
+ *
+ * @param dupe
+ * the duplicate ID.
+ * @param message
+ * the detail message.
+ */
+ public DuplicateIDException(String dupe, String message) {
+ super(message);
+ this.dupe = dupe;
+ }
+
+ /**
+ * Creates a new instance of DuplicateIDException.
+ *
+ * @param dupe
+ * the duplicate ID.
+ * @param cause
+ * the throwable that caused this exception to be thrown.
+ */
+ public DuplicateIDException(String dupe, Throwable cause) {
+ this(dupe);
+ initCause(cause);
+ }
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/ImportManagementPolicy.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/ImportManagementPolicy.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/ImportManagementPolicy.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/ImportManagementPolicy.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+/**
+ * The policies that determine how OntoNet should handle OWL import statements and/or the imported ontologies
+ * (i.e. import targets) when performing operations such as load/export of ontologies, and rewriting of import
+ * statements.
+ *
+ * @author alexdma
+ *
+ */
+public enum ImportManagementPolicy {
+
+ /**
+ * The root ontology contains all the import statements that point to (recursively) imported ontologies,
+ * which instead are cleared of all import statements. Can be used to minimize the number of statements
+ * and remove cycles.
+ */
+ FLATTEN,
+
+ /**
+ * Remove all import statements from the root ontology's import closure, and recursively copy all the
+ * axioms from imported ontologies into the root one.
+ */
+ MERGE,
+
+ /**
+ * Keep the import structure as it is. Note that the import targets can still be rewritten even by
+ * following this policy.
+ */
+ PRESERVE;
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/IrremovableOntologyException.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/IrremovableOntologyException.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/IrremovableOntologyException.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/IrremovableOntologyException.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+import org.semanticweb.owlapi.model.IRI;
+
+/**
+ * Thrown whenever an illegal attempt at removing an ontology from an ontology space is detected. This can
+ * happen e.g. if the ontology is the space root or not a direct child thereof.
+ *
+ * @author alexdma
+ *
+ */
+public class IrremovableOntologyException extends OntologyCollectorModificationException {
+
+ protected IRI ontologyId;
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3301398666369788964L;
+
+ /**
+ * Constructs a new instance of <code>IrremovableOntologyException</code>.
+ *
+ * @param space
+ * the space that holds the ontology.
+ * @param ontologyId
+ * the logical IRI of the ontology whose removal was denied.
+ */
+ public IrremovableOntologyException(OntologyCollector collector, IRI ontologyId) {
+ super(collector);
+ this.ontologyId = ontologyId;
+ }
+
+ /**
+ * Returns the unique identifier of the ontology whose removal was denied.
+ *
+ * @return the ID of the ontology that was not removed.
+ */
+ public IRI getOntologyId() {
+ return ontologyId;
+ }
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/Lockable.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/Lockable.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/Lockable.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/Lockable.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+/**
+ * An object that supports locking mechanisms, thus allowing/preventing modifications of the resources
+ * contained therein. Lock management is assumed to occur in methods inherited from implementations.<br>
+ *
+ * XXX add public lock handling methods as well?
+ *
+ * @author alexdma
+ *
+ */
+public interface Lockable {
+
+ /**
+ * Determines if it is no longer possible to modify this resource until it is torn down.
+ *
+ * @return true if this resource is write-locked, false otherwise.
+ */
+ boolean isLocked();
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/MissingOntologyException.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/MissingOntologyException.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/MissingOntologyException.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/MissingOntologyException.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+import org.semanticweb.owlapi.model.OWLOntologyID;
+
+/**
+ * Thrown whenever an attempt to modify an ontology within an ontology collector that does not contain it is
+ * detected.
+ *
+ * @author alexdma
+ *
+ */
+public class MissingOntologyException extends OntologyCollectorModificationException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3449667155191079302L;
+
+ protected OWLOntologyID publicKey;
+
+ /**
+ *
+ * @param collector
+ * @param ontologyId
+ */
+ public MissingOntologyException(OntologyCollector collector, OWLOntologyID publicKey) {
+ super(collector);
+ this.publicKey = publicKey;
+ }
+
+ /**
+ * Returns the unique identifier of the ontology whose removal was denied.
+ *
+ * @return the ID of the ontology that was not removed.
+ */
+ public OWLOntologyID getOntologyKey() {
+ return publicKey;
+ }
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollector.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollector.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollector.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollector.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,280 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+import java.util.Set;
+
+import org.apache.stanbol.ontologymanager.servicesapi.NamedArtifact;
+import org.apache.stanbol.ontologymanager.servicesapi.io.OntologyInputSource;
+import org.apache.stanbol.ontologymanager.servicesapi.io.OntologyInputSourceHandler;
+import org.apache.stanbol.ontologymanager.servicesapi.ontology.OntologyProvider;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntologyID;
+
+/**
+ * It is not literally an ontology <i>collection</i>, in that it only collects references to ontologies, not
+ * the ontologies themselves. Unless implementations specify a different behaviour, removing ontologies from
+ * the collector does not delete them from their persistence system.
+ *
+ * @author alexdma
+ *
+ */
+public interface OntologyCollector extends OntologyCollectorListenable, NamedArtifact,
+ OntologyInputSourceHandler {
+
+ /**
+ * Adds the given ontology to the ontology collector. If the supplied ontology is not already present in
+ * storage and does not have an OWL version IRI of its own, this ontology collector will 'claim ownership'
+ * of the ontology by setting its own logical ID as the version IRI of the new ontology.
+ *
+ * @param ontology
+ * the ontology to be added
+ * @return the key that can be used for accessing the stored ontology directly
+ */
+ OWLOntologyID addOntology(OntologyInputSource<?> ontology);
+
+ /**
+ * Returns the ontologies managed by this ontology space. This is a shortcut method for iterating
+ * {@link #getOntology(OWLOntologyID, Class)} calls over {@link #listManagedOntologies()}.
+ *
+ * @deprecated Please simulate this method manually by iterating
+ * {@link #getOntology(OWLOntologyID, Class)} calls over {@link #listManagedOntologies()}
+ *
+ * @param withClosure
+ * if true, also the ontologies imported by those directly managed by this space will be
+ * included.
+ * @return the set of ontologies in the ontology space
+ */
+ <O> Set<O> getManagedOntologies(Class<O> returnType, boolean withClosure);
+
+ /**
+ * @deprecated Please use {@link #getOntology(OWLOntologyID, Class)} instead.
+ * @param ontologyIri
+ * @param returnType
+ * @return
+ */
+ <O> O getOntology(IRI ontologyIri, Class<O> returnType);
+
+ /**
+ * TODO replace merge parameter with integer for merge level (-1 for infinite).
+ *
+ * @deprecated Please use {@link #getOntology(OWLOntologyID, Class, boolean)} instead.
+ * @param ontologyIri
+ * @param returnType
+ * @param merge
+ * @return
+ */
+ <O> O getOntology(IRI ontologyIri, Class<O> returnType, boolean merge);
+
+ /**
+ * @deprecated Please use {@link #getOntology(OWLOntologyID, Class, boolean, IRI)} instead.
+ * @param ontologyIri
+ * @param returnType
+ * @param merge
+ * @param universalPrefix
+ * @return
+ */
+ <O> O getOntology(IRI ontologyIri, Class<O> returnType, boolean merge, IRI universalPrefix);
+
+ /**
+ * @deprecated Please use {@link #getOntology(OWLOntologyID, Class, IRI)} instead.
+ * @param ontologyIri
+ * @param returnType
+ * @param universalPrefix
+ * @return
+ */
+ <O> O getOntology(IRI ontologyIri, Class<O> returnType, IRI universalPrefix);
+
+ /**
+ * Returns the managed ontology with the specified public key as a Java object of the specified type, if
+ * supported. If such an ontology exists but is not managed by this collector, it will not be returned.<br>
+ * <br>
+ * How the method should react if <code>publicKey</code> is invalid or no such ontology exists, or whether
+ * the desired return type is not supported, is implementation-dependent. However, developers should at
+ * least expect that the methods either returns <code>null</code> or throws a
+ * {@link MissingOntologyException} if no such ontology is managed by this collector. Likewise, if
+ * <code>returnType</code> is not supported, an {@link UnsupportedOperationException} could be expected to
+ * be thrown.
+ *
+ * @param publicKey
+ * the public identifier of the requested ontology.
+ * @param returnType
+ * the desired type of the ontology object.
+ * @return the ontology object.
+ */
+ <O> O getOntology(OWLOntologyID publicKey, Class<O> returnType);
+
+ /**
+ * Returns the managed ontology with the specified public key as a Java object of the specified type, if
+ * supported. If such an ontology exists but is not managed by this collector, it will not be returned.<br>
+ * <br>
+ * How the method should react if <code>publicKey</code> is invalid or no such ontology exists, or whether
+ * the desired return type is not supported, is implementation-dependent. However, developers should at
+ * least expect that the methods either returns <code>null</code> or throws a
+ * {@link MissingOntologyException} if no such ontology is managed by this collector. Likewise, if
+ * <code>returnType</code> is not supported, an {@link UnsupportedOperationException} could be expected to
+ * be thrown.<br>
+ * <br>
+ * TODO replace merge parameter with integer for merge level (-1 for infinite).
+ *
+ * @param publicKey
+ * the public identifier of the requested ontology.
+ * @param returnType
+ * the desired type of the ontology object.
+ * @param merge
+ * if true, the requested ontology will be merged with its imports up to whatever supported
+ * level.
+ * @return the ontology object.
+ */
+ <O> O getOntology(OWLOntologyID publicKey, Class<O> returnType, boolean merge);
+
+ /**
+ * Returns the managed ontology with the specified public key as a Java object of the specified type, if
+ * supported. If such an ontology exists but is not managed by this collector, it will not be returned.<br>
+ * <br>
+ * How the method should react if <code>publicKey</code> is invalid or no such ontology exists, or whether
+ * the desired return type is not supported, is implementation-dependent. However, developers should at
+ * least expect that the methods either returns <code>null</code> or throws a
+ * {@link MissingOntologyException} if no such ontology is managed by this collector. Likewise, if
+ * <code>returnType</code> is not supported, an {@link UnsupportedOperationException} could be expected to
+ * be thrown.<br>
+ * <br>
+ * TODO replace merge parameter with integer for merge level (-1 for infinite).
+ *
+ * @param publicKey
+ * the public identifier of the requested ontology.
+ * @param returnType
+ * the desired type of the ontology object.
+ * @param merge
+ * if true, the requested ontology will be merged with its imports up to whatever supported
+ * level.
+ * @param universalPrefix
+ * the IRI to be used as a prefix and/or namespace for all derived IRIs, e.g. OWL import
+ * statements and version IRIs.
+ * @return the ontology object.
+ */
+ <O> O getOntology(OWLOntologyID publicKey, Class<O> returnType, boolean merge, IRI universalPrefix);
+
+ /**
+ * Returns the managed ontology with the specified public key as a Java object of the specified type, if
+ * supported. If such an ontology exists but is not managed by this collector, it will not be returned.<br>
+ * <br>
+ * How the method should react if <code>publicKey</code> is invalid or no such ontology exists, or whether
+ * the desired return type is not supported, is implementation-dependent. However, developers should at
+ * least expect that the methods either returns <code>null</code> or throws a
+ * {@link MissingOntologyException} if no such ontology is managed by this collector. Likewise, if
+ * <code>returnType</code> is not supported, an {@link UnsupportedOperationException} could be expected to
+ * be thrown.<br>
+ * <br>
+ * TODO replace merge parameter with integer for merge level (-1 for infinite).
+ *
+ * @param publicKey
+ * the public identifier of the requested ontology.
+ * @param returnType
+ * the desired type of the ontology object.
+ * @param universalPrefix
+ * the IRI to be used as a prefix and/or namespace for all derived IRIs, e.g. OWL import
+ * statements and version IRIs.
+ * @return the ontology object.
+ */
+ <O> O getOntology(OWLOntologyID publicKey, Class<O> returnType, IRI universalPrefix);
+
+ /**
+ * Determines if the ontology identified by the supplied public key is being managed by this collector.<br>
+ * <br>
+ * Note that the public key will match the ontology's logical ID only if it has one. Otherwise it can be
+ * an {@link OWLOntologyID} that wraps either the physical URL or the identifier chosen by Stanbol as its
+ * ontologyIRI.
+ *
+ * @deprecated the usage of {@link IRI} to identify ontologies is reductive. Please create a new
+ * {@link OWLOntologyID#OWLOntologyID(IRI)} from this IRI and use
+ * {@link #hasOntology(OWLOntologyID)} with this new public key as a parameter.
+ *
+ * @param publicKey
+ * the <i>logical</i> identifier of the ontology to query for.
+ *
+ * @return true iff an ontology with this public key has been loaded in this collector.
+ */
+ boolean hasOntology(IRI ontologyId);
+
+ /**
+ * Determines if the ontology identified by the supplied public key is being managed by this collector.<br>
+ * <br>
+ * Note that the public key will match the ontology's logical ID only if it has one. Otherwise it can be
+ * an {@link OWLOntologyID} that wraps either the physical URL or the identifier chosen by Stanbol as its
+ * ontologyIRI.
+ *
+ * @param publicKey
+ * the <i>logical</i> identifier of the ontology to query for.
+ *
+ * @return true iff an ontology with this public key has been loaded in this collector.
+ */
+ boolean hasOntology(OWLOntologyID publicKey);
+
+ /**
+ * Gets the public key set of all the ontologies managed by this ontology collector.
+ *
+ * @return the key set of managed ontologies.
+ */
+ Set<OWLOntologyID> listManagedOntologies();
+
+ /**
+ * Removes the given ontology from the ontology collector, if it was being managed. Otherwise, it should
+ * throw a {@link MissingOntologyException}.<br/>
+ * <u>Note</u> that this will NOT necessarily delete the ontology from the store! This method simply
+ * states that the ontology is no longer managed by this collectors and its axioms will no longer appear
+ * when the collector is serialized as an ontology. To make sure the ontology itself is deleted, please
+ * use the {@link OntologyProvider}.
+ *
+ * @deprecated the usage of {@link IRI} to identify ontologies is reductive. Please create a new
+ * {@link OWLOntologyID#OWLOntologyID(IRI)} from this IRI and use
+ * {@link #removeOntology(OWLOntologyID)} with this new public key as a parameter.
+ *
+ * @param ontologyIri
+ * the identifier of this ontology.
+ */
+ void removeOntology(IRI ontologyId);
+
+ /**
+ * Removes the given ontology from the ontology collector, if it was being managed. Otherwise, it should
+ * throw a {@link MissingOntologyException}.<br/>
+ * <u>Note</u> that this will NOT necessarily delete the ontology from the store! This method simply
+ * states that the ontology is no longer managed by this collectors and its axioms will no longer appear
+ * when the collector is serialized as an ontology. To make sure the ontology itself is deleted, please
+ * use the {@link OntologyProvider}.
+ *
+ * @param ontologyIri
+ * the identifier of this ontology.
+ */
+ void removeOntology(OWLOntologyID ontologyId);
+
+ /**
+ * Bootstraps the ontology space. In some cases (such as with core and custom spaces) this also implies
+ * write-locking its ontologies.
+ *
+ * XXX make it a protected, non-interface method ?
+ */
+ void setUp();
+
+ /**
+ * Performs all required operations for disposing of an ontology space and releasing its resources (e.g.
+ * removing the writelock).
+ *
+ * XXX make it a protected, non-interface method ?
+ */
+ void tearDown();
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListenable.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListenable.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListenable.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListenable.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+import java.util.Collection;
+
+/**
+ * Informs listeners about changes in an ontology collector. Implementations of this interface should be able
+ * to fire events related to the modification of ontologies within an ontology collector.
+ *
+ * @author alexdma
+ *
+ */
+public interface OntologyCollectorListenable {
+
+ /**
+ * Registers a new {@link OntologyCollectorListener} with this object.
+ *
+ * @param listener
+ * the listener to be registered.
+ */
+ void addOntologyCollectorListener(OntologyCollectorListener listener);
+
+ /**
+ * Unregisters every {@link OntologyCollectorListener} from this object.
+ */
+ void clearOntologyCollectorListeners();
+
+ /**
+ * Returns the list of {@link OntologyCollectorListener}s registered with this object.
+ *
+ * @return the registered listeners.
+ */
+ Collection<OntologyCollectorListener> getOntologyCollectorListeners();
+
+ /**
+ * Unregisters {@link OntologyCollectorListener} from this object.
+ *
+ * @param listener
+ * the listener to be unregistered.
+ */
+ void removeOntologyCollectorListener(OntologyCollectorListener listener);
+
+}
Added: stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListener.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListener.java?rev=1394600&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListener.java (added)
+++ stanbol/trunk/ontologymanager/generic/servicesapi/src/main/java/org/apache/stanbol/ontologymanager/servicesapi/collector/OntologyCollectorListener.java Fri Oct 5 15:42:33 2012
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.ontologymanager.servicesapi.collector;
+
+import org.semanticweb.owlapi.model.OWLOntologyID;
+
+/**
+ * Objects that react to the addition or removal of ontologies to or from an ontology collector will implement
+ * this interface.<br>
+ * <br>
+ * TODO add "before" methods and provide a way to abort the corresponding operation.
+ *
+ * @author alexdma
+ *
+ */
+public interface OntologyCollectorListener {
+
+ /**
+ * Fired <i>after</i> an ontology was successfully added to an ontology collector.
+ *
+ * @param collectorId
+ * the ontology collector identifier.
+ * @param addedOntology
+ * the added ontology identifier.
+ */
+ void onOntologyAdded(OntologyCollector collector, OWLOntologyID addedOntology);
+
+ /**
+ * Fired <i>after</i> an ontology was successfully removed from an ontology collector.
+ *
+ * @param collectorId
+ * the ontology collector identifier.
+ * @param removedOntology
+ * the removed ontology identifier.
+ */
+ void onOntologyRemoved(OntologyCollector collector, OWLOntologyID removedOntology);
+
+}