Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/data/CdfStore.js

  • Provides:

    • dojox.data.CdfStore
  • Requires:

    • dojo.data.util.sorter in common
  • dojox.data.CdfStore

    • type
      Function
    • parameters:
      • args: (typeof Object)
    • summary
      IMPORTANT: The CDF Store is designed to work with Tibco GI, and references Tibco's
      JSX3 JavaScript library and will not work without it.
      
      The CDF Store implements dojo.data.Read, Write, and Identity api's.  It is a local
      (in memory) store that handles XML documents formatted according to the
      Common Data Format (CDF) spec:
      http://www.tibco.com/devnet/resources/gi/3_1/tips_and_techniques/CommonDataFormatCDF.pdf
      
      The purpose of this store is to provide a glue between a jsx3 CDF file and a Dijit.
      
      While a CDF document is an XML file, other than the initial input, all data returned
      from and written to this store should be in object format.
    • example
      	'<data jsxid="jsxroot"><record jsxtext="A"/><record jsxtext="B" jsxid="2" jsxid="2"/></data>'
  • dojox.data.CdfStore.identity

    • tags: const
    • type
      String
    • summary
      The unique identifier for each item. Defaults to &quot;jsxid&quot; which is standard for a CDF
      document. Should not be changed.
      
      
      
      url : String
      The location from which to fetch the XML (CDF) document.
  • dojox.data.CdfStore.url

    • type
      String
  • dojox.data.CdfStore.xmlStr

    • type
      String
    • summary
      A string that can be parsed into an XML document and should be formatted according
      to the CDF spec.
  • dojox.data.CdfStore.data

    • type
      Object
    • summary
      A object that will be converted into the xmlStr property, and then parsed into a CDF.
  • dojox.data.CdfStore.label

    • type
      String
    • summary
      The property within each item used to define the item.
      
      
      
      mode [const]: dojox.data.ASYNC_MODE | dojox.data.SYNC_MODE
      This store supports syncronous fetches if this property is set to dojox.data.SYNC_MODE.
  • dojox.data.CdfStore.mode

    • alias - dojox.data.ASYNC_MODE
  • dojox.data.CdfStore.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • args: (typeof Object)
    • summary
      Constructor for the CDF store. Instantiate a new CdfStore.
  • dojox.data.CdfStore.getValue

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
      • defaultValue: (typeof value)
    • returns
      anything
    • summary
      Return an property value of an item
    • type
      Function
  • dojox.data.CdfStore.getValues

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
    • summary
      Return an array of values
      
      TODO!!! Can't find an example of an array in any CDF files
    • type
      Function
  • dojox.data.CdfStore.getAttributes

    • parameters:
      • item: (typeof jsx3.xml.Entity)
    • returns
      Array
    • summary
      Return an array of property names
    • type
      Function
  • dojox.data.CdfStore.hasAttribute

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
    • returns
      Boolean
    • summary
      Check whether an item has a property
    • type
      Function
  • dojox.data.CdfStore.hasProperty

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
    • summary
      Alias for hasAttribute
    • type
      Function
  • dojox.data.CdfStore.containsValue

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
      • value: (typeof anything)
    • returns
      boolean
    • summary
      Check whether an item contains a value
    • type
      Function
  • dojox.data.CdfStore.isItem

    • parameters:
      • something: (typeof anything)
    • returns
      boolean|boolran
    • summary
      Check whether the object is an item (jsx3.xml.Entity)
    • type
      Function
  • dojox.data.CdfStore.isItemLoaded

    • parameters:
      • something: (typeof anything)
    • returns
      Boolean
    • summary
      Check whether the object is a jsx3.xml.Entity object and loaded
    • type
      Function
  • dojox.data.CdfStore.loadItem

    • parameters:
      • keywordArgs: (typeof object)
    • summary
      Load an item
    • description
      The store always loads all items, so if it's an item, then it's loaded.
    • type
      Function
  • dojox.data.CdfStore.getFeatures

    • summary
      Return supported data APIs
    • type
      Function
  • dojox.data.CdfStore.getLabel

    • parameters:
      • item: (typeof jsx3.xml.Entity)
    • returns
      undefined
    • summary
      See dojo.data.api.Read.getLabel()
    • type
      Function
  • dojox.data.CdfStore.getLabelAttributes

    • parameters:
      • item: (typeof jsx3.xml.Entity)
    • returns
      array|null
    • summary
      returns an array of what properties of the item that were used
      to generate its label
      See dojo.data.api.Read.getLabelAttributes()
    • type
      Function
  • dojox.data.CdfStore.fetch

    • parameters:
      • request: (typeof Object)
    • returns
      Object
    • summary
      Returns an Array of items based on the request arguments.
    • description
      Returns an Array of items based on the request arguments.
      If the store is in ASYNC mode, the items should be expected in an onComplete
      method passed in the request object. If store is in SYNC mode, the items will
      be return directly as well as within the onComplete method.
      note:
      The mode can be set on store initialization or during a fetch as one of the
      parameters.
      
      query: String
      The items in the store are treated as objects, but this is reading an XML
      document. Further, the actual querying of the items takes place in Tibco GI's
      jsx3.xml.Entity. Therefore, we are using their syntax which is xpath.
      Note:
      As conforming to a CDF document, most, if not all nodes are considered "records"
      and their tagNames are as such. The root node is named "data".
      
      examples:
      All items:
      	store.fetch({query:"*"});
      Item with a jsxid attribute equal to "1" (note you could use byId for this)
      	store.fetch({query:"//record[@jsxid='1']"});
      All items with any jsxid attribute:
      	"//record[@jsxid='*']"
      The items with a jsxid of '1' or '4':
      	"//record[@jsxid='4' or @jsxid='1']"
      All children within a "group" node (could be multiple group nodes):
      "//group/record"
      All children within a specific group node:
      "//group[@name='mySecondGroup']/record"
      Any record, anywhere in the document:
      	"//record"
      Only the records beneath the root (data) node:
      	"//data/record"
      
      See:
      http://www.tibco.com/devnet/resources/gi/3_7/api/html/jsx3/xml/Entity.html#method:selectNodes
      http://www.w3.org/TR/xpath
      http://msdn.microsoft.com/en-us/library/ms256086.aspx
      
      See dojo.data.Read.fetch():
      onBegin
      onComplete
      onItem
      onError
      scope
      start
      count
      sort
    • type
      Function
  • dojox.data.CdfStore.cdfDoc

    • type
      Object
  • dojox.data.CdfStore._loadCDF

    • returns
      jsx3.xml.CDF|dojo.Deferred|Error
    • summary
      Internal method.
      If a cdfDoc exists, return it. Otherwise, get one from JSX3,
      load the data or url, and return the doc or a deferred.
    • type
      Function
  • dojox.data.CdfStore._getItems

    • parameters:
      • cdfDoc: (typeof jsx3.xml.Entity)
      • request: (typeof Object)
    • summary
      Internal method.
      Requests the items from jsx3.xml.Entity with an xpath query.
    • type
      Function
  • dojox.data.CdfStore.close

    • parameters:
      • request: (typeof dojo.data.api.Request)
        || keywordArgs || null
    • summary
      See dojo.data.api.Read.close()
    • type
      Function
  • dojox.data.CdfStore.newItem

    • parameters:
      • keywordArgs: (typeof object)
      • parentInfo: (typeof object)
        || String?
    • returns
      jsx3.xml.Entity
    • summary
      Creates a jsx3.xml.Entity item and inserts it either inside the
      parent or appends it to the root
    • type
      Function
  • dojox.data.CdfStore.deleteItem

    • parameters:
      • item: (typeof jsx3.xml.Entity)
    • returns
      boolean
    • summary
      Delete an jsx3.xml.Entity (wrapper to a XML element).
    • type
      Function
  • dojox.data.CdfStore.setValue

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
      • value: (typeof almost)
        anything
    • returns
      Boolean
    • summary
      Set an property value
    • type
      Function
  • dojox.data.CdfStore.setValues

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
      • values: (typeof array)
    • summary
      Set property values
      TODO: Needs to be fully implemented.
    • type
      Function
  • dojox.data.CdfStore.unsetAttribute

    • parameters:
      • item: (typeof jsx3.xml.Entity)
      • property: (typeof String)
    • returns
      Boolean
    • summary
      Remove an property
    • type
      Function
  • dojox.data.CdfStore.revert

    • returns
      boolean
    • summary
      Invalidate changes (new and/or modified elements)
      Resets data by simply deleting the reference to the cdfDoc.
      Subsequent fetches will load the new data.
      Note:
      Any items outside the store will no longer be valid and may cause errors.
    • type
      Function
  • dojox.data.CdfStore._modifiedItems

    • type
      Object
  • dojox.data.CdfStore.isDirty

    • parameters:
      • item: (typeof jsx3.xml.Entity)
        ?
    • returns
      Boolean
    • summary
      Check whether an item is new, modified or deleted.
      If no item is passed, checks if anything in the store has changed.
    • type
      Function
  • dojox.data.CdfStore._makeDirty

    • parameters:
      • item
    • summary
      Internal method.
      Marks items as modified, deleted or new.
    • type
      Function
  • dojox.data.CdfStore._makeXmlString

    • parameters:
      • obj
    • summary
      Internal method.
      Converts an object into an XML string.
    • type
      Function
  • dojox.data.CdfStore.getIdentity

    • parameters:
      • item: (typeof jsx3.xml.Entity)
    • returns
      String
    • summary
      Returns the identifier for an item.
    • type
      Function
  • dojox.data.CdfStore.getIdentityAttributes

    • parameters:
      • item: (typeof jsx3.xml.Entity)
    • returns
      Array
    • summary
      Returns the property used for the identity.
    • type
      Function
  • dojox.data.CdfStore.fetchItemByIdentity

    • parameters:
      • args: (typeof Object)
        || String
    • returns
      dojo.Deferred||Array
    • summary
      See dojo.data.api.Identity.fetchItemByIdentity(keywordArgs)
      
      Note:
      This method can be synchronous if mode is set.
      Also, there is a more finger friendly alias of this method, byId();
    • type
      Function
  • dojox.data.CdfStore.byId

    • parameters:
      • args: (typeof Object)
        || String
    • type
      Function
  • dojox.data.ASYNC_MODE

    • type
      Number
  • dojox.data.SYNC_MODE

    • type
      Number
  • dojox.data

    • type
      Object
  • dojox

    • type
      Object