DocumentFromPath() public method

Creates a new instance of a Nuxeo Document.
public DocumentFromPath ( string path ) : Document
path string The remote path to the document.
return Document
Exemplo n.º 1
0
        public BusinessObjects()
        {
            client = new Client(Config.ServerUrl());
            client.AddDefaultSchema("dublincore");

            // populate
            document = (Document)client.DocumentFromPath("/").Post(new Document
            {
                Type = "Folder",
                Name = "bofolder",
                Properties = new Properties { { "dc:title", "Just a folder" } }
            }).Result;
        }
Exemplo n.º 2
0
        public WorkflowAdapters()
        {
            client = new Client(Config.ServerUrl());
            client.AddDefaultSchema("dublincore");

            // populate
            document = (Document)client.DocumentFromPath("/").Post(new Document
            {
                Type = "File",
                Name = "JustAfile",
                Properties = new Properties { { "dc:title", "Just a file" } }
            }).Result;
        }
Exemplo n.º 3
0
        public ContentEnrichers()
        {
            client = new Client(Config.ServerUrl());
            client.AddDefaultSchema("dublincore");

            // populate
            testDocument = (Document)client.DocumentFromPath("/").Post(new Document
            {
                Type = "Folder",
                Name = "folder2",
                Properties = new Properties { { "dc:title", "A Folder 2" } }
            }).Result;
        }
Exemplo n.º 4
0
        public BatchUpload()
        {
            client = new Client(Config.ServerUrl());
            client.AddDefaultSchema("*");

            // populate
            testFolder = (Document)client.DocumentFromPath("/").Post(new Document
            {
                Type = "Folder",
                Name = "TestFolder3",
                Properties = new Properties { { "dc:title", "Upload Test Folder" } }
            }).Result;
        }
Exemplo n.º 5
0
        public Adapters()
        {
            client = new Client(Config.ServerUrl());
            client.AddDefaultSchema("dublincore");

            // populate
            folder = (Document)client.DocumentFromPath("/").Post(new Document
            {
                Type = "Folder",
                Name = "TestFolder4",
                Properties = new Properties { { "dc:title", "Adapter Tests" } }
            }).Result;
            Assert.NotNull(folder);

            Document document = (Document)client.DocumentFromPath(folder.Path).Post(new Document
            {
                Type = "File",
                Name = "TestFile1",
                Properties = new Properties { { "dc:title", "File 1" } }
            }).Result;
            Assert.NotNull(document);

            document = (Document)client.DocumentFromPath(folder.Path).Post(new Document
            {
                Type = "File",
                Name = "TestFIle2",
                Properties = new Properties { { "dc:title", "File 2" } }
            }).Result;
            Assert.NotNull(document);

            Blob blob = Blob.FromFile("Puppy.docx");
            document = (Document)client.Operation("FileManager.Import")
                                       .SetInput(blob)
                                       .SetContext("currentDocument", folder.Path)
                                       .Execute()
                                       .Result;
        }