Example #1
0
        /// <summary>
        /// content with given details
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public object DeleteContent(string projUri)
        {
            Logger.Info("Entering DeleteProject");
            //Call ML and Put the project xml
            string   mlUrl    = ConfigurationManager.AppSettings["MarkLogicResourceURL"] + "content?name=content&rs:uri=" + projUri;
            MLReader mlReader = new MLReader();
            string   results  = mlReader.HttpInvoke(mlUrl, SupportedHttpMethods.DELETE, "application/json");

            Logger.Debug("Logging results for DeleteContent with mlUrl");
            Logger.Info("Exiting DeleteProject");
            return(mlReader.ConverttoJson <object>(results));
        }
Example #2
0
        /// <summary>
        /// CreateContent with given details
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public object UploadMetadata(string metadata)
        {
            Logger.Info("Entering UploadMetadata");

            string   mlUrl    = ConfigurationManager.AppSettings["MarkLogicResourceURL"] + "content?name=content";
            MLReader mlReader = new MLReader();
            string   results  = mlReader.HttpInvoke(mlUrl, SupportedHttpMethods.POST, "application/json", metadata);

            Logger.Debug("Logging results for UploadMetadata with mlUrl");
            Logger.Info("Exiting UploadMetadata");
            return(mlReader.ConverttoJson <object>(results));
        }
Example #3
0
        /// <summary>
        /// delete the Project with given details
        /// </summary>
        /// <param name="project"></param>
        /// <returns></returns>
        public object DeleteProject(string projUri)
        {
            Logger.Info("Entry DeleteProject");

            //Post it to MarkLogic
            string   mlUrl    = ConfigurationManager.AppSettings["MarkLogic_CRUD_URL"] + "project?name=project&rs:format=json&rs:uri=" + projUri;
            MLReader mlReader = new MLReader();
            string   results  = mlReader.HttpInvoke(mlUrl, SupportedHttpMethods.DELETE, "application/json");

            Logger.Debug("Logging Results for DeleteProject with mlUrl");
            Logger.Info("Exiting DeleteProject");
            return(mlReader.ConverttoJson <object>(results));
        }
Example #4
0
        /// <summary>
        /// update the project with given details
        /// </summary>
        /// <param name="project"></param>
        /// <returns></returns>
        public object UpdateProject(string projXml, string projUri)
        {
            Logger.Info("Entering UpdateProject");
            //Call ML and Put the project xml

            //Post it to MarkLogic
            string   mlUrl    = ConfigurationManager.AppSettings["MarkLogic_CRUD_URL"] + "project?name=project&rs:format=json&rs:uri=" + projUri;
            MLReader mlReader = new MLReader();
            string   results  = mlReader.HttpInvoke(mlUrl, SupportedHttpMethods.PUT, "application/json", projXml);

            Logger.Debug("Logging Results for UpdateProject with mlUrl");
            Logger.Info("Exitinging UpdateProject");
            return(mlReader.ConverttoJson <object>(results));
        }