Search in sources :

Example 1 with CollectionId

use of edu.stanford.bmir.protege.web.shared.collection.CollectionId in project webprotege by protegeproject.

the class CollectionViewPlaceTokenizer method getPlace.

@Override
public CollectionViewPlace getPlace(String token) {
    MatchResult result = regExp.exec(token);
    ProjectId projectId = ProjectId.get(result.getGroup(1));
    CollectionId collectionId = CollectionId.get(result.getGroup(2));
    FormId formId = new FormId(result.getGroup(3));
    String selectionString = result.getGroup(5);
    GWT.log("[CollectionViewPlaceTokenizer] Selection string: " + selectionString);
    Optional<CollectionItem> selection = Optional.ofNullable(selectionString).map(CollectionItem::get);
    return new CollectionViewPlace(projectId, collectionId, formId, selection);
}
Also used : CollectionId(edu.stanford.bmir.protege.web.shared.collection.CollectionId) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) CollectionViewPlace(edu.stanford.bmir.protege.web.shared.place.CollectionViewPlace) FormId(edu.stanford.bmir.protege.web.shared.form.FormId) CollectionItem(edu.stanford.bmir.protege.web.shared.collection.CollectionItem) MatchResult(com.google.gwt.regexp.shared.MatchResult)

Aggregations

MatchResult (com.google.gwt.regexp.shared.MatchResult)1 CollectionId (edu.stanford.bmir.protege.web.shared.collection.CollectionId)1 CollectionItem (edu.stanford.bmir.protege.web.shared.collection.CollectionItem)1 FormId (edu.stanford.bmir.protege.web.shared.form.FormId)1 CollectionViewPlace (edu.stanford.bmir.protege.web.shared.place.CollectionViewPlace)1 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)1