Skip to content

Commit

Permalink
updated internal naming from GraphObject to GraphNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dahan committed Mar 26, 2016
1 parent 117197a commit 08eb2da
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Graph.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Graph'
s.version = '1.0.9'
s.version = '1.0.10'
s.license = 'BSD'
s.summary = 'An elegant data-driven framework for CoreData in Swift.'
s.homepage = 'http://cosmicmind.io'
Expand Down
20 changes: 10 additions & 10 deletions Graph.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
961F9B801C10ED5400ACF5DD /* Graph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B531C10ED5400ACF5DD /* Graph.swift */; };
961F9B811C10ED5400ACF5DD /* Graph.h in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B541C10ED5400ACF5DD /* Graph.h */; settings = {ATTRIBUTES = (Public, ); }; };
961F9B821C10ED5400ACF5DD /* Graph.h in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B541C10ED5400ACF5DD /* Graph.h */; settings = {ATTRIBUTES = (Public, ); }; };
961F9B831C10ED5400ACF5DD /* GraphObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphObject.swift */; };
961F9B841C10ED5400ACF5DD /* GraphObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphObject.swift */; };
961F9B831C10ED5400ACF5DD /* GraphNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphNode.swift */; };
961F9B841C10ED5400ACF5DD /* GraphNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphNode.swift */; };
961F9B851C10ED5400ACF5DD /* GraphSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B561C10ED5400ACF5DD /* GraphSearch.swift */; };
961F9B861C10ED5400ACF5DD /* GraphSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B561C10ED5400ACF5DD /* GraphSearch.swift */; };
961F9B871C10ED5400ACF5DD /* GraphWatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961F9B571C10ED5400ACF5DD /* GraphWatch.swift */; };
Expand Down Expand Up @@ -97,7 +97,7 @@
96E135D31C10F16D00E0BF44 /* Relationship.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B501C10ED5400ACF5DD /* Relationship.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D41C10F16D00E0BF44 /* Entity.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B521C10ED5400ACF5DD /* Entity.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D51C10F16D00E0BF44 /* Graph.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B531C10ED5400ACF5DD /* Graph.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D61C10F16D00E0BF44 /* GraphObject.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphObject.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D61C10F16D00E0BF44 /* GraphNode.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphNode.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D71C10F16D00E0BF44 /* GraphSearch.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B561C10ED5400ACF5DD /* GraphSearch.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D81C10F16D00E0BF44 /* GraphWatch.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B571C10ED5400ACF5DD /* GraphWatch.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135D91C10F16D00E0BF44 /* ManagedAction.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B5E1C10ED5400ACF5DD /* ManagedAction.swift */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -117,7 +117,7 @@
96E135F31C10F22800E0BF44 /* Relationship.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B501C10ED5400ACF5DD /* Relationship.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F41C10F22800E0BF44 /* Entity.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B521C10ED5400ACF5DD /* Entity.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F51C10F22800E0BF44 /* Graph.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B531C10ED5400ACF5DD /* Graph.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F61C10F22800E0BF44 /* GraphObject.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphObject.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F61C10F22800E0BF44 /* GraphNode.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B551C10ED5400ACF5DD /* GraphNode.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F71C10F22800E0BF44 /* GraphSearch.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B561C10ED5400ACF5DD /* GraphSearch.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F81C10F22800E0BF44 /* GraphWatch.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B571C10ED5400ACF5DD /* GraphWatch.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E135F91C10F22800E0BF44 /* ManagedAction.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F9B5E1C10ED5400ACF5DD /* ManagedAction.swift */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -176,7 +176,7 @@
961F9B521C10ED5400ACF5DD /* Entity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entity.swift; sourceTree = "<group>"; };
961F9B531C10ED5400ACF5DD /* Graph.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.swift; sourceTree = "<group>"; };
961F9B541C10ED5400ACF5DD /* Graph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graph.h; sourceTree = "<group>"; };
961F9B551C10ED5400ACF5DD /* GraphObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphObject.swift; sourceTree = "<group>"; };
961F9B551C10ED5400ACF5DD /* GraphNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphNode.swift; sourceTree = "<group>"; };
961F9B561C10ED5400ACF5DD /* GraphSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphSearch.swift; sourceTree = "<group>"; };
961F9B571C10ED5400ACF5DD /* GraphWatch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphWatch.swift; sourceTree = "<group>"; };
961F9B581C10ED5400ACF5DD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -265,7 +265,7 @@
96607D741C3DB14A008D47D8 /* NodeClass.swift */,
961F9B531C10ED5400ACF5DD /* Graph.swift */,
96815B271C9F44A50006CBE2 /* GraphModel.swift */,
961F9B551C10ED5400ACF5DD /* GraphObject.swift */,
961F9B551C10ED5400ACF5DD /* GraphNode.swift */,
961F9B561C10ED5400ACF5DD /* GraphSearch.swift */,
961F9B571C10ED5400ACF5DD /* GraphWatch.swift */,
961F9B6A1C10ED5400ACF5DD /* Node.swift */,
Expand Down Expand Up @@ -344,7 +344,7 @@
96E135F31C10F22800E0BF44 /* Relationship.swift in Headers */,
96E135F41C10F22800E0BF44 /* Entity.swift in Headers */,
96E135F51C10F22800E0BF44 /* Graph.swift in Headers */,
96E135F61C10F22800E0BF44 /* GraphObject.swift in Headers */,
96E135F61C10F22800E0BF44 /* GraphNode.swift in Headers */,
96E135F71C10F22800E0BF44 /* GraphSearch.swift in Headers */,
96E135F81C10F22800E0BF44 /* GraphWatch.swift in Headers */,
96E135F91C10F22800E0BF44 /* ManagedAction.swift in Headers */,
Expand Down Expand Up @@ -374,7 +374,7 @@
96E135D31C10F16D00E0BF44 /* Relationship.swift in Headers */,
96E135D41C10F16D00E0BF44 /* Entity.swift in Headers */,
96E135D51C10F16D00E0BF44 /* Graph.swift in Headers */,
96E135D61C10F16D00E0BF44 /* GraphObject.swift in Headers */,
96E135D61C10F16D00E0BF44 /* GraphNode.swift in Headers */,
96E135D71C10F16D00E0BF44 /* GraphSearch.swift in Headers */,
96E135D81C10F16D00E0BF44 /* GraphWatch.swift in Headers */,
96E135D91C10F16D00E0BF44 /* ManagedAction.swift in Headers */,
Expand Down Expand Up @@ -561,7 +561,7 @@
961F9B781C10ED5400ACF5DD /* Action.swift in Sources */,
961F9BA01C10ED5400ACF5DD /* ManagedRelationshipProperty.swift in Sources */,
961F9B961C10ED5400ACF5DD /* ManagedAction.swift in Sources */,
961F9B841C10ED5400ACF5DD /* GraphObject.swift in Sources */,
961F9B841C10ED5400ACF5DD /* GraphNode.swift in Sources */,
961F9BA61C10ED5400ACF5DD /* ManagedEntityProperty.swift in Sources */,
961F9B881C10ED5400ACF5DD /* GraphWatch.swift in Sources */,
96815B291C9F44A50006CBE2 /* GraphModel.swift in Sources */,
Expand Down Expand Up @@ -615,7 +615,7 @@
961F9B771C10ED5400ACF5DD /* Action.swift in Sources */,
961F9B9F1C10ED5400ACF5DD /* ManagedRelationshipProperty.swift in Sources */,
961F9B951C10ED5400ACF5DD /* ManagedAction.swift in Sources */,
961F9B831C10ED5400ACF5DD /* GraphObject.swift in Sources */,
961F9B831C10ED5400ACF5DD /* GraphNode.swift in Sources */,
961F9BA51C10ED5400ACF5DD /* ManagedEntityProperty.swift in Sources */,
961F9B871C10ED5400ACF5DD /* GraphWatch.swift in Sources */,
96815B281C9F44A50006CBE2 /* GraphModel.swift in Sources */,
Expand Down
14 changes: 2 additions & 12 deletions Sources/GraphObject.swift → Sources/GraphNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,17 @@

import CoreData

internal class GraphObject : NSManagedObject {
internal class GraphNode : NSManagedObject {
//
// :name: context
//
internal var context: NSManagedObjectContext?

//
// :name: worker
//
internal var worker: NSManagedObjectContext? {
if nil == context {
context = Graph.context
}
return context
}

//
// :name: delete
//
internal func delete() {
worker?.deleteObject(self)
Graph.context?.deleteObject(self)
}
}

2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.9</string>
<string>1.0.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions Sources/ManagedNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import CoreData

internal class ManagedNode : GraphObject {
internal class ManagedNode : GraphNode {
@NSManaged internal var nodeClass: NSNumber
@NSManaged internal var type: String
@NSManaged internal var createdDate: NSDate
Expand All @@ -42,7 +42,7 @@ internal class ManagedNode : GraphObject {
//
internal var id: String {
do {
try worker?.obtainPermanentIDsForObjects([self])
try Graph.context?.obtainPermanentIDsForObjects([self])
} catch {}
return String(stringInterpolationSegment: nodeClass) + type + objectID.URIRepresentation().lastPathComponent!
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ManagedNodeGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@

import CoreData

internal class ManagedNodeGroup : GraphObject {
internal class ManagedNodeGroup : GraphNode {
@NSManaged internal var name: String
}
2 changes: 1 addition & 1 deletion Sources/ManagedNodeProperty.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import CoreData

internal class ManagedNodeProperty : GraphObject {
internal class ManagedNodeProperty : GraphNode {
@NSManaged internal var name: String
@NSManaged internal var object: AnyObject
}

0 comments on commit 08eb2da

Please sign in to comment.