Пример #1
0
        public void PelletNamespace()
        {
            PelletServer server  = new PelletServer(PelletTestServer);
            Type         svcType = typeof(NamespaceService);

            foreach (KnowledgeBase kb in server.KnowledgeBases)
            {
                if (kb.SupportsService(svcType))
                {
                    Console.WriteLine(kb.Name + " supports Namespaces");
                    NamespaceService svc   = (NamespaceService)kb.GetService(svcType);
                    NamespaceMapper  nsmap = svc.GetNamespaces();
                    foreach (String prefix in nsmap.Prefixes)
                    {
                        Console.WriteLine(prefix + ": " + nsmap.GetNamespaceUri(prefix).AbsoluteUri);
                    }
                }
                else
                {
                    Console.WriteLine(kb.Name + " does not support the Search Service");
                }
                Console.WriteLine();
            }
        }
Пример #2
0
 public NamespaceController(NamespaceService namespaceService)
 {
     _namespaceService = namespaceService;
 }