LinkData API

LinkData Global  2.0.0

LinkData API > linkdata > LinkData
Search:
 
Filters

static Class LinkData

The LinkData global namespace object. If LinkData is already defined, the existing LinkData object will not be overwritten so that defined namespaces are preserved.

Properties

activeAjaxConnections - object

keeps the no of active ajax connections to the server

Methods

getFileContent

static String getFileContent ( workId , filename , format , callbackFn )
Returns contents of a rdf work file.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
format <String> Type of rdf work file. (JSON, TSV, TTL or TRUTLE, XML)
callbackFn <String> Name of the callback function
Returns: String
Contents of rdf work file.

getFiles

static Array getFiles ( workId , callback )
Returns databases related to the application by given work id. If work id is undefined or null, returns all databases related to the application grouped by work id.
Parameters:
workId <String> Id of rdf work. (optional)
callback <Function> the callback function ref
Returns: Array
A array of work files values.
Example:
If work id exist, [<fileName>,<fileName>...]
If not work id exist, [{<workId>,[<fileName>,<fileName>...]},{.....}...]

getFilesByTag

static Array getFilesByTag ( workId , tagName , callback )
Returns databases related to the application by given work id and tag name. If work id is undefined or null, returns all databases related to tag name grouped by work id.
Parameters:
workId <String> Id of rdf work. (optional)
tagName <String> name of the tag.
callback <Function> the callback function ref
Returns: Array
A array of work files values.
Example:
If work id exist, [<fileName>,<fileName>...]
If not work id exist, [{<workId>,[<fileName>,<fileName>...]},{.....}...]

getObjects

static Array getObjects ( workId , filename , subject , property , callback )
Returns object list of the database by subject and property.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
subject <String> Url of subject
property <String> Url of property
callback <Function> the callback function ref
Returns: Array
The array of object values.
Example: [<obejctValue>,<obejctValue>,...]

getProperties

static Array getProperties ( workId , filename , callback , index )
Returns property list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
callback <Function> the callback function ref
index <Object> start(default 1) and end(default -1) position values. (Ex: {start:1, end:10})
Returns: Array
The array of property url values.
Example: [<property>,<property>,...]

getSubjectName

static String getSubjectName ( )
Returns the subject name from subject url which passed by browser URL.
Example:
if Subject URI: http://linkdata.org/resource/rdf1s1243i#ABC
then Browser URL: http://...?id=ABC&subject=http://linkdata.org/resource/rdf1s1243i#ABC
returns Subject Name: ABC
Returns: String
Subject Name

getSubjects

static Array getSubjects ( workId , filename , callback , index )
Returns subject list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
callback <Function> the callback function ref
index <Object> start(default 1) and end(default -1) position values. (Ex: {start:1, end:10})
Returns: Array
A array of subject url values.
Example: [<subject>,<subject>,...]

getSubjectsCount

static Int getSubjectsCount ( workId , filename )
Returns the no of subjects in the passed work id's file name. If either the workId or filename not defined, this will return 0.
Parameters:
workId <String> Id of rdf work.
filename <String> Name of rdf work file.
Returns: Int
no of subjects in the file.
Example: 200

getSubjectUri

static String getSubjectUri ( )
Returns the subject uri which passed by browser URL.
Example:
if Subject URI: http://linkdata.org/resource/rdf1s1243i#ABC
then Browser URL: http://...?id=ABC&subject=http://linkdata.org/resource/rdf1s1243i#ABC
returns Subject URI: http://linkdata.org/resource/rdf1s1243i#ABC
Returns: String
Subject URI

getTriples

static Array getTriples ( workId , filename , callback , index )
Returns all triple list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
callback <Function> the callback function ref
index <Object> start(default 1) and end(default -1) position values. (Ex: {start:1, end:10})
Returns: Array
A array of all triples.
Example: [{"subject":<subject>,"property":<property>, "object":<object>},...]

getTriplesByProperty

static Array getTriplesByProperty ( workId , filename , property , callback , index )
Returns triple list of the database by property. If property is undefined or null, then returns all triple list of the database.
Parameters:
workId <String> Id of rdf work.
filename <String> Name of rdf work file.
property <String> Url of property. (optional)
callback <Function> the callback function ref
index <Object> start(default 1) and end(default -1) position values. (Ex: {start:1, end:10})
Returns: Array
A array of triples by property.
Example: [{"subject":<subject>,"property":<property>, "object":<object>},...]

getTriplesBySubject

static Array getTriplesBySubject ( workId , filename , subject , callback , index )
Returns triple list of the database by subject. If subject is undefined or null, then returns all triple list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
subject <String> Url of subject. (optional)
callback <Function> the callback function ref
index <Object> start(default 1) and end(default -1) position values. (Ex: {start:1, end:10})
Returns: Array
A array of triples with subject.
Example: [{"subject":<subject>,"property":<property>, "object":<object>},...]

getWorkName

static Array getWorkName ( workId , callback )
Returns name by given rdf work id.
Parameters:
workId <String> Id of rdf work. (optional)
callback <Function> the callback function ref
Returns: Array
A array of work name values.
Example:
If work id exist, [<workName>]
If not work id exist, [{<workId>,[<workName>]},{.....}...]

getWorks

static Array getWorks ( callback )
Returns work ids with databases related to the application.
Parameters:
callback <Function> the callback function ref
Returns: Array
A array of work ids with related work files.
Example: [{<workId>,[<fileName>,<fileName>...]},{.....}...]


Copyright © 2014 app.linkdata.org, All rights reserved.