Author: alexdma
Date: Sat Jul 23 15:02:41 2011
New Revision: 1150118
URL: http://svn.apache.org/viewvc?rev=1150118&view=rev
Log:
STANBOL-285 :
- Readded metalevel ontology to guarantee offline mode for both deply and test.
- Removed phantom packages on ontonet.
Added:
incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/
incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/
incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/meta.owl
Removed:
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/registry/
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/registry/
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/xd/
Modified:
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java
incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java
Modified:
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java?rev=1150118&r1=1150117&r2=1150118&view=diff
==============================================================================
---
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java
(original)
+++
incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java
Sat Jul 23 15:02:41 2011
@@ -261,8 +261,6 @@ public class ONManagerImpl implements ON
// Parse configuration
if (config.getID() == null || config.getID().isEmpty()) {
log.warn("The Ontology Network Manager configuration does not
define a ID for the Ontology Network Manager");
- } else {
- log.info("id: {}", config.getID());
}
// Bind components, starting with the local directories.
@@ -326,7 +324,7 @@ public class ONManagerImpl implements ON
}
if (oConfSrc == null) {
- log.warn("[NONFATAL] No ONM configuration file found at path "
+ configPath
+ log.warn("No ONM configuration file found at path " +
configPath
+ ". Starting with blank scope set.");
} else {
try {
@@ -395,12 +393,12 @@ public class ONManagerImpl implements ON
scopeIRI);
// "Be a man. Use printf"
- log.debug("KReS :: Scope " + scopeIRI);
+ log.debug("Scope " + scopeIRI);
for (String s : cores) {
- log.debug("\tKReS :: Core ontology " + s);
+ log.debug("\tCore ontology " + s);
}
for (String s : customs) {
- log.debug("\tKReS :: Custom ontology " + s);
+ log.debug("\tCustom ontology " + s);
}
// Create the scope
@@ -441,7 +439,7 @@ public class ONManagerImpl implements ON
try {
IRI scopeId = IRI.create(scopeID.trim());
scopeRegistry.setScopeActive(scopeId, true);
- log.info("KReS :: Ontology scope " + scopeID + "
activated.");
+ log.info("Ontology scope " + scopeID + " activated.");
} catch (NoSuchScopeException ex) {
log.warn("Tried to activate unavailable scope " + scopeID
+ ".");
} catch (Exception ex) {
@@ -451,8 +449,7 @@ public class ONManagerImpl implements ON
}
} catch (Throwable e) {
- log.error("[NONFATAL] Invalid ONM configuration file found. " +
"Starting with blank scope set.",
- e);
+ log.warn("Invalid ONM configuration file found. " + "Starting with
blank scope set.", e);
}
}
Added:
incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/meta.owl
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/meta.owl?rev=1150118&view=auto
==============================================================================
---
incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/meta.owl
(added)
+++
incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/meta.owl
Sat Jul 23 15:02:41 2011
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+
+<!DOCTYPE rdf:RDF [
+ <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+ <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+ <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
+ <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+ <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+ <!ENTITY meta "http://www.ontologydesignpatterns.org/schemas/meta.owl#" >
+ <!ENTITY partof "http://www.ontologydesignpatterns.org/cp/owl/partof.owl#"
>
+ <!ENTITY coddata
"http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#" >
+ <!ENTITY codkernel
"http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/schemas/meta.owl#"
+ xml:base="http://www.ontologydesignpatterns.org/schemas/meta.owl"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+
xmlns:codkernel="http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#"
+ xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
+ xmlns:partof="http://www.ontologydesignpatterns.org/cp/owl/partof.owl#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+
xmlns:coddata="http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#"
+ xmlns:meta="http://www.ontologydesignpatterns.org/schemas/meta.owl#">
+ <owl:Ontology rdf:about="">
+ <rdfs:label rdf:datatype="&xsd;string"
+ >Meta-level schema to represent ontology registries</rdfs:label>
+ <rdfs:comment>This simple vocabulary that can be used to represent
ontology registries. It is conceptually related with the C-ODO ontology by
means of inclusion of C-ODO modules.</rdfs:comment>
+ <rdfs:comment>Should import:
http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl</rdfs:comment>
+ <rdfs:comment>Should import:
http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl</rdfs:comment>
+ <owl:versionInfo rdf:datatype="&xsd;string">0.3.1</owl:versionInfo>
+ <owl:versionInfo rdf:datatype="&xsd;string">This is a modified version
of the original meta.owl ontology for inclusion in projects under the Apache
License 2.0. Import statements have been removed to avoid forcing the inclusion
of C-ODO Light ontologies until their license is cleared.</owl:versionInfo>
+ <owl:versionInfo xml:lang="en">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.
+ </owl:versionInfo>
+ <owl:versionInfo xml:lang="en">Created by Enrico Daga</owl:versionInfo>
+ </owl:Ontology>
+
+
+
+ <!--
+
///////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Object Properties
+ //
+
///////////////////////////////////////////////////////////////////////////////////////
+ -->
+
+
+
+
+ <!-- http://www.ontologydesignpatterns.org/cp/owl/partof.owl#hasPart -->
+
+ <owl:ObjectProperty rdf:about="&partof;hasPart"/>
+
+
+
+ <!-- http://www.ontologydesignpatterns.org/cp/owl/partof.owl#isPartOf -->
+
+ <owl:ObjectProperty rdf:about="&partof;isPartOf"/>
+
+
+
+ <!-- http://www.ontologydesignpatterns.org/schemas/meta.owl#hasOntology -->
+
+ <owl:ObjectProperty rdf:about="#hasOntology">
+ <rdf:type rdf:resource="&owl;TransitiveProperty"/>
+ <rdfs:subPropertyOf rdf:resource="&partof;hasPart"/>
+ <rdfs:domain rdf:resource="&coddata;OntologyLibrary"/>
+ <rdfs:range rdf:resource="&codkernel;Ontology"/>
+ <owl:inverseOf rdf:resource="#isOntologyOf"/>
+ </owl:ObjectProperty>
+
+
+
+ <!-- http://www.ontologydesignpatterns.org/schemas/meta.owl#isOntologyOf
-->
+
+ <owl:ObjectProperty rdf:about="#isOntologyOf">
+ <rdf:type rdf:resource="&owl;TransitiveProperty"/>
+ <rdfs:subPropertyOf rdf:resource="&partof;isPartOf"/>
+ <rdfs:range rdf:resource="&coddata;OntologyLibrary"/>
+ <rdfs:domain rdf:resource="&codkernel;Ontology"/>
+ </owl:ObjectProperty>
+
+
+
+ <!--
+
///////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Classes
+ //
+
///////////////////////////////////////////////////////////////////////////////////////
+ -->
+
+
+
+
+ <!--
http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#OntologyLibrary -->
+
+ <owl:Class rdf:about="&coddata;OntologyLibrary"/>
+
+
+
+ <!--
http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#Ontology -->
+
+ <owl:Class rdf:about="&codkernel;Ontology"/>
+</rdf:RDF>
+
+
Modified:
incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java?rev=1150118&r1=1150117&r2=1150118&view=diff
==============================================================================
---
incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java
(original)
+++
incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java
Sat Jul 23 15:02:41 2011
@@ -16,8 +16,7 @@
*/
package org.apache.stanbol.rules.refactor;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.io.File;
import java.io.InputStream;
@@ -55,7 +54,6 @@ import org.semanticweb.owlapi.model.OWLI
import org.semanticweb.owlapi.model.OWLLiteral;
import org.semanticweb.owlapi.model.OWLObjectProperty;
import org.semanticweb.owlapi.model.OWLOntology;
-import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyIRIMapper;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.model.OWLOntologyStorageException;