Esempio n. 1
0
        /// <summary>
        /// Parse the RDF using supplied XPathDocument and base URI
        /// </summary>
        public void Parse(XPathDocument xPathDoc, string baseUri)
        {
            MemoryStream stream;
            StreamReader reader;

            stream = itsValidatorXsltTransformer.TransformContent(xPathDoc);
            if (stream.Length > 0)
            {
                reader = new StreamReader(stream);
                throw new ParserException("The following errors were found in the RDF being parsed: " + reader.ReadToEnd());
            }
            stream = itsXsltTransformer.TransformContentWithBaseUri(xPathDoc, baseUri);
            reader = new StreamReader(stream);

            string line = reader.ReadLine();

            while (line != null)
            {
                SemPlan.Spiral.Core.Statement statement = itsTriplesParser.ParseTriple(line);
                if (statement != null)
                {
                    OnNewStatement(statement);
                }
                line = reader.ReadLine();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Raise a NewStatement event
 /// </summary>
 public void OnNewStatement(SemPlan.Spiral.Core.Statement s)
 {
     if (NewStatement != null)
     {
         NewStatement(s);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Method to capture the inner XsltParser new statement event and raise another to listeners of this parser
 /// </summary>
 public void XsltParserNewStatement(SemPlan.Spiral.Core.Statement s)
 {
     OnNewStatement(s);
 }
Esempio n. 4
0
 public void OnNewStatement(SemPlan.Spiral.Core.Statement s)
 {
 }