@@ -5,21 +5,21 @@ const FrameRule = require('./frameRule');
55 * @file Javascript Terminus Document Classes
66 * @license Apache Version 2
77 * Helper classes for accessing documents returned by the Terminus DB API programmatically
8- *
8+ *
99 * @example
1010 * let doc = new TerminusDocument(client);
11- *
11+ *
1212 * //These set the objects document property and return promises:
13- *
13+ *
1414 * doc.loadDocument(URL).then(() => console.log(this.document));
1515 * doc.loadComplete(URL, CLS).then(() => console.log(this.document))
1616 * doc.loadSchema(cls).then(() => console.log(this.document))
17- *
18- * //These just set the object's document property
17+ *
18+ * //These just set the object's document property
1919 * doc.loadJSON(json_frames, cls) //console.log(this.document)
2020 * doc.loadDataFrames(json_frames, cls)
2121 * doc.loadClassFrames(json_frames, cls)
22- * @example
22+ * @example
2323 *
2424 * @description Represents a frame for programmatic access to object frame, anywhere within a document
2525 * Recursive data structure where this.children contains an indexed array of object frames
@@ -124,7 +124,7 @@ ObjectFrame.prototype.loadJSONLDDocument = function (doc) {
124124 if ( ! this . originalDocument ) this . originalDocument = doc ;
125125 if ( ! this . subjid && doc [ "@id" ] ) {
126126 this . subjid = doc [ "@id" ]
127- }
127+ }
128128 if ( doc [ '@context' ] ) this . jsonld_context = doc [ '@context' ] ;
129129 for ( var prop in doc ) {
130130 if ( prop [ 0 ] == "@" || ( typeof doc [ prop ] == "object" && Object . keys ( doc [ prop ] ) . length == 0 ) ) continue
@@ -143,7 +143,7 @@ ObjectFrame.prototype.loadJSONLDDocument = function (doc) {
143143 }
144144 this . properties [ prop ] . addJSONLDDocument ( doc [ prop ] ) ;
145145 }
146- }
146+ }
147147 return this ;
148148} ;
149149
@@ -234,7 +234,7 @@ ObjectFrame.prototype.filter = function (rules, onmatch) {
234234ObjectFrame . prototype . getPropertyClassFrame = function ( prop , jsonlddoc ) {
235235 prop = FrameHelper . unshorten ( prop )
236236 if ( this . classframes && typeof this . classframes === 'object' && typeof this . classframes [ prop ] === 'object' ) {
237- console . log ( "returning " + prop , this . classframes [ prop ] )
237+ // console.log("returning " + prop, this.classframes[prop])
238238 return this . classframes [ prop ] ;
239239 }
240240 if ( jsonlddoc ) {
@@ -590,7 +590,7 @@ PropertyFrame.prototype.addJSONLDDocument = function(jsonld){
590590 if ( Array . isArray ( jsonld ) ) {
591591 for ( var i = 0 ; i < jsonld . length ; i ++ ) {
592592 var df = new DataFrame ( jsonld [ i ] , this , this . values . length ) ;
593- this . values . push ( df ) ;
593+ this . values . push ( df ) ;
594594 }
595595 }
596596 else {
@@ -637,7 +637,7 @@ PropertyFrame.prototype.fillFromSchema = function (newid) {
637637 nframe . parent = this ;
638638 values . push ( nframe ) ;
639639 }
640- }
640+ }
641641 else {
642642 var nframe = this . createEmpty ( newid ) ;
643643 nframe . parent = this ;
@@ -1210,7 +1210,7 @@ ClassFrame.prototype.loadFromJSONLD = function (jsonld, prop) {
12101210 this . predicate = FrameHelper . unshorten ( prop )
12111211 this . type = ( jsonld [ prop ] [ "@value" ] ? 'datatypeProperty' : 'objectProperty' )
12121212 this . range = FrameHelper . unshorten ( jsonld [ prop ] [ "@type" ] )
1213- this . rangeValue = jsonld [ prop ] [ "@id" ] ? jsonld [ prop ] [ "@id" ] : jsonld [ prop ]
1213+ this . rangeValue = jsonld [ prop ] [ "@id" ] ? jsonld [ prop ] [ "@id" ] : jsonld [ prop ]
12141214 }
12151215 this . domain = FrameHelper . unshorten ( jsonld [ "@type" ] )
12161216 this . domainValue = FrameHelper . unshorten ( jsonld [ "@id" ] )
0 commit comments