public class MemoryCache extends ACache
| Modifier and Type | Field and Description |
|---|---|
protected Iterator<Instance> |
instanceIterator |
protected HashMap<String,Instance> |
instanceMap |
| Constructor and Description |
|---|
MemoryCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(Instance i) |
ACache |
addProperty(String sourcePropertyName,
String targetPropertyName,
String processingChain)
Method to process data of a property into a new property with specific preprocessing.
|
void |
addTriple(String s,
String p,
String o)
Adds a new spo statement to the cache
|
MemoryCache |
clone()
Ignores instanceIterator since there is no sane way to test the equality of iterators
|
boolean |
containsInstance(Instance i) |
boolean |
containsUri(String uri) |
boolean |
equals(Object obj) |
ArrayList<Instance> |
getAllInstances()
Returns all the instance contained in the cache
|
Set<String> |
getAllProperties()
Returns a set of properties (most likely) all instances have.
|
ArrayList<String> |
getAllUris() |
Instance |
getInstance(String uri) |
Instance |
getNextInstance()
Returns the next instance in the list of instances
|
ACache |
getSample(int size) |
int |
hashCode() |
org.apache.jena.rdf.model.Model |
parseCSVtoRDFModel(String baseURI,
String IDbaseURI,
String rdfType)
Basic method to create a JENA Model out of a cache.
|
void |
replaceInstance(String uri,
Instance a) |
void |
resetIterator() |
int |
size() |
String |
toString() |
public Instance getNextInstance()
getNextInstance in class ACachepublic ArrayList<Instance> getAllInstances()
getAllInstances in class ACachepublic void addInstance(Instance i)
addInstance in class ACachepublic Instance getInstance(String uri)
getInstance in class ACacheuri - URI to look forpublic boolean containsInstance(Instance i)
containsInstance in class ACachei - The instance to look forpublic boolean containsUri(String uri)
containsUri in class ACacheuri - The URI to looks forpublic void resetIterator()
resetIterator in class ACachepublic ArrayList<String> getAllUris()
getAllUris in class ACachepublic ACache addProperty(String sourcePropertyName, String targetPropertyName, String processingChain)
ACacheaddProperty in class ACachesourcePropertyName - Name of the property to process.targetPropertyName - Name of the new property to process data into.processingChain - Preprocessing Expression.public Set<String> getAllProperties()
getAllProperties in class ACachepublic void replaceInstance(String uri, Instance a)
replaceInstance in class ACachepublic org.apache.jena.rdf.model.Model parseCSVtoRDFModel(String baseURI, String IDbaseURI, String rdfType)
ACacheparseCSVtoRDFModel in class ACachebaseURI - Base URI of properties, could be empty.IDbaseURI - Base URI for id of resources: URI(instance) := IDbaseURI+instance.getID(). Could be empty.rdfType - rdf:Type of the instances.public MemoryCache clone()
Copyright © 2020. All rights reserved.