C# Class RDFSharp.Model.RDFXml

RDFXml is responsible for managing serialization to and from XML data format.
Mostra file Open project: mdesalvo/RDFSharp Class Usage Examples

Private Methods

Method Description
CheckIfRdfContainerNode ( XmlNode containerNode ) : System.Boolean

Verify if we are on a standard rdf:[Bag|Seq|Alt] element

CheckIfRdfDescriptionNode ( XmlNode subjNode ) : System.Boolean

Verify if we are on a standard rdf:Description element

Deserialize ( Stream inputStream ) : RDFGraph

Deserializes the given Xml stream to a graph.

Deserialize ( String filepath ) : RDFGraph

Deserializes the given Xml filepath to a graph.

GenerateNamespace ( String namespaceString, System.Boolean isDatatypeNamespace ) : RDFNamespace

Generates an automatic prefix for a namespace

GetAutomaticNamespaces ( RDFGraph graph ) : List

Gets the list of automatic namespaces used within the predicates of the triples of the given graph

GetContainerNode ( XmlNode predNode ) : XmlNode

Given an element, return the child element which can correspond to the RDF container

GetParseTypeCollectionAttribute ( XmlNode predNode ) : XmlAttribute

Given an element, return the attribute which can correspond to the RDF parseType "Collection"

GetParseTypeLiteralAttribute ( XmlNode predNode ) : XmlAttribute

Given an element, return the attribute which can correspond to the RDF parseType "Literal"

GetRdfAboutAttribute ( XmlNode subjNode ) : XmlAttribute

Given an element, return the attribute which can correspond to the RDF subj

GetRdfDatatypeAttribute ( XmlNode predNode ) : XmlAttribute

Given an element, return the attribute which can correspond to the RDF typed literal datatype

GetRdfResourceAttribute ( XmlNode predNode ) : XmlAttribute

Given an element, return the attribute which can correspond to the RDF object

GetRdfRootNode ( XmlDocument xmlDoc, XmlNamespaceManager nsMgr ) : XmlNode

Gives the "rdf:RDF" root node of the document

GetSubjectNode ( XmlNode subjNode, Uri xmlBase, RDFGraph result ) : RDFResource

Gives the subj node extracted from the attribute list of the current element

GetXmlLangAttribute ( XmlNode predNode ) : XmlAttribute

Given an element, return the attribute which can correspond to the RDF plain literal language

GetXmlnsNamespaces ( XmlNode rdfRDF, XmlNamespaceManager nsMgr ) : XmlAttributeCollection

Gives the collection of "xmlns" attributes of the "rdf:RDF" root node

ParseCollectionElements ( Uri xmlBase, XmlNode predNode, RDFResource subj, RDFResource pred, RDFGraph result ) : void

Given an attribute representing a RDF collection, iterates on its constituent elements to build its standard reification triples.

ParseContainerElements ( RDFModelEnums contType, XmlNode container, RDFResource subj, RDFResource pred, RDFGraph result ) : void

Given an element representing a RDF container, iterates on its constituent elements to build its standard reification triples.

ReconstructCollection ( RDFGraphMetadata rdfGraphMetadata, RDFResource tripleObject, XmlDocument rdfDoc ) : List

Given the metadata of a graph and a collection resource, it reconstructs the RDF collection and returns it as a list of nodes This is needed for building the " rdf:parseType=Collection>" RDF/XML abbreviation goody for collections of resources

ResolveRelativeNode ( XmlAttribute attr, Uri xmlBase ) : String

Checks if the given attribute is absolute Uri, relative Uri, "rdf:ID" relative Uri, "rdf:nodeID" blank node Uri

Serialize ( RDFGraph graph, Stream outputStream ) : void

Serializes the given graph to the given stream using XML data format.

Serialize ( RDFGraph graph, String filepath ) : void

Serializes the given graph to the given filepath using XML data format.