コード例 #1
0
        //=============== Workspace service

        internal static AtomPub10ServiceDocumentFormatter BuildWorkspace(string repositoryId)
        {
            //var xmlns = new XmlSerializerNamespaces();
            //xmlns.Add("app", Workspace.APPNAMESPACE);
            //xmlns.Add("atom", Workspace.ATOMNAMESPACE);
            //xmlns.Add("cmis", Workspace.CMISNAMESPACE);

            var baseUri = GetBaseUri();

            var workspace = new Workspace("Main Repository", GetResourceCollections(baseUri, repositoryId));
            var repInfo   = new RepositoryInfo
            {
                Id             = repositoryId,
                Name           = "MainRep",
                Relationship   = enumRepositoryRelationship.self,
                Description    = "Main Repository",
                VendorName     = "Sense/Net Ltd.",
                ProductName    = "SenseNet Content Repository Prototype",
                ProductVersion = "0.01",
                RootFolderId   = "2",
                Capabilities   = new RepositoryCapabilities
                {
                    Multifiling           = false,
                    Unfiling              = true,
                    VersionSpecificFiling = false,
                    PWCUpdateable         = false,
                    AllVersionsSearchable = false,
                    Join     = enumCapabilityJoin.nojoin,
                    FullText = enumCapabilityFullText.none
                },
                CmisVersionsSupported = "0.5"
            };

            workspace.ElementExtensions.Add(repInfo, new XmlSerializer(typeof(RepositoryInfo)));

            var serviceDoc = new ServiceDocument(new Workspace[] { workspace });
            var formatter  = new AtomPub10ServiceDocumentFormatter(serviceDoc);

            return(formatter);
        }
コード例 #2
0
ファイル: CmisFeedBuilder.cs プロジェクト: maxpavlov/FlexNet
		//=============== Workspace service

		internal static AtomPub10ServiceDocumentFormatter BuildWorkspace(string repositoryId)
		{
			//var xmlns = new XmlSerializerNamespaces();
			//xmlns.Add("app", Workspace.APPNAMESPACE);
			//xmlns.Add("atom", Workspace.ATOMNAMESPACE);
			//xmlns.Add("cmis", Workspace.CMISNAMESPACE);

			var baseUri = GetBaseUri();

			var workspace = new Workspace("Main Repository", GetResourceCollections(baseUri, repositoryId));
			var repInfo =  new RepositoryInfo
			{
				Id = repositoryId,
				Name = "MainRep",
				Relationship = enumRepositoryRelationship.self,
				Description = "Main Repository",
				VendorName = "Sense/Net Ltd.",
				ProductName = "SenseNet Content Repository Prototype",
				ProductVersion = "0.01",
				RootFolderId = "2",
				Capabilities = new RepositoryCapabilities
				{
					Multifiling = false,
					Unfiling = true,
					VersionSpecificFiling = false,
					PWCUpdateable = false,
					AllVersionsSearchable = false,
					Join = enumCapabilityJoin.nojoin,
					FullText = enumCapabilityFullText.none
				},
				CmisVersionsSupported = "0.5"
			};
			workspace.ElementExtensions.Add(repInfo, new XmlSerializer(typeof(RepositoryInfo)));

			var serviceDoc = new ServiceDocument(new Workspace[] { workspace });
			var formatter = new AtomPub10ServiceDocumentFormatter(serviceDoc);
			return formatter;
		}