Package cz.vutbr.fit.layout.map
Class MetadataTagManager
- java.lang.Object
-
- cz.vutbr.fit.layout.map.MetadataTagManager
-
public class MetadataTagManager extends Object
Creates and reads the metadata mapping tags in the given context (subgraph).- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description MetadataTagManager(RDFArtifactRepository repo, org.eclipse.rdf4j.model.IRI contextIri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<MetaRefTag>
createTagsForExamples(Collection<Example> examples)
Creates a tag for every example.Collection<MetaRefTag>
getMetaTags()
Reads metadata tag definitions from the configured context.Collection<MetaRefTag>
checkForTags(Collection<Example> examples)
Checks whether the context contains tags for examples.void
storeTags(Collection<MetaRefTag> tags)
Stores tags to the repository.
-
-
-
Constructor Detail
-
MetadataTagManager
public MetadataTagManager(RDFArtifactRepository repo, org.eclipse.rdf4j.model.IRI contextIri)
-
-
Method Detail
-
getMetaTags
public Collection<MetaRefTag> getMetaTags() throws StorageException
Reads metadata tag definitions from the configured context.- Returns:
- A collection of metadata tags (possibly empty when no tags are defined)
- Throws:
StorageException
-
createTagsForExamples
public Collection<MetaRefTag> createTagsForExamples(Collection<Example> examples)
Creates a tag for every example.- Parameters:
examples
- a collection of examples- Returns:
- a collection of tags containing one tag for each example
-
storeTags
public void storeTags(Collection<MetaRefTag> tags) throws StorageException
Stores tags to the repository.- Parameters:
tags
-- Throws:
StorageException
-
checkForTags
public Collection<MetaRefTag> checkForTags(Collection<Example> examples)
Checks whether the context contains tags for examples. If not, the tags are created from the given examples.- Parameters:
examples
-- Returns:
- the tags found or created
-
-