2ronwalf// The MIT License
2ronwalf//
2ronwalf// Copyright (c) 2004 Evren Sirin
2ronwalf//
2ronwalf// Permission is hereby granted, free of charge, to any person obtaining a copy
2ronwalf// of this software and associated documentation files (the "Software"), to
2ronwalf// deal in the Software without restriction, including without limitation the
2ronwalf// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
2ronwalf// sell copies of the Software, and to permit persons to whom the Software is
2ronwalf// furnished to do so, subject to the following conditions:
2ronwalf//
2ronwalf// The above copyright notice and this permission notice shall be included in
2ronwalf// all copies or substantial portions of the Software.
2ronwalf//
2ronwalf// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2ronwalf// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2ronwalf// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2ronwalf// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2ronwalf// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2ronwalf// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2ronwalf// IN THE SOFTWARE.
2ronwalf
2ronwalfpackage org.mindswap.owls;
2ronwalf
2ronwalfimport org.mindswap.owl.OWLIndividualList;
2ronwalfimport org.mindswap.owls.grounding.AtomicGroundingList;
2ronwalfimport org.mindswap.owls.grounding.MessageMapList;
2ronwalfimport org.mindswap.owls.process.BindingList;
2ronwalfimport org.mindswap.owls.process.ConditionList;
2ronwalfimport org.mindswap.owls.process.InputBindingList;
2ronwalfimport org.mindswap.owls.process.InputList;
2ronwalfimport org.mindswap.owls.process.OutputBindingList;
2ronwalfimport org.mindswap.owls.process.OutputList;
2ronwalfimport org.mindswap.owls.process.ParameterList;
2ronwalfimport org.mindswap.owls.process.ProcessList;
2ronwalfimport org.mindswap.owls.process.ResultList;
2ronwalf
2ronwalf/**
2ronwalf * @author Evren Sirin
2ronwalf *
2ronwalf */
2ronwalfpublic class OWLSListFactory {
2ronwalf public interface Interface {
2ronwalf public AtomicGroundingList createAtomicGroundingList();
2ronwalf public AtomicGroundingList createAtomicGroundingList(OWLIndividualList properties);
2ronwalf
2ronwalf public BindingList createBindingList();
2ronwalf public BindingList createBindingList(OWLIndividualList list);
2ronwalf
2ronwalf public ConditionList createConditionList();
2ronwalf public ConditionList createConditionList(OWLIndividualList list);
2ronwalf
2ronwalf public InputBindingList createInputBindingList();
2ronwalf public InputBindingList createInputBindingList(OWLIndividualList list);
2ronwalf
2ronwalf public InputList createInputList();
2ronwalf public InputList createInputList(OWLIndividualList list);
2ronwalf
2ronwalf public MessageMapList createMessageMapList();
2ronwalf public MessageMapList createMessageMapList(OWLIndividualList list);
2ronwalf
2ronwalf public OutputBindingList createOutputBindingList();
2ronwalf public OutputBindingList createOutputBindingList(OWLIndividualList list);
2ronwalf
2ronwalf public OutputList createOutputList();
2ronwalf public OutputList createOutputList(OWLIndividualList list);
2ronwalf
2ronwalf public ParameterList createParameterList();
2ronwalf public ParameterList createParameterList(OWLIndividualList list);
2ronwalf
2ronwalf public ProcessList createProcessList();
2ronwalf public ProcessList createProcessList(OWLIndividualList list);
2ronwalf
2ronwalf public ResultList createResultList();
2ronwalf public ResultList createResultList(OWLIndividualList list);
2ronwalf
2ronwalf public OWLIndividualList wrapList(OWLIndividualList list, Class castTarget);
2ronwalf }
2ronwalf
2ronwalf private static String[] implementations = {"impl.owls.OWLSListFactoryImpl"};
2ronwalf
2ronwalf private static OWLSListFactory.Interface factory = createFactory();
2ronwalf
2ronwalf private static OWLSListFactory.Interface createFactory() {
2ronwalf for(int i = 0; (factory == null) && (i < implementations.length); i++) {
2ronwalf try {
2ronwalf Class impl = Class.forName(implementations[i]);
2ronwalf factory = (OWLSListFactory.Interface) impl.newInstance();
2ronwalf } catch(ClassNotFoundException e) {
2ronwalf } catch(InstantiationException e) {
2ronwalf } catch(IllegalAccessException e) {
2ronwalf }
2ronwalf }
2ronwalf
2ronwalf return factory;
2ronwalf }
2ronwalf
2ronwalf public static AtomicGroundingList createAtomicGroundingList() {
2ronwalf return factory.createAtomicGroundingList();
2ronwalf }
2ronwalf
2ronwalf public static AtomicGroundingList createAtomicGroundingList(OWLIndividualList list) {
2ronwalf return factory.createAtomicGroundingList(list);
2ronwalf }
2ronwalf
2ronwalf public static BindingList createBindingList() {
2ronwalf return factory.createBindingList();
2ronwalf }
2ronwalf
2ronwalf public static BindingList createBindingList(OWLIndividualList list) {
2ronwalf return factory.createBindingList(list);
2ronwalf }
2ronwalf
2ronwalf public static ConditionList createConditionList() {
2ronwalf return factory.createConditionList();
2ronwalf }
2ronwalf
2ronwalf public static ConditionList createConditionList(OWLIndividualList list) {
2ronwalf return factory.createConditionList(list);
2ronwalf }
2ronwalf
2ronwalf public static InputBindingList createInputBindingList() {
2ronwalf return factory.createInputBindingList();
2ronwalf }
2ronwalf
2ronwalf public static InputBindingList createInputBindingList(OWLIndividualList list) {
2ronwalf return factory.createInputBindingList(list);
2ronwalf }
2ronwalf
2ronwalf public static InputList createInputList() {
2ronwalf return factory.createInputList();
2ronwalf }
2ronwalf
2ronwalf public static InputList createInputList(OWLIndividualList list) {
2ronwalf return factory.createInputList(list);
2ronwalf }
2ronwalf
2ronwalf public static MessageMapList createMessageMapList() {
2ronwalf return factory.createMessageMapList();
2ronwalf }
2ronwalf
2ronwalf
2ronwalf public static MessageMapList createMessageMapList(OWLIndividualList list) {
2ronwalf return factory.createMessageMapList(list);
2ronwalf }
2ronwalf
2ronwalf public static OutputBindingList createOutputBindingList() {
2ronwalf return factory.createOutputBindingList();
2ronwalf }
2ronwalf
2ronwalf public static OutputBindingList createOutputBindingList(OWLIndividualList list) {
2ronwalf return factory.createOutputBindingList(list);
2ronwalf }
2ronwalf
2ronwalf public static OutputList createOutputList() {
2ronwalf return factory.createOutputList();
2ronwalf }
2ronwalf
2ronwalf public static OutputList createOutputList(OWLIndividualList list) {
2ronwalf return factory.createOutputList(list);
2ronwalf }
2ronwalf
2ronwalf public static ParameterList createParameterList() {
2ronwalf return factory.createParameterList();
2ronwalf }
2ronwalf
2ronwalf public static ParameterList createParameterList(OWLIndividualList list) {
2ronwalf return factory.createParameterList(list);
2ronwalf }
2ronwalf
2ronwalf public static ProcessList createProcessList() {
2ronwalf return factory.createProcessList();
2ronwalf }
2ronwalf
2ronwalf public static ProcessList createProcessList(OWLIndividualList list) {
2ronwalf return factory.createProcessList(list);
2ronwalf }
2ronwalf
2ronwalf public static ResultList createResultList() {
2ronwalf return factory.createResultList();
2ronwalf }
2ronwalf
2ronwalf public static ResultList createResultList(OWLIndividualList list) {
2ronwalf return factory.createResultList(list);
2ronwalf }
2ronwalf
2ronwalf public static OWLIndividualList wrapList(OWLIndividualList list, Class castTarget) {
2ronwalf return factory.wrapList(list, castTarget);
2ronwalf }
2ronwalf}