Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
 public NamespaceController(NamespaceService namespaceService)
 {
     _namespaceService = namespaceService;
 }