doc
|
00001 /* 00002 Copyright 2001, 2012, Oracle and/or its affiliates. All rights reserved. 00003 Oracle and Java are registered trademarks of Oracle and/or its 00004 affiliates. Other names may be trademarks of their respective owners. 00005 UNIX is a registered trademark of The Open Group. 00006 00007 This software and related documentation are provided under a license 00008 agreement containing restrictions on use and disclosure and are 00009 protected by intellectual property laws. Except as expressly permitted 00010 in your license agreement or allowed by law, you may not use, copy, 00011 reproduce, translate, broadcast, modify, license, transmit, distribute, 00012 exhibit, perform, publish, or display any part, in any form, or by any 00013 means. Reverse engineering, disassembly, or decompilation of this 00014 software, unless required by law for interoperability, is prohibited. 00015 The information contained herein is subject to change without notice 00016 and is not warranted to be error-free. If you find any errors, please 00017 report them to us in writing. 00018 U.S. GOVERNMENT END USERS: Oracle programs, including any operating 00019 system, integrated software, any programs installed on the hardware, 00020 and/or documentation, delivered to U.S. Government end users are 00021 "commercial computer software" pursuant to the applicable Federal 00022 Acquisition Regulation and agency-specific supplemental regulations. 00023 As such, use, duplication, disclosure, modification, and adaptation 00024 of the programs, including any operating system, integrated software, 00025 any programs installed on the hardware, and/or documentation, shall be 00026 subject to license terms and license restrictions applicable to the 00027 programs. No other rights are granted to the U.S. Government. 00028 This software or hardware is developed for general use in a variety 00029 of information management applications. It is not developed or 00030 intended for use in any inherently dangerous applications, including 00031 applications that may create a risk of personal injury. If you use 00032 this software or hardware in dangerous applications, then you shall 00033 be responsible to take all appropriate fail-safe, backup, redundancy, 00034 and other measures to ensure its safe use. Oracle Corporation and its 00035 affiliates disclaim any liability for any damages caused by use of this 00036 software or hardware in dangerous applications. 00037 This software or hardware and documentation may provide access to or 00038 information on content, products, and services from third parties. 00039 Oracle Corporation and its affiliates are not responsible for and 00040 expressly disclaim all warranties of any kind with respect to 00041 third-party content, products, and services. Oracle Corporation and 00042 its affiliates will not be responsible for any loss, costs, or damages 00043 incurred due to your access to or use of third-party content, products, 00044 or services. 00045 */ 00046 00047 00048 #import <Foundation/Foundation.h> 00049 00058 typedef enum { 00059 EMFacetValueOrderCountDesc, 00060 EMFacetValueOrderAlphaAsc 00061 } EMFacetValueOrder; 00062 00063 #pragma mark - 00064 00065 00068 @interface EMFacetValue : NSObject<NSCopying, NSCoding> { 00069 NSString *_value; 00070 NSString *_facetValueId; 00071 NSInteger _count; 00072 NSString *_separator; 00073 BOOL _selected; 00074 } 00075 @property (nonatomic, retain) NSString *value; 00076 @property (nonatomic, retain) NSString *facetValueId; 00077 @property (nonatomic, assign) NSInteger count; 00078 00089 @property (nonatomic, retain) NSString *separator; 00090 00097 @property (nonatomic, assign) BOOL selected; 00098 00099 + (id) facetValueWithValue:(NSString *)value count:(NSInteger)count; 00100 - (id) initWithFacetValue:(NSString *)value count:(NSInteger)count; 00101 00102 @end 00103 00104 #pragma mark - 00105 00106 00109 @interface EMFacetValueSelection : NSObject<NSCopying, NSCoding> 00110 { 00111 NSString *_facetValue; 00112 NSString *_facetValueId; 00113 00114 EMFacetValue *_root; 00115 NSMutableArray *_ancestors; 00116 00117 BOOL _removable; 00118 NSString *_separator; 00119 } 00120 00121 @property (nonatomic, retain) NSString *facetName, *facetValue, *facetValueId; 00122 00123 @property (nonatomic, retain) EMFacetValue *root; 00124 00131 @property (nonatomic, assign) BOOL removable; 00132 00143 @property (nonatomic, retain) NSString *separator; 00144 00148 @property (nonatomic, retain) NSMutableArray *ancestors; 00149 00150 + (id) facetValueSelectionWithName:(NSString *)name value:(NSString *)value; 00151 + (id) facetValueSelectionWithName:(NSString *)name value:(NSString *)value removable:(BOOL)removable; 00152 - (id) initWithName:(NSString *)name value:(NSString *)value; 00153 - (id) initWithName:(NSString *)name value:(NSString *)value removable:(BOOL)removable; 00154 - (id) initWithName:(NSString *)name value:(NSString *)value removable:(BOOL)removable ancestors:(NSMutableArray *)ancestors; 00155 @end 00156 00157 #pragma mark - 00158 00159 @interface EMFacetConfiguration : NSObject<NSCopying, NSCoding> 00160 { 00161 NSString *_facetName; 00162 NSString *_facetId; 00163 EMFacetValueOrder _facetValueOrder; 00164 NSInteger _facetValueLimit; 00165 NSInteger _facetValueOffset; 00166 } 00167 00168 + (id) facetConfigurationWithName:(NSString *)facetName; 00169 + (id) facetConfigurationWithName:(NSString *)facetName limit:(NSInteger)limit; 00170 + (id) facetConfigurationWithName:(NSString *)facetName facetId:(NSString *)facetId; 00171 + (id) facetConfigurationWithName:(NSString *)facetName facetId:(NSString *)facetId limit:(NSInteger)limit; 00172 + (id) facetConfigurationWithName:(NSString *)facetName facetId:(NSString *)facetId order:(EMFacetValueOrder)order limit:(NSInteger)limit; 00173 00174 - (id) initWithFacetName:(NSString *)facetName; 00175 - (id) initWithFacetName:(NSString *)facetName limit:(NSInteger)limit; 00176 - (id) initWithFacetName:(NSString *)facetName facetId:(NSString *)facetId; 00177 - (id) initWithFacetName:(NSString *)facetName facetId:(NSString *)facetId order:(EMFacetValueOrder)order limit:(NSInteger)limit; 00178 - (id) initWithFacetName:(NSString *)facetName facetId:(NSString *)facetId order:(EMFacetValueOrder)order limit:(NSInteger)limit offset:(NSInteger)offset; 00179 00183 @property (nonatomic, retain) NSString *facetName; 00184 00188 @property (nonatomic, retain) NSString *facetId; 00189 00195 @property (nonatomic, assign) EMFacetValueOrder facetValueOrder; 00196 00206 @property (nonatomic, assign) NSInteger facetValueLimit; 00207 00214 @property (nonatomic, assign) NSInteger facetValueOffset; 00215 00216 @end 00217 00218 #pragma mark - 00219 00220 typedef enum { 00221 EMFacetResultMultiSelectNone = 0, 00222 EMFacetResultMultiSelectOr = 1, 00223 EMFacetResultMultiSelectAnd = 2 00224 } EMFacetResultMultiSelect; 00225 00226 #pragma mark - 00227 00228 00231 @interface EMFacetResult : NSObject<NSCopying, NSCoding> 00232 { 00233 NSString *_facetName; 00234 NSString *_facetId; 00235 NSMutableArray *_facetValues; 00236 NSInteger _totalFacetValues; 00237 NSMutableArray *_ancestors; 00238 BOOL _collapsed; 00239 EMFacetResultMultiSelect _multiSelect; 00240 NSInteger _numberOfSelectedFacetValues; 00241 } 00242 00246 @property (nonatomic, retain) NSString *facetName; 00247 00251 @property (nonatomic, retain) NSString *facetId; 00252 00256 @property (nonatomic, retain) NSMutableArray *facetValues; 00257 00266 @property (nonatomic, assign) NSInteger totalFacetValues; 00267 00271 @property (nonatomic, retain) NSMutableArray *ancestors; 00272 00279 @property (nonatomic, assign) BOOL collapsed; 00280 00286 @property (nonatomic, assign) EMFacetResultMultiSelect multiSelect; 00287 00297 @property (nonatomic, assign) NSInteger numberOfSelectedFacetValues; 00298 00299 - (id) initWithName:(NSString *)name; 00300 - (id) initWithName:(NSString *)name values:(NSMutableArray *)values; 00301 - (id) initWithName:(NSString *)name values:(NSMutableArray *)values total:(NSInteger)total; 00302 - (id) initWithName:(NSString *)name values:(NSMutableArray *)values total:(NSInteger)total ancestors:(NSMutableArray *)ancestors; 00303 00304 @end 00305