コード例 #1
0
        /// <summary>
        /// Get the resources in the collection. This supports the fn:collection() function. It is not
        /// required that all collections expose a set of resources in this way, or that the resources
        /// returned bear any particular relationship to the URIs returned by the getResourceURIs() method
        /// for the same collection URI.
        /// </summary>
        /// <param name="context">context the XPath evaluation context</param>
        /// <returns>a list over the resources in the collection. This returns objects of implementations of the interface <code>IResource</code></returns>
        public List <IResource> GetResources(DynamicContext context)
        {
            List <IResource> list = new List <IResource>();

            if (resourceCollection != null)
            {
                var jIter = resourceCollection.getResources(context.context);
                while (jIter.hasNext())
                {
                    JResource jresource = (JResource)jIter.next();
                    list.Add(new Resource(jresource));
                }
            }
            return(list);
        }
コード例 #2
0
 /// <summary>
 /// Constructor to  wrap a Java Resource
 /// </summary>
 /// <param name="rc">Java Resource object</param>
 public Resource(JResource rc)
 {
     resource = rc;
 }
コード例 #3
0
 //Default constructor
 public Resource()
 {
     resource = null;
 }