All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.semanticweb.elk.matching.ConclusionMatchHierarchyImpl Maven / Gradle / Ivy

There is a newer version: 0.36.0
Show newest version
package org.semanticweb.elk.matching;

/*
 * #%L
 * ELK Proofs Package
 * $Id:$
 * $HeadURL:$
 * %%
 * Copyright (C) 2011 - 2016 Department of Computer Science, University of Oxford
 * %%
 * Licensed 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.
 * #L%
 */

import org.semanticweb.elk.matching.conclusions.BackwardLinkMatch1;
import org.semanticweb.elk.matching.conclusions.BackwardLinkMatch2;
import org.semanticweb.elk.matching.conclusions.BackwardLinkMatch3;
import org.semanticweb.elk.matching.conclusions.BackwardLinkMatch4;
import org.semanticweb.elk.matching.conclusions.ClassInconsistencyMatch1;
import org.semanticweb.elk.matching.conclusions.ClassInconsistencyMatch2;
import org.semanticweb.elk.matching.conclusions.ConclusionMatch;
import org.semanticweb.elk.matching.conclusions.ConclusionMatchHierarchy;
import org.semanticweb.elk.matching.conclusions.DisjointSubsumerMatch1;
import org.semanticweb.elk.matching.conclusions.DisjointSubsumerMatch2;
import org.semanticweb.elk.matching.conclusions.ForwardLinkMatch1;
import org.semanticweb.elk.matching.conclusions.ForwardLinkMatch2;
import org.semanticweb.elk.matching.conclusions.ForwardLinkMatch3;
import org.semanticweb.elk.matching.conclusions.ForwardLinkMatch4;
import org.semanticweb.elk.matching.conclusions.IndexedDisjointClassesAxiomMatch1;
import org.semanticweb.elk.matching.conclusions.IndexedDisjointClassesAxiomMatch2;
import org.semanticweb.elk.matching.conclusions.IndexedEquivalentClassesAxiomMatch1;
import org.semanticweb.elk.matching.conclusions.IndexedEquivalentClassesAxiomMatch2;
import org.semanticweb.elk.matching.conclusions.IndexedObjectPropertyRangeAxiomMatch1;
import org.semanticweb.elk.matching.conclusions.IndexedObjectPropertyRangeAxiomMatch2;
import org.semanticweb.elk.matching.conclusions.IndexedSubClassOfAxiomMatch1;
import org.semanticweb.elk.matching.conclusions.IndexedSubClassOfAxiomMatch2;
import org.semanticweb.elk.matching.conclusions.IndexedSubObjectPropertyOfAxiomMatch1;
import org.semanticweb.elk.matching.conclusions.IndexedSubObjectPropertyOfAxiomMatch2;
import org.semanticweb.elk.matching.conclusions.PropagationMatch1;
import org.semanticweb.elk.matching.conclusions.PropagationMatch2;
import org.semanticweb.elk.matching.conclusions.PropertyRangeMatch1;
import org.semanticweb.elk.matching.conclusions.PropertyRangeMatch2;
import org.semanticweb.elk.matching.conclusions.SubClassInclusionComposedMatch1;
import org.semanticweb.elk.matching.conclusions.SubClassInclusionComposedMatch2;
import org.semanticweb.elk.matching.conclusions.SubClassInclusionDecomposedMatch1;
import org.semanticweb.elk.matching.conclusions.SubClassInclusionDecomposedMatch2;
import org.semanticweb.elk.matching.conclusions.SubPropertyChainMatch1;
import org.semanticweb.elk.matching.conclusions.SubPropertyChainMatch2;
import org.semanticweb.elk.util.collections.HashListMultimap;

public class ConclusionMatchHierarchyImpl
		implements ConclusionMatchHierarchy, ConclusionMatch.Visitor {

	private final class ChildMap>
			extends HashListMultimap {

		boolean add(T child) {
			return add(child.getParent(), child);
		}

	}

	private final ChildMap backwardLinkMatch2Map_ = new ChildMap();

	private final ChildMap backwardLinkMatch3Map_ = new ChildMap();

	private final ChildMap backwardLinkMatch4Map_ = new ChildMap();

	private final ChildMap classInconsistencyMatch2Map_ = new ChildMap();

	private final ChildMap disjointSubsumerMatch2Map_ = new ChildMap();

	private final ChildMap forwardLinkMatch2Map_ = new ChildMap();

	private final ChildMap forwardLinkMatch3Map_ = new ChildMap();

	private final ChildMap forwardLinkMatch4Map_ = new ChildMap();

	private final ChildMap indexedDefinitionAxiomMatch2Map_ = new ChildMap();

	private final ChildMap indexedDisjointClassesAxiomMatch2Map_ = new ChildMap();

	private final ChildMap indexedObjectPropertyRangeAxiomMatch2Map_ = new ChildMap();

	private final ChildMap indexedSubClassOfAxiomMatch2Map_ = new ChildMap();

	private final ChildMap indexedSubObjectPropertyOfAxiomMatch2Map_ = new ChildMap();

	private final ChildMap propagationMatch2Map_ = new ChildMap();

	private final ChildMap propertyRangeMatch2Map_ = new ChildMap();

	private final ChildMap subClassInclusionComposedMatch2Map_ = new ChildMap();

	private final ChildMap subClassInclusionDecomposedMatch2Map_ = new ChildMap();

	private final ChildMap subPropertyChainMatch2Map_ = new ChildMap();

	@Override
	public Iterable getChildren(
			BackwardLinkMatch1 parent) {
		return backwardLinkMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			BackwardLinkMatch2 parent) {
		return backwardLinkMatch3Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			BackwardLinkMatch3 parent) {
		return backwardLinkMatch4Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			ClassInconsistencyMatch1 parent) {
		return classInconsistencyMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			DisjointSubsumerMatch1 parent) {
		return disjointSubsumerMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			ForwardLinkMatch1 parent) {
		return forwardLinkMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			ForwardLinkMatch2 parent) {
		return forwardLinkMatch3Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			ForwardLinkMatch3 parent) {
		return forwardLinkMatch4Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			IndexedDisjointClassesAxiomMatch1 parent) {
		return indexedDisjointClassesAxiomMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			IndexedEquivalentClassesAxiomMatch1 parent) {
		return indexedDefinitionAxiomMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			IndexedObjectPropertyRangeAxiomMatch1 parent) {
		return indexedObjectPropertyRangeAxiomMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			IndexedSubClassOfAxiomMatch1 parent) {
		return indexedSubClassOfAxiomMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			IndexedSubObjectPropertyOfAxiomMatch1 parent) {
		return indexedSubObjectPropertyOfAxiomMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			PropagationMatch1 parent) {
		return propagationMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			PropertyRangeMatch1 parent) {
		return propertyRangeMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			SubClassInclusionComposedMatch1 parent) {
		return subClassInclusionComposedMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			SubClassInclusionDecomposedMatch1 parent) {
		return subClassInclusionDecomposedMatch2Map_.get(parent);
	}

	@Override
	public Iterable getChildren(
			SubPropertyChainMatch1 parent) {
		return subPropertyChainMatch2Map_.get(parent);
	}

	@Override
	public Boolean visit(BackwardLinkMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(BackwardLinkMatch2 conclusionMatch) {
		return backwardLinkMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(BackwardLinkMatch3 conclusionMatch) {
		return backwardLinkMatch3Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(BackwardLinkMatch4 conclusionMatch) {
		return backwardLinkMatch4Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(ClassInconsistencyMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(ClassInconsistencyMatch2 conclusionMatch) {
		return classInconsistencyMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(DisjointSubsumerMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(DisjointSubsumerMatch2 conclusionMatch) {
		return disjointSubsumerMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(ForwardLinkMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(ForwardLinkMatch2 conclusionMatch) {
		return forwardLinkMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(ForwardLinkMatch3 conclusionMatch) {
		return forwardLinkMatch3Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(ForwardLinkMatch4 conclusionMatch) {
		return forwardLinkMatch4Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(IndexedDisjointClassesAxiomMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(IndexedDisjointClassesAxiomMatch2 conclusionMatch) {
		return indexedDisjointClassesAxiomMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(IndexedEquivalentClassesAxiomMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(IndexedEquivalentClassesAxiomMatch2 conclusionMatch) {
		return indexedDefinitionAxiomMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(
			IndexedObjectPropertyRangeAxiomMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(
			IndexedObjectPropertyRangeAxiomMatch2 conclusionMatch) {
		return indexedObjectPropertyRangeAxiomMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(IndexedSubClassOfAxiomMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(IndexedSubClassOfAxiomMatch2 conclusionMatch) {
		return indexedSubClassOfAxiomMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(
			IndexedSubObjectPropertyOfAxiomMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(
			IndexedSubObjectPropertyOfAxiomMatch2 conclusionMatch) {
		return indexedSubObjectPropertyOfAxiomMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(PropagationMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(PropagationMatch2 conclusionMatch) {
		return propagationMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(PropertyRangeMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(PropertyRangeMatch2 conclusionMatch) {
		return propertyRangeMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(SubClassInclusionComposedMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(SubClassInclusionComposedMatch2 conclusionMatch) {
		return subClassInclusionComposedMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(SubClassInclusionDecomposedMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(SubClassInclusionDecomposedMatch2 conclusionMatch) {
		return subClassInclusionDecomposedMatch2Map_.add(conclusionMatch);
	}

	@Override
	public Boolean visit(SubPropertyChainMatch1 conclusionMatch) {
		return false;
	}

	@Override
	public Boolean visit(SubPropertyChainMatch2 conclusionMatch) {
		return subPropertyChainMatch2Map_.add(conclusionMatch);
	};

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy