You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A project I'm working on needs two additional methods as shown in the code below, with some slight impact on MagmaCoreDatabase and its implementers.
The first method is useful for finding all items with a certain predicate, such as HQDM.ENTITY_NAME, HQDM.MEMBER_OF_KIND, or RDFS.RDF_TYPE
The second method is a more specific version on the first for finding objects of a specific RDFS.RDF_TYPE or members of a specific kind etc.
/** * Find objects by a predicate. * * @param <T> HQDM entity type. * @param predicate the predicate {@link HqdmIri} * @return a List of {@link Thing} that were found. */public <TextendsThing> List<T> findByPredicateIriOnly(finalIRIpredicate) {
finalList<T> searchResult = (List<T>) database.findByPredicateIriOnly(predicate);
returnsearchResult;
}
/** * Find objects by a predicate value. * * @param <T> HQDM entity type. * @param predicate the predicate {@link IRI} * @param value The value of the predicate. * @return a List of {@link Thing} that were found. */public <TextendsThing> List<T> findByPredicateIriAndValue(finalIRIpredicate, finalObjectvalue) {
finalList<T> searchResult = (List<T>) database.findByPredicateIriAndValue(predicate, value);
returnsearchResult;
}
The text was updated successfully, but these errors were encountered:
A project I'm working on needs two additional methods as shown in the code below, with some slight impact on
MagmaCoreDatabase
and its implementers.HQDM.ENTITY_NAME
,HQDM.MEMBER_OF_KIND
, orRDFS.RDF_TYPE
RDFS.RDF_TYPE
or members of a specifickind
etc.The text was updated successfully, but these errors were encountered: