public class Category extends Object implements Serializable, Comparable<Category>
| Constructor and Description |
|---|
Category(String thename)
Creates a new category of entities.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNamedEntity(String namedEntity)
Adds a named entity in the category.
|
int |
compareTo(Category n) |
ArrayList<Triple> |
getAssociations()
Returns the associations of the category's entities.
|
String |
getEndpoint()
Returns the SPARQL endpoint of the category.
|
String |
getEnrichingTemplateQuery()
Returns the enriching template query.
|
String |
getLinkingTemplateQuery()
Returns the template query of the category.
|
String |
getName()
Returns the name of the category.
|
TreeSet<String> |
getNamedEntities()
Returns the named entities of that category.
|
double |
getRank()
Returns the rank of the category.
|
String |
getResourceClass()
Returns the resource class of the category.
|
String |
getSparqlQuery()
Returns the SPARQL query that user gives manually for getting the named
entities.
|
String |
getSparqlQueryFilepathOfEntities()
Returns the SPARQL query for getting the named entities.
|
void |
retrieveNamedEntitiesByQuery()
Retrieves all entities of the SPARQL query
(sparqlQueryFilepathOfEntities) from the category's SPARQL endpoint.
|
void |
retrieveNamedEntitiesByResourceClass()
Retrieves all instances of the category's resource class from the
category's SPARQL endpoint.
|
void |
setAssociations(ArrayList<Triple> associations)
Sets/Changes the associations of the category's entities.
|
void |
setEndpoint(String endpoint)
Sets/changes the SPARQL endpoint of the category.
|
void |
setEndpointPermanent(String endpoint,
EntityMiningComponent emc)
Sets/changes the SPARQL endpoint of the category in the x-link.properties
file.
|
void |
setEnrichingQueryPermanent(String templateQuery,
EntityMiningComponent emc)
Sets/changes the enriching template query of the category in the
x-link.properties file.
|
void |
setEnrichingTemplateQuery(String enrichingQuery)
Sets/Changes the enriching template query.
|
void |
setLinkingQueryPermanent(String templateQuery,
EntityMiningComponent emc)
Sets/changes the linking template query of the category in the
x-link.properties file.
|
void |
setLinkingTemplateQuery(String templateQuery)
Sets/changes the template query of the category.
|
void |
setName(String thename)
Changes the name of the category.
|
void |
setNamedEntities(TreeSet<String> namedEntities)
Sets/changes the named entities of that category.
|
void |
setRank(double rank)
Sets/Changes the rank of the category.
|
void |
setResourceClass(String resourceClass)
Sets/changes the resource class of the category.
|
void |
setResourceClassPermanent(String resourceClass,
EntityMiningComponent emc)
Sets/changes the resource class of the category in the x-link.properties
file.
|
void |
setSparqlQuery(String sparqlQuery)
Sets/changes the SPARQL query that user gives manually for getting the
named entities.
|
void |
setSparqlQueryFilepathOfEntities(String sparqlQueryOfEntities)
Sets/changes the SPARQL query for getting the named entities.
|
void |
setSparqlQueryFilepathOfEntitiesPermanent(String sparqlQueryOfEntities,
EntityMiningComponent emc)
Sets/changes the SPARQL query for getting the named entities in the
x-link.properties file.
|
String |
toString() |
public Category(String thename)
thename - The name of the category.public String getEnrichingTemplateQuery()
public void setEnrichingTemplateQuery(String enrichingQuery) throws FileNotFoundException
enrichingQuery - The enriching template query.FileNotFoundExceptionpublic String getName()
public void setName(String thename)
thename - The name of the category.public double getRank()
public void setRank(double rank)
rank - The rank of the category.public ArrayList<Triple> getAssociations()
public void setAssociations(ArrayList<Triple> associations)
associations - The associations of the category's entities .public String getResourceClass()
public void setResourceClass(String resourceClass) throws MalformedURLException, URISyntaxException
resourceClass - The resource class of the category.MalformedURLExceptionURISyntaxExceptionpublic void setResourceClassPermanent(String resourceClass, EntityMiningComponent emc) throws MalformedURLException, URISyntaxException, IOException, CategoryNotFoundException
resourceClass - The resource class of the category.emc - The entity mining component.MalformedURLExceptionURISyntaxExceptionIOExceptionCategoryNotFoundExceptionpublic String getEndpoint()
public void setEndpoint(String endpoint) throws MalformedURLException, URISyntaxException
endpoint - The SPARQL endpoint of the category.MalformedURLExceptionURISyntaxExceptionpublic void setEndpointPermanent(String endpoint, EntityMiningComponent emc) throws MalformedURLException, URISyntaxException, IOException, CategoryNotFoundException
endpoint - The new SPARQL endpoint of the category.emc - The entity mining component.MalformedURLExceptionURISyntaxExceptionIOExceptionCategoryNotFoundExceptionpublic String getLinkingTemplateQuery()
public void setLinkingTemplateQuery(String templateQuery) throws FileNotFoundException
templateQuery - The template query of the category.FileNotFoundExceptionpublic void setLinkingQueryPermanent(String templateQuery, EntityMiningComponent emc) throws FileNotFoundException, IOException, CategoryNotFoundException, MalformedURLException, URISyntaxException
templateQuery - The template query of the category.emc - The entity mining component.FileNotFoundExceptionIOExceptionCategoryNotFoundExceptionMalformedURLExceptionURISyntaxExceptionpublic void setEnrichingQueryPermanent(String templateQuery, EntityMiningComponent emc) throws FileNotFoundException, IOException, CategoryNotFoundException, MalformedURLException, URISyntaxException
templateQuery - The template query of the category.emc - The entity mining component.FileNotFoundExceptionIOExceptionCategoryNotFoundExceptionMalformedURLExceptionURISyntaxExceptionpublic TreeSet<String> getNamedEntities()
public void setNamedEntities(TreeSet<String> namedEntities)
namedEntities - The named entities of that category.public void addNamedEntity(String namedEntity)
namedEntity - The named entity.public String getSparqlQueryFilepathOfEntities()
public String getSparqlQuery()
public void setSparqlQueryFilepathOfEntities(String sparqlQueryOfEntities) throws FileNotFoundException
sparqlQueryOfEntities - The SPARQL query for getting the named
entities.FileNotFoundExceptionpublic void setSparqlQuery(String sparqlQuery)
sparqlQuery - The SPARQL query that user gives manually for getting
the named entities.public void setSparqlQueryFilepathOfEntitiesPermanent(String sparqlQueryOfEntities, EntityMiningComponent emc) throws FileNotFoundException, IOException, CategoryNotFoundException, MalformedURLException, URISyntaxException
sparqlQueryOfEntities - The SPARQL query for getting the named
entities.emc - The entity mining component.FileNotFoundExceptionIOExceptionCategoryNotFoundExceptionMalformedURLExceptionURISyntaxExceptionpublic void retrieveNamedEntitiesByResourceClass()
public void retrieveNamedEntitiesByQuery()
public int compareTo(Category n)
compareTo in interface Comparable<Category>Copyright © 2014. All rights reserved.