Skip to content

Commit

Permalink
Initial Commit of Existing Code From Google Code
Browse files Browse the repository at this point in the history
This commit adds the code that was previously hosted on Google Code.
This is v 0.9.
  • Loading branch information
ssherrin committed May 15, 2013
1 parent 2d0d256 commit 12266a7
Show file tree
Hide file tree
Showing 217 changed files with 20,772 additions and 0 deletions.
81 changes: 81 additions & 0 deletions Classes/Animal.h
@@ -0,0 +1,81 @@
//
// Animal.h
// Field Guide 2010
//
// Created by VC N on 1/08/10.
/*
Copyright (c) 2011 Museum Victoria
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//

#import <CoreData/CoreData.h>

@class Audio;
@class CommonName;
@class Genus;
@class Image;
@class StatusTypes;
@class TaxonGroup;

@interface Animal : NSManagedObject
{
}

@property (nonatomic, retain) NSString * distribution;
@property (nonatomic, retain) NSString * animalName;
@property (nonatomic, retain) NSString * biology;
@property (nonatomic, retain) NSString * species;
@property (nonatomic, retain) NSString * identifyingCharacteristics;
@property (nonatomic, retain) NSString * size;
@property (nonatomic, retain) NSString * distinctive;
@property (nonatomic, retain) NSString * habitat;
@property (nonatomic, retain) NSNumber * nocturnal;
@property (nonatomic, retain) NSString * diet;
@property (nonatomic, retain) NSString * bite;
@property (nonatomic, retain) NSString * thumbnail;
@property (nonatomic, retain) NSString * nativestatus;
@property (nonatomic, retain) NSString * foodplant;
@property (nonatomic, retain) NSString * mapImage;
@property (nonatomic, retain) NSString * subTaxon;
@property (nonatomic, retain) NSString * catalogID;
@property (nonatomic, retain) NSString * lcs;
@property (nonatomic, retain) NSString * ncs;
@property (nonatomic, retain) NSString * wcs;
@property (nonatomic, retain) NSSet* commonNames;
@property (nonatomic, retain) NSSet* audios;
@property (nonatomic, retain) NSSet* images;
@property (nonatomic, retain) TaxonGroup * taxon;
@property (nonatomic, retain) NSString * order;
@property (nonatomic, retain) NSString * animalClass;
@property (nonatomic, retain) NSString * family;
@property (nonatomic, retain) NSString * phylum;
@property (nonatomic, retain) NSString * genusName;

@end


@interface Animal (CoreDataGeneratedAccessors)

- (void)addCommonNamesObject:(CommonName *)value;
- (void)removeCommonNamesObject:(CommonName *)value;
- (void)addCommonNames:(NSSet *)value;
- (void)removeCommonNames:(NSSet *)value;

- (void)addAudiosObject:(Audio *)value;
- (void)removeAudiosObject:(Audio *)value;
- (void)addAudios:(NSSet *)value;
- (void)removeAudios:(NSSet *)value;

- (void)addImagesObject:(Image *)value;
- (void)removeImagesObject:(Image *)value;
- (void)addImages:(NSSet *)value;
- (void)removeImages:(NSSet *)value;


- (NSString *) scientificName;
- (NSArray * ) sortedImages;
@end

80 changes: 80 additions & 0 deletions Classes/Animal.m
@@ -0,0 +1,80 @@
//
// Animal.m
// Field Guide 2010
//
// Created by VC N on 1/08/10.
/*
Copyright (c) 2011 Museum Victoria
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//

#import "Animal.h"

#import "Audio.h"
#import "CommonName.h"
#import "Image.h"
#import "StatusTypes.h"
#import "TaxonGroup.h"

@implementation Animal

@dynamic distribution;
@dynamic animalName;
@dynamic biology;
@dynamic species;
@dynamic identifyingCharacteristics;
@dynamic size;
@dynamic distinctive;
@dynamic habitat;
@dynamic nocturnal;
@dynamic diet;
@dynamic bite;
@dynamic commonNames;
@dynamic audios;
@dynamic images;
@dynamic taxon;
@dynamic thumbnail;
@dynamic nativestatus;
@dynamic foodplant;
@dynamic mapImage;
@dynamic subTaxon;
@dynamic catalogID;
@dynamic lcs;
@dynamic ncs;
@dynamic wcs;
@dynamic order;
@dynamic animalClass;
@dynamic family;
@dynamic phylum;
@dynamic genusName;

- (NSString *) scientificName {

if (self.species != nil) {
return [NSString stringWithFormat:@"%@ %@",self.genusName, self.species];
} else if (self.genusName != nil) {
return [NSString stringWithFormat:@"%@ sp", self.genusName];
} else {
return @" ";
}


}

-(NSArray *) sortedImages {
NSLog(@"Sorted images");
NSMutableArray *myImages = [NSMutableArray arrayWithCapacity:1];
[myImages addObjectsFromArray:[[self images] allObjects]]; //Get random array
if ([myImages count] > 1){
NSLog(@"Call to sort using selector");
NSSortDescriptor* desc = [[NSSortDescriptor alloc] initWithKey:@"order" ascending:YES];
[myImages sortUsingDescriptors:[NSArray arrayWithObject:desc]];
[desc release];
}
return [NSArray arrayWithArray:myImages];
}

@end
33 changes: 33 additions & 0 deletions Classes/AnimalAtoZViewController.h
@@ -0,0 +1,33 @@
//
// AnimalAtoZViewController.h
// Field Guide 2010
//
// Created by Simon Sherrin on 17/02/11.
/*
Copyright (c) 2011 Museum Victoria
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//

#import <UIKit/UIKit.h>

@class AnimalDetailiPad;


@interface AnimalAtoZViewController : UITableViewController {
NSArray *animalArray;
AnimalDetailiPad *rightViewReference;
NSMutableArray *sectionsArray;
UILocalizedIndexedCollation *collation;
}

@property (retain) NSArray *animalArray;
@property (nonatomic, retain) AnimalDetailiPad *rightViewReference;
@property (nonatomic, retain) NSMutableArray *sectionsArray;
@property (nonatomic,retain) UILocalizedIndexedCollation *collation;

-(void) configureSections;

@end

0 comments on commit 12266a7

Please sign in to comment.