//
//  Created by Ivano Bilenchi on 07/02/18.
//  Copyright © 2018-2020 SisInf Lab. All rights reserved.
//

#import <Foundation/Foundation.h>

@class TMEAtomicConcept;
@class TMECardinalityRole;
@class TMEConsoleLogger;
@class TMEFileLogger;
@class TMEMemoryLogger;
@class TMENullLogger;
@class TMEUniversalRole;
@class TMESemanticDescription;
@class OWLIRI;
@protocol OWLClass;
@protocol OWLObjectProperty;

NS_ASSUME_NONNULL_BEGIN

/**
 * This class is a point to create instances of model classes
 * referenced throughout the reasoner API.
 */
@interface TMEDataFactory : NSObject

/**
 * Creates a new atomic concept that represents the specified OWL class.
 *
 * @param owlClass OWL class.
 * @return New atomic concept instance.
 */
- (TMEAtomicConcept *)atomicConceptWithOwlClass:(id<OWLClass>)owlClass;

/**
 * Creates a new atomic concept that represents the OWL class with the specified IRI.
 *
 * @param iri IRI of the OWL class.
 * @return New atomic concept instance.
 */
- (TMEAtomicConcept *)atomicConceptWithIri:(OWLIRI *)iri;

/**
 * Creates a new cardinality role.
 *
 * @param property Object property.
 * @param cardinality Cardinality.
 * @return New cardinality role instance.
 */
- (TMECardinalityRole *)cardinalityRoleWithProperty:(id<OWLObjectProperty>)property
                                        cardinality:(NSUInteger)cardinality;

/**
 * Creates a new cardinality role.
 *
 * @param iri IRI of the object property.
 * @param cardinality Cardinality.
 * @return New cardinality role instance.
 */
- (TMECardinalityRole *)cardinalityRoleWithIri:(OWLIRI *)iri
                                   cardinality:(NSUInteger)cardinality;

/**
 * Creates a new value restriction.
 *
 * @param property Object property.
 * @param filler Filler of the value restriction.
 * @return New value restriction instance.
 */
- (TMEUniversalRole *)universalRoleWithProperty:(id<OWLObjectProperty>)property
                                         filler:(TMESemanticDescription *)filler;

/**
 * Creates a new value restriction.
 *
 * @param iri IRI of the object property.
 * @param filler Filler of the value restriction.
 * @return New value restriction instance.
 */
- (TMEUniversalRole *)universalRoleWithIri:(OWLIRI *)iri
                                    filler:(TMESemanticDescription *)filler;

/**
 * Creates a new semantic description.
 *
 * @return New semantic description instance.
 */
- (TMESemanticDescription *)semanticDescription;

/**
 * Creates a new console logger.
 *
 * @return New console logger.
 */
- (TMEConsoleLogger *)consoleLogger;

/**
 * Creates a new file logger.
 *
 * @param fileURL URL of the log file.
 * @return New file logger.
 */
- (TMEFileLogger *)fileLoggerWithFileURL:(NSURL *)fileURL;

/**
 * Creates a new in-memory logger.
 *
 * @return New in-memory logger.
 */
- (TMEMemoryLogger *)memoryLogger;

/**
 * Creates a new null logger.
 *
 * @return New null logger.
 */
- (TMENullLogger *)nullLogger;

/// :nodoc:
- (instancetype)init UNAVAILABLE_ATTRIBUTE;

@end

NS_ASSUME_NONNULL_END
