Class OntologyResource
Base class for representing a resource in an Ontology.
Inherited Members
Namespace: VDS.RDF.Ontology
Assembly: dotNetRdf.Ontology.dll
Syntax
public class OntologyResource
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Constructors
| Improve this Doc View SourceOntologyResource(Uri, IGraph)
Creates a new Ontology Resource for the given Resource in the given Graph.
Declaration
protected OntologyResource(Uri resource, IGraph graph)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
IGraph | graph | Graph. |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
OntologyResource(INode, IGraph)
Creates a new Ontology Resource for the given Resource in the given Graph.
Declaration
protected OntologyResource(INode resource, IGraph graph)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
IGraph | graph | Graph. |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Fields
| Improve this Doc View Source_graph
The Graph from which this Resource originates.
Declaration
protected IGraph _graph
Field Value
Type | Description |
---|---|
IGraph |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
_literalProperties
Storage of Literal Properties.
Declaration
protected Dictionary<string, List<ILiteralNode>> _literalProperties
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<TKey, TValue><string, System.Collections.Generic.List<T><ILiteralNode>> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
_resource
The Node which this Resource is a wrapper around.
Declaration
protected INode _resource
Field Value
Type | Description |
---|---|
INode |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
_resourceProperties
Storage of Resource Properties.
Declaration
protected Dictionary<string, HashSet<INode>> _resourceProperties
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<TKey, TValue><string, System.Collections.Generic.HashSet<T><INode>> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Properties
| Improve this Doc View SourceComment
Gets the Comment(s) for the Resource.
Declaration
public IEnumerable<ILiteralNode> Comment { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ILiteralNode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
DifferentFrom
Gets the Different From(s) for the Resource.
Declaration
public IEnumerable<INode> DifferentFrom { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Graph
Gets the Graph that this Ontology Resource is from.
Declaration
public IGraph Graph { get; }
Property Value
Type | Description |
---|---|
IGraph |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
IsDefinedBy
Gets the Is Defined By(s) for the Resource.
Declaration
public IEnumerable<INode> IsDefinedBy { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Label
Gets the Label(s) for the Resource.
Declaration
public IEnumerable<ILiteralNode> Label { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ILiteralNode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Resource
Gets the Resource that this Ontology Resource refers to.
Declaration
public INode Resource { get; }
Property Value
Type | Description |
---|---|
INode |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
SameAs
Gets the Same As('s) for the Resource.
Declaration
public IEnumerable<INode> SameAs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
SeeAlso
Gets the See Also(s) for the Resource.
Declaration
public IEnumerable<INode> SeeAlso { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Triples
Gets all the Triples where the Resource occurs in any position.
Declaration
public IEnumerable<Triple> Triples { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
TriplesWithObject
Gets all the Triples from the Graph where the Resource occurs as the Object.
Declaration
public IEnumerable<Triple> TriplesWithObject { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
TriplesWithPredicate
Gets all the Triples from the Graph where the Resource occurs as the Predicate.
Declaration
public IEnumerable<Triple> TriplesWithPredicate { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
TriplesWithSubject
Gets all the Triples from the Graph where the Resource occurs as the Subject.
Declaration
public IEnumerable<Triple> TriplesWithSubject { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Types
Gets the rdf:type's for the Resource.
Declaration
public IEnumerable<INode> Types { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
VersionInfo
Gets the Version Information for the Resource.
Declaration
public IEnumerable<ILiteralNode> VersionInfo { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ILiteralNode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
Methods
| Improve this Doc View SourceAddComment(string, string)
Adds a comment in a specific language for this resource.
Declaration
public bool AddComment(string comment, string lang)
Parameters
Type | Name | Description |
---|---|---|
string | comment | Comment. |
string | lang | Language. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddComment(string)
Adds a comment for this resource.
Declaration
public bool AddComment(string comment)
Parameters
Type | Name | Description |
---|---|---|
string | comment | Comment. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddDifferentFrom(Uri)
Adds a new owl:differentFrom triple for the resource.
Declaration
public bool AddDifferentFrom(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddDifferentFrom(INode)
Adds a new owl:differentFrom triple for the resource.
Declaration
public bool AddDifferentFrom(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddDifferentFrom(OntologyResource)
Adds a new owl:differentFrom triple for the resource.
Declaration
public bool AddDifferentFrom(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This overload also adds this resource as different from the given resource.
AddIsDefinedBy(Uri)
Adds a new rdfs:isDefinedBy triple for the resource.
Declaration
public bool AddIsDefinedBy(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddIsDefinedBy(INode)
Adds a new rdfs:isDefinedBy triple for the resource.
Declaration
public bool AddIsDefinedBy(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddIsDefinedBy(OntologyResource)
Adds a new rdfs:isDefinedBy triple for the resource.
Declaration
public bool AddIsDefinedBy(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddLabel(string, string)
Adds a label in a specific language for a resource.
Declaration
public bool AddLabel(string label, string lang)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label. |
string | lang | Language. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddLabel(string)
Adds a label for the resource.
Declaration
public bool AddLabel(string label)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddLiteralProperty(string, ILiteralNode, bool)
Adds a new literal value for a property.
Declaration
public bool AddLiteralProperty(string propertyUri, ILiteralNode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
ILiteralNode | value | Literal Value. |
System.Boolean | persist | Whether the new value should be added to the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddLiteralProperty(Uri, ILiteralNode, bool)
Adds a new literal value for a property.
Declaration
public bool AddLiteralProperty(Uri propertyUri, ILiteralNode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
ILiteralNode | value | Literal Value. |
System.Boolean | persist | Whether the new value should be added to the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddResourceProperty(string, INode, bool)
Adds a new value for a property.
Declaration
public bool AddResourceProperty(string propertyUri, INode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
INode | value | Literal Value. |
System.Boolean | persist | Whether the new value should be added to the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddResourceProperty(Uri, INode, bool)
Adds a new value for a property.
Declaration
public bool AddResourceProperty(Uri propertyUri, INode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
INode | value | Literal Value. |
System.Boolean | persist | Whether the new value should be added to the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddSameAs(Uri)
Adds a new owl:sameAs triple for the resource.
Declaration
public bool AddSameAs(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddSameAs(INode)
Adds a new owl:sameAs triple for the resource.
Declaration
public bool AddSameAs(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddSameAs(OntologyResource)
Adds a new owl:sameAs triple for the resource.
Declaration
public bool AddSameAs(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This overload also adds this resource as an owl:sameAs triple for the given resource.
AddSeeAlso(Uri)
Adds a new rdfs:seeAlso triple for the resource.
Declaration
public bool AddSeeAlso(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddSeeAlso(INode)
Adds a new rdfs:seeAlso triple for the resource.
Declaration
public bool AddSeeAlso(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddSeeAlso(OntologyResource)
Adds a new rdfs:seeAlso triple for the resource.
Declaration
public bool AddSeeAlso(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddType(Uri)
Adds a new rdf:type triple for the resource.
Declaration
public bool AddType(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddType(INode)
Adds a new rdf:type triple for the resource.
Declaration
public bool AddType(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddType(OntologyResource)
Adds a new rdf:type triple for the resource.
Declaration
public bool AddType(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AddVersionInfo(string)
Adds version information for the resource.
Declaration
public bool AddVersionInfo(string info)
Parameters
Type | Name | Description |
---|---|---|
string | info | Version Information. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
AsClass()
Casts a Resource into an Ontology Class.
Declaration
public OntologyClass AsClass()
Returns
Type | Description |
---|---|
OntologyClass |
Remarks
Anything may be cast to a OntologyClass regardless of whether it actually represents a class in the ontology.
AsProperty()
Casts a Resource into an Ontology Property.
Declaration
public OntologyProperty AsProperty()
Returns
Type | Description |
---|---|
OntologyProperty |
Remarks
Anything may be cast to a OntologyProperty regardless of whether it actually represents a property in the ontology.
ClearComments()
Removes all comments for this resource.
Declaration
public bool ClearComments()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearDifferentFrom()
Clears all owl:differentFrom triples for the resource.
Declaration
public bool ClearDifferentFrom()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearIsDefinedBy()
Removes all rdfs:isDefinedBy triples for the resource.
Declaration
public bool ClearIsDefinedBy()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearLabels()
Clears all labels for a resource.
Declaration
public bool ClearLabels()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearLiteralProperty(string, bool)
Clears all values for a Literal Property.
Declaration
public bool ClearLiteralProperty(string propertyUri, bool persist)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
System.Boolean | persist | Whether the removed values are removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearLiteralProperty(Uri, bool)
Clears all values for a Literal Property.
Declaration
public bool ClearLiteralProperty(Uri propertyUri, bool persist)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
System.Boolean | persist | Whether the removed values are removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearResourceProperty(string, bool)
Clears all values for a Resource Property.
Declaration
public bool ClearResourceProperty(string propertyUri, bool persist)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
System.Boolean | persist | Whether the removed values are removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearResourceProperty(Uri, bool)
Clears all values for a Resource Property.
Declaration
public bool ClearResourceProperty(Uri propertyUri, bool persist)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
System.Boolean | persist | Whether the removed values are removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearSameAs()
Removes all owl:sameAs triples for the resource.
Declaration
public bool ClearSameAs()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearSeeAlso()
Removes all rdfs:seeAlso triples for the resource.
Declaration
public bool ClearSeeAlso()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearTypes()
Removes all rdf:type triples for the resource.
Declaration
public bool ClearTypes()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ClearVersionInfo()
Clears version information for the resource.
Declaration
public bool ClearVersionInfo()
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
GetLiteralProperty(string)
Gets the values for a property which is restricted to literals.
Declaration
public IEnumerable<ILiteralNode> GetLiteralProperty(string propertyUri)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ILiteralNode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
GetLiteralProperty(Uri)
Gets the values for a property which is restricted to literals.
Declaration
public IEnumerable<ILiteralNode> GetLiteralProperty(Uri propertyUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ILiteralNode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
GetResourceProperty(string)
Gets the values for a property which can be any node type.
Declaration
public IEnumerable<INode> GetResourceProperty(string propertyUri)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
GetResourceProperty(Uri)
Gets the values for a property which can be any node type.
Declaration
public IEnumerable<INode> GetResourceProperty(Uri propertyUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><INode> |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
IntialiseProperty(string, bool)
Retrieves all the Triples which have the Resource as the subject and the given property URI as the predicate from the Graph and stores the values locally.
Declaration
protected void IntialiseProperty(string propertyUri, bool requireLiteral)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
System.Boolean | requireLiteral | Whether only Literal values are acceptable. |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveComment(string, string)
Removes a comment in a specific language for this resource.
Declaration
public bool RemoveComment(string comment, string lang)
Parameters
Type | Name | Description |
---|---|---|
string | comment | Comment. |
string | lang | Language. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveComment(string)
Removes a comment for this resource.
Declaration
public bool RemoveComment(string comment)
Parameters
Type | Name | Description |
---|---|---|
string | comment | Comment. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveComment(ILiteralNode)
Removes a comment for this resource.
Declaration
public bool RemoveComment(ILiteralNode comment)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | comment | Comment. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveDifferentFrom(Uri)
Removes a owl:differentFrom triple for the resource.
Declaration
public bool RemoveDifferentFrom(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveDifferentFrom(INode)
Removes a owl:differentFrom triple for the resource.
Declaration
public bool RemoveDifferentFrom(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveDifferentFrom(OntologyResource)
Removes a owl:differentFrom triple for the resource.
Declaration
public bool RemoveDifferentFrom(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This overload also removes this resource as different from the given resource.
RemoveIsDefinedBy(Uri)
Removes a rdfs:isDefinedBy triple for the resource.
Declaration
public bool RemoveIsDefinedBy(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveIsDefinedBy(INode)
Removes a rdfs:isDefinedBy triple for the resource.
Declaration
public bool RemoveIsDefinedBy(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveIsDefinedBy(OntologyResource)
Removes a rdfs:isDefinedBy triple for the resource.
Declaration
public bool RemoveIsDefinedBy(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveLabel(string, string)
Removes a label in a specific language for a resource.
Declaration
public bool RemoveLabel(string label, string lang)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label. |
string | lang | Language. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveLabel(string)
Removes a label for a resource.
Declaration
public bool RemoveLabel(string label)
Parameters
Type | Name | Description |
---|---|---|
string | label | Label. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveLabel(ILiteralNode)
Removes a specific label for a resource.
Declaration
public bool RemoveLabel(ILiteralNode label)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | label | Label. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveLiteralProperty(string, ILiteralNode, bool)
Removes a literal value for a property.
Declaration
public bool RemoveLiteralProperty(string propertyUri, ILiteralNode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
ILiteralNode | value | Value to remove. |
System.Boolean | persist | Whether the removed value is removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveLiteralProperty(Uri, ILiteralNode, bool)
Removes a literal value for a property.
Declaration
public bool RemoveLiteralProperty(Uri propertyUri, ILiteralNode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
ILiteralNode | value | Value to remove. |
System.Boolean | persist | Whether the removed value is removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveResourceProperty(string, INode, bool)
Removes a value for a property.
Declaration
public bool RemoveResourceProperty(string propertyUri, INode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
string | propertyUri | Property URI. |
INode | value | Value to remove. |
System.Boolean | persist | Whether the removed value is removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveResourceProperty(Uri, INode, bool)
Removes a value for a property.
Declaration
public bool RemoveResourceProperty(Uri propertyUri, INode value, bool persist)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | propertyUri | Property URI. |
INode | value | Value to remove. |
System.Boolean | persist | Whether the removed value is removed from the Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveSameAs(Uri)
Removes a owl:sameAs triple for the resource.
Declaration
public bool RemoveSameAs(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveSameAs(INode)
Removes a owl:sameAs triple for the resource.
Declaration
public bool RemoveSameAs(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveSameAs(OntologyResource)
Removes a owl:sameAs triple for the resource.
Declaration
public bool RemoveSameAs(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
This overload also removes the owl:sameAs triple for the given resource.
RemoveSeeAlso(Uri)
Removes a rdfs:seeAlso triple for the resource.
Declaration
public bool RemoveSeeAlso(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveSeeAlso(INode)
Removes a rdfs:seeAlso triple for the resource.
Declaration
public bool RemoveSeeAlso(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveSeeAlso(OntologyResource)
Removes a rdfs:seeAlso triple for the resource.
Declaration
public bool RemoveSeeAlso(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveType(Uri)
Removes a rdf:type triple for the resource.
Declaration
public bool RemoveType(Uri resource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveType(INode)
Removes a rdf:type triple for the resource.
Declaration
public bool RemoveType(INode resource)
Parameters
Type | Name | Description |
---|---|---|
INode | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveType(OntologyResource)
Removes a rdf:type triple for the resource.
Declaration
public bool RemoveType(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveVersionInfo(string)
Remove version information for the resource.
Declaration
public bool RemoveVersionInfo(string info)
Parameters
Type | Name | Description |
---|---|---|
string | info | Version Information. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
RemoveVersionInfo(ILiteralNode)
Remove version information for the resource.
Declaration
public bool RemoveVersionInfo(ILiteralNode info)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | info | Version Information. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
See Using the Ontology API for some informal documentation on the use of the Ontology namespace.
ToString()
Gets the String representation of the Resource.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
This is either the first label (if any are declared) or the string representation of the INode that this resource wraps.
Operators
| Improve this Doc View Sourceexplicit operator Graph(OntologyResource)
Casts a Resource into a Graph.
Declaration
public static explicit operator Graph(OntologyResource resource)
Parameters
Type | Name | Description |
---|---|---|
OntologyResource | resource | Resource. |
Returns
Type | Description |
---|---|
Graph |
Remarks
Equivalent to doing a SPARQL DESCRIBE query on this resource.