コード例 #1
0
ファイル: RdfWriter.cs プロジェクト: hnafar/semweb-dotnet
        public static RdfWriter Create(string type, TextWriter output, RdfXmlWriter.Options options)
        {
            switch (RdfReader.NormalizeMimeType(type))
            {
            case "xml":
                                        #if !SILVERLIGHT
                return(new RdfXmlWriter(output, options));
                                        #else
                throw new NotSupportedException("RDF/XML output is not supported by the Silverlight build of the SemWeb library.");
                                        #endif
            case "n3":
                                        #if DOTNET2
                return(new N3Writer(output));
                                        #endif
            case "turtle":
                return(new TurtleWriter(output));

            case "nt":
            case "ntriples":
                return(new NTriplesWriter(output));

            case "dot":
                return(new GraphVizWriter(output));

            default:
                throw new ArgumentException("Unknown parser or MIME type: " + type);
            }
        }
コード例 #2
0
ファイル: RdfWriter.cs プロジェクト: ArsenShnurkov/beagle-1
        public static RdfWriter Create(string type, string file)
        {
            switch (RdfReader.NormalizeMimeType(type))
            {
            case "xml":
                                        #if !SILVERLIGHT
                return(new RdfXmlWriter(file));
                                        #else
                throw new NotSupportedException("RDF/XML output is not supported by the Silverlight build of the SemWeb library.");
                                        #endif
            case "n3":
                return(new N3Writer(file));

            default:
                throw new ArgumentException("Unknown parser or MIME type: " + type);
            }
        }
コード例 #3
0
		public KnowledgeModel(RdfReader parser) : this() {
			stores.Add(new MemoryStore(parser));
		}
コード例 #4
0
		public GraphMatch(RdfReader query) :
			this(new MemoryStore(query),
				query.BaseUri == null ? null : new Entity(query.BaseUri)) {
		}