Benvenuto nella Documentazione API

Attualmente, sia la libreria, sia la sua documentazione, sono ancora in fare di progettazione, alcune informazioni potrebbero non essere corrette.

IDNjs.Manager Class

  • Manager() : IDNjs.Manager 1.0.0

    Default constructor

  • loadNodes( String url, Function onSuccess, Function onError ) : jqXHR 1.0.0

    Retrieve a list of nodes from the server.

    • url : String

      document url

    • onSuccess : Function (IDNjs.Node[] nodes)

      callback called if the request succeded.

    • onError : Function (Number status, IDNjs.Exceptions.NetworkException exception)

      callback called if an error occurred during the request or if the server returned an error.

  • loadNode( String url, Function onSuccess, Function onError ) : jqXHR 1.0.0

    Retrieve a node from the server.

    • url : String

      node url

    • onSuccess : Function (IDNjs.Node node)

      callback called if the request succeded.

    • onError : Function (Number status, IDNjs.Exceptions.Exception exception)

      callback called if an error occurred during the request or if the server returned an error.

  • deleteNode( Node node, Function onSuccess, Function onError ) : jqXHR 1.0.0

    Delete a node in the server.

    • node : Node

      node to be deleted

    • onSuccess : Function ()

      callback called if the request succeded.

    • onError : Function (Number status, IDNjs.Exceptions.Exception exception)

      callback called if an error occurred during the request or if the server returned an error.

  • writeNode( Node node, Function onSuccess, Function onError ) : jqXHR 1.0.0

    Write a node in the server, performing a smartPUT.

    • node : Node

      node to be written

    • onSuccess : Function ()

      callback called if the request succeded.

    • onError : Function (Number status, IDNjs.Exceptions.Exception exception)

      callback called if an error occurred during the request or if the server returned an error.

IDNjs.Node Class

  • Node( String lri ) 1.0.0

    Default constructor

    • lri : String

      node LRI

  • Node( String lri, String nodeLocalName ) 1.0.2

    Default constructor

    • lri : String

      node LRI

    • nodeLocalName : String

      node local name

  • getLRI( ) : String 1.0.0

    Returns the node LRI

  • setLRI( String lri ) : void 1.0.0

    Sets the node LRI.

    • lri : String

      node LRI

  • getLocalName( ) : String 1.0.0

    Returns node local name

  • setLocalName( String localName ) : void 1.0.0

    Sets the node local name.

    • localName : String

      node local name

  • getKeywords( ) : String 1.0.2

    Returns node keywords

  • setKeywords( String keywords ) : void 1.0.2

    Sets the node keywords.

    • keywords : String

      node keywords

  • getLocation( ) : Object 1.2.1

    Returns node location object. { "Latitude":0.000, "Longitude":0.000 }

  • setLocation( Float latitude, Float longitude ) : void 1.2.1

    Sets the node location.

    • latitude : Float

      node location latitude

    • longitude : Float

      node location longitude

  • getContent( ) : String 1.2.0

    Returns node application data content

  • setContent( String content ) : void 1.2.0

    Sets the node application data content.

    • content : String

      node content data

  • setContent( String content, String contentType ) : void 1.2.0

    Sets the node application data content and content type.

    • content : String

      node content data

    • contentType : String

      node content type

  • setContent( String content, String contentType, String contentEncoding ) : void 1.2.0

    Sets the node application data content, content type and encoding.

    • content : String

      node content data

    • contentType : String

      node content type

    • contentEncoding : String

      node content encoding

  • getContentType( ) : String 1.2.0

    Returns node application data content type

  • setContentType( String contentType ) : void 1.2.0

    Sets the node application data content type.

    • contentType : String

      node content type

  • getContentEncoding( ) : String 1.2.0

    Returns node application data content encoding

  • setContentEncoding( String contentEncoding ) : void 1.2.0

    Sets the node application data content encoding.

    • contentEncoding : String

      node content encoding

  • getApplicationData( ) : String 1.0.0 deprecated 1.2.0

    Returns the node application data

  • setApplicationData( String applicationData ) : void 1.0.0 deprecated 1.2.0

    Sets the node application data.

    • applicationData : String

      node application data

  • setApplicationData( String applicationData, String contentType ) : void 1.0.1 deprecated 1.2.0

    Sets the node application data. The contentEncoding is set to base64

    • applicationData : String

      node application data

    • contentType : String

      node application data content type

  • setApplicationData( String applicationData, Object attributes ) : void 1.0.1 deprecated 1.2.0

    Sets the node application data. Additional data attributes can be set with attributes.

    • applicationData : String

      node application data

    • attributes : Object

      node application data additional attributes
      Must be a key-value map

  • getRawData( ) : Object 1.0.0

    Returns a clone of the node internal current raw data.

  • getMasterRawData( ) : Object 1.0.0

    Returns a clone of the node internal original raw data, as retrieved from the server when the node was loaded.

  • getEtag( ) : String 1.0.0

    Returns the node ETag.

  • getLinks( IDNjs.LinkTypes linkType ) : IDNjs.Link[] 1.0.0

    Returns the node links for the specified link type.

    • linkType : IDNjs.LinkTypes

      type of link

  • getLink( Number id, IDNjs.LinkTypes linkType ) : IDNjs.Link 1.0.0

    Returns the node link for the specified link type and id.

    • id : Number

      link id

    • linkType : IDNjs.LinkTypes

      type of link

  • getLink( String lri, IDNjs.LinkTypes linkType ) : IDNjs.Link 1.0.0

    Returns the node link for the specified link type and target node LRI.

    • lri : String

      link target node LRI

    • linkType : IDNjs.LinkTypes

      type of link

  • getLinkByName( String linkLocalName, IDNjs.LinkTypes linkType ) : IDNjs.Link 1.0.0

    Returns the node link for the specified link type and link local name.

    • linkLocalName : String

      link local name

    • linkType : IDNjs.LinkTypes

      type of link

  • removeLink( Number id, IDNjs.LinkTypes linkType ) : void 1.0.0

    Remove the link for the specified link type and id from node.

    • id : Number

      link id

    • linkType : IDNjs.LinkTypes

      type of link

  • removeLink( String lri, IDNjs.LinkTypes linkType ) : void 1.0.0

    Remove the link for the specified link type and target node LRI from node.

    • lri : String

      link target node LRI

    • linkType : IDNjs.LinkTypes

      type of link

  • removeLink( IDNjs.Link link, IDNjs.LinkTypes linkType ) : void 1.0.0

    Remove the specified link from node.

    • link : IDNjs.Link

      link

    • linkType : IDNjs.LinkTypes

      type of link

  • addLink( String lri, IDNjs.LinkTypes linkType ) : Link 1.0.0

    Add a link of the specified type to the specified node.

    • lri : String

      link target node lri

    • linkType : IDNjs.LinkTypes

      type of link

  • addLink( IDNjs.Node node, IDNjs.LinkTypes linkType ) : Link 1.0.0

    Add a link of the specified type to the specified node. it also sets the link local name same as node local name

    • node : IDNjs.Node

      link target node

    • linkType : IDNjs.LinkTypes

      type of link

IDNjs.LinkTypes Enum

  • AGGREGATION 1.0.0

  • REFERENCE 1.0.0

  • BACKLINK 1.0.0

  • INCOMING_CHANGE 1.0.0