LinkData API

LinkData Global  1.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.

Methods

getFiles

static Array getFiles ( workId )
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)
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 )
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.
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 )
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
Returns: Array
The array of object values.
Example: [<obejctValue>,<obejctValue>,...]

getProperties

static Array getProperties ( workId , filename )
Returns property list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
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 )
Returns subject list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
Returns: Array
A array of subject url values.
Example: [<subject>,<subject>,...]

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 )
Returns all triple list of the database.
Parameters:
workId <String> Id of rdf work
filename <String> Name of rdf work file
Returns: Array
A array of all triples.
Example: [{"subject":<subject>,"property":<property>, "object":<object>},...]

getTriplesByProperty

static Array getTriplesByProperty ( workId , filename , property )
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)
Returns: Array
A array of triples by property.
Example: [{"subject":<subject>,"property":<property>, "object":<object>},...]

getTriplesBySubject

static Array getTriplesBySubject ( workId , filename , subject )
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)
Returns: Array
A array of triples with subject.
Example: [{"subject":<subject>,"property":<property>, "object":<object>},...]

getWorkName

static Array getWorkName ( workId )
Returns name by given rdf work id.
Parameters:
workId <String> Id of rdf work. (optional)
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 ( )
Returns work ids with databases related to the application.
Returns: Array
A array of work ids with related work files.
Example: [{<workId>,[<fileName>,<fileName>...]},{.....}...]


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