OWLSFactory.java revision 2
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch// The MIT License
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen//
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// Copyright (c) 2004 Evren Sirin
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen//
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen// Permission is hereby granted, free of charge, to any person obtaining a copy
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// of this software and associated documentation files (the "Software"), to
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// deal in the Software without restriction, including without limitation the
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// sell copies of the Software, and to permit persons to whom the Software is
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// furnished to do so, subject to the following conditions:
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen//
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// The above copyright notice and this permission notice shall be included in
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// all copies or substantial portions of the Software.
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen//
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen// IN THE SOFTWARE.
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenpackage org.mindswap.owls;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport impl.owls.OWLSFactoryImpl;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport java.net.URI;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport java.util.Map;
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport org.mindswap.owl.OWLFactory;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport org.mindswap.owls.process.execution.ProcessExecutionEngine;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport org.mindswap.owls.process.execution.ThreadedProcessExecutionEngine;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenimport org.mindswap.query.ValueMap;
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen/**
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen * @author Evren Sirin
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen *
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen */
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenpublic class OWLSFactory extends OWLSListFactory {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public interface Interface {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public String getVersion();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public Map getDefaultConverters();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public ProcessExecutionEngine createExecutionEngine();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen // added by Michael Daenzer
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public ThreadedProcessExecutionEngine createThreadedExecutionEngine();
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen // end added by Michael Daenzer
85144b5f0bc763de14c7d87291a90ef74ac241a2Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public OWLSVersionTranslator createVersionTranslator();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public OWLSVersionTranslator createVersionTranslator(String version);
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen private static OWLSFactory.Interface factory = new OWLSFactoryImpl();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
9404a7b90dcb80d31bd37ee2493f03751acdb1bdTimo Sirainen public static String getVersion() {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen return factory.getVersion();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public static ProcessExecutionEngine createExecutionEngine() {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen return factory.createExecutionEngine();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen // added by Michael Daenzer
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen /**
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen * Returns an instance of the <code>ThreadedProcessExecutionEngine</code> to perform multiple
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Bosch * process executions multithreaded.
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen */
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public static ThreadedProcessExecutionEngine createThreadedExecutionEngine() {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen return factory.createThreadedExecutionEngine();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen // end added by Michael Daenzer
9404a7b90dcb80d31bd37ee2493f03751acdb1bdTimo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen /**
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen * @return
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen */
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public static OWLSVersionTranslator createVersionTranslator() {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen return factory.createVersionTranslator();
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen /**
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen * @param version
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen * @return
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen */
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public static OWLSVersionTranslator createVersionTranslator(String version) {
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen return factory.createVersionTranslator(version);
37a3ae182d3598807c066143a63a93ea7a0ab59dTimo Sirainen }
37a3ae182d3598807c066143a63a93ea7a0ab59dTimo Sirainen
37a3ae182d3598807c066143a63a93ea7a0ab59dTimo Sirainen /**
37a3ae182d3598807c066143a63a93ea7a0ab59dTimo Sirainen * @deprecated Use OWLFactory.createKB() instead
37a3ae182d3598807c066143a63a93ea7a0ab59dTimo Sirainen */
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen public static OWLSKnowledgeBase createKB() {
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen return (OWLSKnowledgeBase) OWLFactory.createKB();
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen }
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen /**
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen * @deprecated Use OWLFactory.createOntology() instead
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen */
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen public static OWLSOntology createOntology() {
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen return (OWLSOntology) OWLFactory.createOntology();
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen }
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen /**
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen * @deprecated Use OWLFactory.createOntology(URI) instead
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen */
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen public static OWLSOntology createOntology(URI uri) {
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen return (OWLSOntology) OWLFactory.createOntology(uri);
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen public static Map getDefaultConverters() {
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen return factory.getDefaultConverters();
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen }
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen /**
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen * @deprecated Use new ValueMap() to create a ValueMap
b6612c334604eeb27e1ca2bd804ac66dcbc2eaadTimo Sirainen */
b6612c334604eeb27e1ca2bd804ac66dcbc2eaadTimo Sirainen public static ValueMap createValueMap() {
b6612c334604eeb27e1ca2bd804ac66dcbc2eaadTimo Sirainen return new ValueMap();
b6612c334604eeb27e1ca2bd804ac66dcbc2eaadTimo Sirainen }
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen}
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen