Ejemplo n.º 1
0
        public static void Convert(GeneralUris generalUris, string tempDir, Uri baseUri, string destDir)
        {
            if (tempDir == null)
            {
                throw new ArgumentNullException("tempDir");
            }
            if (baseUri == null)
            {
                throw new ArgumentNullException("baseUri");
            }
            if (destDir == null)
            {
                throw new ArgumentNullException("destDir");
            }

            var nsMapper = generalUris.CreateNamespaceMapper();

            WriteOntology(generalUris, destDir, nsMapper);
            if (!GlobalData.Options.OntologyOnly)
            {
                ConvertSiteList(generalUris, tempDir, baseUri, destDir, nsMapper);
                if (!GlobalData.Options.SiteListOnly)
                {
                    WriteAccountList(generalUris, destDir, nsMapper);
                    WriteBadgesLists(generalUris, destDir, nsMapper);
                    WriteConstants(generalUris, destDir, nsMapper);
                }
            }
        }
Ejemplo n.º 2
0
        public INamespaceMapper CreateNamespaceMapper()
        {
            var result = new NamespaceMapper();

            result.Import(generalUris.CreateNamespaceMapper());
            result.AddNamespace("se", BaseUri);
            result.AddNamespace("tag", tagPrefix);
            result.AddNamespace("badge", badgePrefix);
            return(result);
        }