Пример #1
0
 private void miniRdfXmlChild(IElement node, RDFTerm subject, string language)
 {
     string nsname=node.getNamespaceURI();
     if(node.getAttribute("xml:lang")!=null){
       language=node.getAttribute("xml:lang");
     }
     string localname=node.getLocalName();
     RDFTerm predicate=relativeResolve(nsname+localname);
     if(!hasNonTextChildNodes(node)){
       string content=getTextNodeText(node);
       RDFTerm literal;
       if(!string.IsNullOrEmpty(language)){
     literal=RDFTerm.fromLangString(content, language);
       } else {
     literal=RDFTerm.fromTypedString(content);
       }
       outputGraph.Add(new RDFTriple(subject,predicate,literal));
     } else {
       string parseType=node.getAttributeNS(RDF_NAMESPACE, "parseType");
       if("Literal".Equals(parseType))
     throw new NotSupportedException();
       RDFTerm blank=generateBlankNode();
       context.language=language;
       miniRdfXml(node,context,blank);
       outputGraph.Add(new RDFTriple(subject,predicate,blank));
     }
 }