Class LiteralExtractorAllAnnotationProperties
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.literalExtractors.LiteralExtractorAllAnnotationProperties
- All Implemented Interfaces:
LiteralExtractor
All annotation properties are followed (recursively).
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
@NotNull Set<org.apache.jena.rdf.model.Literal>
extract
(org.apache.jena.rdf.model.Resource resource) Given a jena resourcer
, it extracts the literals which are usually helpful for matching.private static @NotNull Set<org.apache.jena.rdf.model.Literal>
getAnnotationPropertiesRecursionDeadLockSafe
(org.apache.jena.rdf.model.Resource resource, int recursionDepth) Infinity loop save version of getAnnotationProperties.private static org.apache.jena.rdf.model.Literal
getLabelOrFragmentWithoutLanguageAnnotation
(org.apache.jena.rdf.model.Resource resource) Returns the label.int
hashCode()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
LiteralExtractorAllAnnotationProperties
public LiteralExtractorAllAnnotationProperties()
-
-
Method Details
-
extract
@NotNull public @NotNull Set<org.apache.jena.rdf.model.Literal> extract(org.apache.jena.rdf.model.Resource resource) Description copied from interface:LiteralExtractor
Given a jena resourcer
, it extracts the literals which are usually helpful for matching. It does not do any tokenization nor transformation.- Specified by:
extract
in interfaceLiteralExtractor
- Parameters:
resource
- the jena resource to extract the literals (which describe this resource).- Returns:
- a set of literals which describes the resource.
-
getAnnotationPropertiesRecursionDeadLockSafe
@NotNull private static @NotNull Set<org.apache.jena.rdf.model.Literal> getAnnotationPropertiesRecursionDeadLockSafe(org.apache.jena.rdf.model.Resource resource, int recursionDepth) Infinity loop save version of getAnnotationProperties. Always call the latter one to guarantee thread safety. Do not call this method directly but rather its wrapperextract(Resource)
.- Parameters:
resource
- The resource to be used for lookup.recursionDepth
- The current recursion depth. Initialize with 0.- Returns:
- A set of annotation property values (String).
-
getLabelOrFragmentWithoutLanguageAnnotation
private static org.apache.jena.rdf.model.Literal getLabelOrFragmentWithoutLanguageAnnotation(org.apache.jena.rdf.model.Resource resource) Returns the label. If it does not exist: local name.- Parameters:
resource
- The resource for which a string shall be retrieved.- Returns:
- Label or local name. Null if resource is anonymous.
-
hashCode
public int hashCode() -
equals
-