SemanticSearchImplementation
|
Provides all necessary queries to the RDF database to create a mapping of metadata graphs into a document. More...
Public Types | |
enum | ApplicationProfileType { ApplicationProfileType.CLASS, ApplicationProfileType.INTEGER, ApplicationProfileType.DATE, ApplicationProfileType.STRING, ApplicationProfileType.BOOLEAN } |
Represents the data types used in the application profiles. More... | |
Public Member Functions | |
RdfClient (IRdfConnector client, string language) | |
string | GetLanguage () |
string | GetApplicationProfileOfMetadata (string graphName) |
Returns the corresponding application profile of a metadata graph. More... | |
void | MarkGraphAsDeleted (string graphName) |
Marks the metadata graph as deleted. More... | |
IEnumerable< string > | GetDirectClasses (string instance) |
Queries the direct classes (without inference and hierarchy) of an instance. More... | |
IList< string > | GetParentClasses (IEnumerable< string > classes) |
Queries the parent classes of the given classes. More... | |
IEnumerable< string > | GetProperties () |
Queries all properties (metadata fields) used in the available application profiles. More... | |
IEnumerable< IEnumerable< string > > | GetAllMetadataIds () |
Queries the IDs of all available metadata graphs in the knowledge graph. More... | |
string | GetRdfsLabel (string uri) |
Queries the rdfs:label of an URI. More... | |
IEnumerable< string > | GetProjectsOfUser (string user) |
Queries the project IDs a user belongs to. More... | |
IEnumerable< string > | GetApplicationProfilesNamesOfProperty (string property) |
Queries the sh:names of a property in all available application profiles. More... | |
ApplicationProfileType | GetTypeOfProperty (string property) |
Queries the application profile data type of a property. More... | |
ApplicationProfileType | GetDataType (string type) |
Maps the XSD data types to the corresponding application profile type. More... | |
int | GetCurrentIndexVersion () |
Queries the current index version. More... | |
void | SetCurrentIndexVersion (int newVersion) |
Updates the current index version. More... | |
Dictionary< string, LiteralRule > | ConstructLiteralRules (string graphName) |
Queries all literal rules of a specific named graph. More... | |
IEnumerable< AdditionalRule > | ConstructAdditionalRules (string graphName) |
QUeries all additional rules of a specific named graph. More... | |
string | GuessLabel (string element) |
Help function to guess label based on the URI. More... | |
IEnumerable< Triple > | GetTriplesFromGraph (string graphName) |
Returns triples of a graph. More... | |
IDictionary< string, JObject > | CreateFieldsFromAdditionalRule (string graphName, SpecificApplicationProfile profile, ElasticsearchIndexMapper indexMapper, bool changeOtherDocs=false) |
Creates additional key value pairs for a metadata graph resulting through execution of the additional rules. More... | |
JObject | CreateFields (IEnumerable< Triple > triples, SpecificApplicationProfile profile, ElasticsearchIndexMapper indexMapper) |
Creates key value pairs from the given triples. More... | |
Static Public Attributes | |
const string | LABEL_LITERAL_RULE = "instance" |
const string | LABEL_ADDITIONAL_RULE = "graph" |
Private Member Functions | |
IDictionary< string, string > | GetPrefixesOfGraph (string graphName, string prefixName) |
Queries all prefix definitions in a specific graph and of a specific prefix rule. More... | |
Private Attributes | |
readonly IRdfConnector | _connector |
readonly DataTypeParser | _dataTypeParser |
readonly string | _language |
readonly SparqlParameterizedString | _queryString |
Static Private Attributes | |
const int | QUERY_LIMIT = 1000 |
const string | PLACEHOLDER = "$this" |
Provides all necessary queries to the RDF database to create a mapping of metadata graphs into a document.
|
inline |
|
inline |
QUeries all additional rules of a specific named graph.
graphName | Name of the graph. |
|
inline |
Queries all literal rules of a specific named graph.
graphName | Name of the graph. |
|
inline |
Creates key value pairs from the given triples.
triples | An enumerator of triples which needs to be parsed. |
profile | The application profile which the triples belong to. |
indexMapper | The ElasticsearchIndexMapper . |
|
inline |
Creates additional key value pairs for a metadata graph resulting through execution of the additional rules.
Additional rules can influcence other existing metadata graphs.
graphName | ID of metadata graph. |
profile | Application profile of metadata graph. |
indexMapper | The ElasticsearchIndexMapper . |
changeOtherDocs | Flag which indicates if fields for influcenced documents should be created. |
|
inline |
Queries the IDs of all available metadata graphs in the knowledge graph.
|
inline |
Returns the corresponding application profile of a metadata graph.
graphName | ID of the metadata graph. |
|
inline |
Queries the sh:names of a property in all available application profiles.
property | A string representation of a property URI. |
|
inline |
Queries the current index version.
|
inline |
Maps the XSD data types to the corresponding application profile type.
type | XSD data type. |
|
inline |
Queries the direct classes (without inference and hierarchy) of an instance.
instance | String representation of an instance URI. |
string SemanticSearchImplementation.RdfClient.GetLanguage | ( | ) |
|
inline |
Queries the parent classes of the given classes.
classes | A list of classes (string representation of the URIs). |
|
inlineprivate |
Queries all prefix definitions in a specific graph and of a specific prefix rule.
graphName | Name of the graph. |
prefixName | Name of the prefix rule. |
|
inline |
Queries the project IDs a user belongs to.
user | A user. |
|
inline |
Queries all properties (metadata fields) used in the available application profiles.
|
inline |
Queries the rdfs:label of an URI.
uri | A string representation of an URI. |
|
inline |
Returns triples of a graph.
graphName | ID of the graph. |
|
inline |
Queries the application profile data type of a property.
Properties that have different data types (due to different profiles) are first defined as a class that maps to text.
property | String representatrion og a properties URI. |
|
inline |
Help function to guess label based on the URI.
element | String representation of an URI. |
|
inline |
Marks the metadata graph as deleted.
graphName | ID of the metadata graph. |
|
inline |
Updates the current index version.
newVersion | New index version. |
|
private |
|
private |
|
private |
|
private |
|
static |
|
static |
|
staticprivate |
|
staticprivate |