Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102399892
rdf-editor-component.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 20, 07:54
Size
1 KB
Mime Type
text/x-java
Expires
Sat, Feb 22, 07:54 (2 d)
Engine
blob
Format
Raw Data
Handle
24348272
Attached To
rSVGTESTAPP svg-test-app
rdf-editor-component.component.ts
View Options
import { Component, OnInit } from '@angular/core';
import {Quad} from "n3";
import {Subscription} from "rxjs/index";
import {RdfServiceService} from "../../services/rdf-service.service";
@Component({
selector: 'app-rdf-editor-component',
templateUrl: './rdf-editor-component.component.html',
styleUrls: ['./rdf-editor-component.component.scss']
})
export class RdfEditorComponentComponent implements OnInit {
rdfJsData: Array<Quad>;
rdfJsDataSubscription: Subscription;
rdfJsPrefixes: any;
testRdf = `PREFIX c: <http://example.org/cartoons#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
c:Tom a c:Cat;
c:published "2013-08-26"^^xsd:date.
c:Jerry a c:Mouse;
c:smarterThan c:Tom.`;
constructor( private rdfService: RdfServiceService ) { }
ngOnInit() {
this.rdfService.parseRDF(this.testRdf);
this.rdfJsDataSubscription = this.rdfService.dataToEditEmitter.subscribe(data => {
this.rdfJsData = data;
console.log('this.rdfJsData coming from store: ', this.rdfJsData);
});
}
}
Event Timeline
Log In to Comment