@@ -5,21 +5,21 @@ const FrameRule = require('./frameRule');
5
5
* @file Javascript Terminus Document Classes
6
6
* @license Apache Version 2
7
7
* Helper classes for accessing documents returned by the Terminus DB API programmatically
8
- *
8
+ *
9
9
* @example
10
10
* let doc = new TerminusDocument(client);
11
- *
11
+ *
12
12
* //These set the objects document property and return promises:
13
- *
13
+ *
14
14
* doc.loadDocument(URL).then(() => console.log(this.document));
15
15
* doc.loadComplete(URL, CLS).then(() => console.log(this.document))
16
16
* 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
19
19
* doc.loadJSON(json_frames, cls) //console.log(this.document)
20
20
* doc.loadDataFrames(json_frames, cls)
21
21
* doc.loadClassFrames(json_frames, cls)
22
- * @example
22
+ * @example
23
23
*
24
24
* @description Represents a frame for programmatic access to object frame, anywhere within a document
25
25
* Recursive data structure where this.children contains an indexed array of object frames
@@ -124,7 +124,7 @@ ObjectFrame.prototype.loadJSONLDDocument = function (doc) {
124
124
if ( ! this . originalDocument ) this . originalDocument = doc ;
125
125
if ( ! this . subjid && doc [ "@id" ] ) {
126
126
this . subjid = doc [ "@id" ]
127
- }
127
+ }
128
128
if ( doc [ '@context' ] ) this . jsonld_context = doc [ '@context' ] ;
129
129
for ( var prop in doc ) {
130
130
if ( prop [ 0 ] == "@" || ( typeof doc [ prop ] == "object" && Object . keys ( doc [ prop ] ) . length == 0 ) ) continue
@@ -143,7 +143,7 @@ ObjectFrame.prototype.loadJSONLDDocument = function (doc) {
143
143
}
144
144
this . properties [ prop ] . addJSONLDDocument ( doc [ prop ] ) ;
145
145
}
146
- }
146
+ }
147
147
return this ;
148
148
} ;
149
149
@@ -234,7 +234,7 @@ ObjectFrame.prototype.filter = function (rules, onmatch) {
234
234
ObjectFrame . prototype . getPropertyClassFrame = function ( prop , jsonlddoc ) {
235
235
prop = FrameHelper . unshorten ( prop )
236
236
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])
238
238
return this . classframes [ prop ] ;
239
239
}
240
240
if ( jsonlddoc ) {
@@ -590,7 +590,7 @@ PropertyFrame.prototype.addJSONLDDocument = function(jsonld){
590
590
if ( Array . isArray ( jsonld ) ) {
591
591
for ( var i = 0 ; i < jsonld . length ; i ++ ) {
592
592
var df = new DataFrame ( jsonld [ i ] , this , this . values . length ) ;
593
- this . values . push ( df ) ;
593
+ this . values . push ( df ) ;
594
594
}
595
595
}
596
596
else {
@@ -637,7 +637,7 @@ PropertyFrame.prototype.fillFromSchema = function (newid) {
637
637
nframe . parent = this ;
638
638
values . push ( nframe ) ;
639
639
}
640
- }
640
+ }
641
641
else {
642
642
var nframe = this . createEmpty ( newid ) ;
643
643
nframe . parent = this ;
@@ -1210,7 +1210,7 @@ ClassFrame.prototype.loadFromJSONLD = function (jsonld, prop) {
1210
1210
this . predicate = FrameHelper . unshorten ( prop )
1211
1211
this . type = ( jsonld [ prop ] [ "@value" ] ? 'datatypeProperty' : 'objectProperty' )
1212
1212
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 ]
1214
1214
}
1215
1215
this . domain = FrameHelper . unshorten ( jsonld [ "@type" ] )
1216
1216
this . domainValue = FrameHelper . unshorten ( jsonld [ "@id" ] )
0 commit comments