elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/properties/ObjectPropertyTaxonomyComputationFactory.java
private void instertIntoTaxonomy(final IndexedObjectProperty property) {

		/* 
		 * @formatter:off
		 * 
		 * Transitive reduction and taxonomy computation
		 * 	if sub-properties of a sub-property contain this property,
		 * 		they are equivalent
		 * 	if a property is a strict sub-property of another strict sub-property,
		 * 		it is not direct
		 * 
		 * @formatter:on
		 */

		final Map<IndexedObjectProperty, ElkObjectProperty> equivalent = collectEquivalent(
				property);
		if (equivalent == null) {
			// Equivalent to top.
			return;
		}
		final Map<IndexedObjectProperty, Collection<? extends ElkObjectProperty>> subEquivalent = new ArrayHashMap<IndexedObjectProperty, Collection<? extends ElkObjectProperty>>();
		final Set<IndexedObjectProperty> indirect = new ArrayHashSet<IndexedObjectProperty>();
		for (final IndexedObjectProperty subProperty : property.getSaturated()
				.getSubProperties()) {

			if (equivalent.containsKey(subProperty)) {
				// subProperty is not strict
				continue;
			}
			// subProperty is strict

			final Map<IndexedObjectProperty, ElkObjectProperty> subEq = collectEquivalent(
					subProperty);
			// should not be null, because top cannot be a strict sub-property
			subEquivalent.put(subProperty, subEq.values());
			for (final IndexedObjectProperty subSubProperty : subProperty
					.getSaturated().getSubProperties()) {
				if (!subEq.containsKey(subSubProperty)) {
					// strict
					indirect.add(subSubProperty);
				}
			}

		}

		/*
		 * If property is not equivalent to bottom and there are no strict sub
		 * properties, add the bottom as a default sub property.
		 */
		if (subEquivalent.isEmpty() && (indexedBottomProperty_ == null
				|| !equivalent.containsKey(indexedBottomProperty_))) {
			outputProcessor_
					.visit(new TransitiveReductionOutputEquivalentDirectImpl<ElkObjectProperty>(
							equivalent.values(), defaultDirectSubproperties_));
			return;
		}
		// else

		final Collection<Collection<? extends ElkObjectProperty>> direct = Operations
				.map(subEquivalent.entrySet(),
						new Operations.Transformation<Map.Entry<IndexedObjectProperty, Collection<? extends ElkObjectProperty>>, Collection<? extends ElkObjectProperty>>() {

							@Override
							public Collection<? extends ElkObjectProperty> transform(
									final Entry<IndexedObjectProperty, Collection<? extends ElkObjectProperty>> element) {
								if (indirect.contains(element.getKey())) {
									return null;
								} else {
									return element.getValue();
								}
							}

						});

		outputProcessor_
				.visit(new TransitiveReductionOutputEquivalentDirectImpl<ElkObjectProperty>(
						equivalent.values(), direct));

	}
private void instertIntoTaxonomy(final IndexedObjectProperty property) {

		/* 
		 * @formatter:off
		 * 
		 * Transitive reduction and taxonomy computation
		 * 	if sub-properties of a sub-property contain this property,
		 * 		they are equivalent
		 * 	if a property is a strict sub-property of another strict sub-property,
		 * 		it is not direct
		 * 
		 * @formatter:on
		 */

		final Map<IndexedObjectProperty, ElkObjectProperty> equivalent = collectEquivalent(
				property);
		if (equivalent == null) {
			// Equivalent to top.
			return;
		}
		final Map<IndexedObjectProperty, Collection<? extends ElkObjectProperty>> subEquivalent = new ArrayHashMap<IndexedObjectProperty, Collection<? extends ElkObjectProperty>>();
		final Set<IndexedObjectProperty> indirect = new ArrayHashSet<IndexedObjectProperty>();
		for (final IndexedObjectProperty subProperty : property.getSaturated()
				.getSubProperties()) {

			if (equivalent.containsKey(subProperty)) {
				// subProperty is not strict
				continue;
			}
			// subProperty is strict

			final Map<IndexedObjectProperty, ElkObjectProperty> subEq = collectEquivalent(
					subProperty);
			// should not be null, because top cannot be a strict sub-property
			subEquivalent.put(subProperty, subEq.values());
			for (final IndexedObjectProperty subSubProperty : subProperty
					.getSaturated().getSubProperties()) {
				if (!subEq.containsKey(subSubProperty)) {
					// strict
					indirect.add(subSubProperty);
				}
			}

		}

		/*
		 * If property is not equivalent to bottom and there are no strict sub
		 * properties, add the bottom as a default sub property.
		 */
		if (subEquivalent.isEmpty() && (indexedBottomProperty_ == null
				|| !equivalent.containsKey(indexedBottomProperty_))) {
			outputProcessor_
					.visit(new TransitiveReductionOutputEquivalentDirectImpl<ElkObjectProperty>(
							equivalent.values(), defaultDirectSubproperties_));
			return;
		}
		// else

		final Collection<Collection<? extends ElkObjectProperty>> direct = Operations
				.map(subEquivalent.entrySet(),
						new Operations.Transformation<Map.Entry<IndexedObjectProperty, Collection<? extends ElkObjectProperty>>, Collection<? extends ElkObjectProperty>>() {

							@Override
							public Collection<? extends ElkObjectProperty> transform(
									final Entry<IndexedObjectProperty, Collection<? extends ElkObjectProperty>> element) {
								if (indirect.contains(element.getKey())) {
									return null;
								} else {
									return element.getValue();
								}
							}

						});

		outputProcessor_
				.visit(new TransitiveReductionOutputEquivalentDirectImpl<ElkObjectProperty>(
						equivalent.values(), direct));

	}
Adds the specified object property into the taxonomy if it is not in it
yet and sets its direct sub-properties if not set yet.

@param property
The property that should be inserted into taxonomy.