gpt4 book ai didi

pl.edu.icm.yadda.service2.YaddaError.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 00:48:40 28 4
gpt4 key购买 nike

本文整理了Java中pl.edu.icm.yadda.service2.YaddaError.<init>()方法的一些代码示例,展示了YaddaError.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YaddaError.<init>()方法的具体详情如下:
包路径:pl.edu.icm.yadda.service2.YaddaError
类名称:YaddaError
方法名:<init>

YaddaError.<init>介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.yadda/yadda-aas2-common

@Override
public GetKeywordObjectResponse getObject(TypedKeywordObjectRequest request) {
  if (authorizeAccessInViewMode) {
    String message = "VIEW operation mode authorization is not implemented yet!";
    log.error(message);
    return new GetKeywordObjectResponse(
        new YaddaError(DEFAULT_ERROR_CODE, message));
  } else {
    return service.getObject(request);
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aas2-common

@Override
public ListCollectionsResponse listCollections(
    ListCollectionsRequest request) {
  if (authorizeAccessInViewMode) {
    String message = "VIEW operation mode authorization is not implemented yet!";
    log.error(message);
    return new ListCollectionsResponse(
        new YaddaError(DEFAULT_ERROR_CODE, message));
  } else {
    return service.listCollections(request);
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aas2-common

@Override
public ListKeywordsValuesResponse listKeywordsValues(
    ListKeywordsRequest request) {
  if (authorizeAccessInViewMode) {
    String message = "VIEW operation mode authorization is not implemented yet!";
    log.error(message);
    return new ListKeywordsValuesResponse(
        new YaddaError(DEFAULT_ERROR_CODE, message));
  } else {
    return service.listKeywordsValues(request);
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aas2-common

@Override
public ObjectResponse<Integer> countKeywords(ListKeywordsRequest request) {
  if (authorizeAccessInViewMode) {
    String message = "VIEW operation mode authorization is not implemented yet!";
    log.error(message);
    return new ObjectResponse<Integer>(new YaddaError(DEFAULT_ERROR_CODE, message));
  } else {
    return service.countKeywords(request);
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aas2-common

@Override
public ListKeywordsResponse listKeywords(ListKeywordsRequest request) {
  if (authorizeAccessInViewMode) {
    String message = "VIEW operation mode authorization is not implemented yet!";
    log.error(message);
    return new ListKeywordsResponse(
        new YaddaError(DEFAULT_ERROR_CODE, message));
  } else {
    return service.listKeywords(request);
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aal

public GroupListResponse loadGroups() {
  try {
    List<Group> list = new LinkedList<Group>();
    
    Iterator<Group> it = authenticationDAO.getGroupsIterator();
    while (it.hasNext()) {
      list.add(it.next());
    }
    return new GroupListResponse(list);
  } catch (Exception e) {
    return new GroupListResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-solr

@Override
public GenericResponse removeFilterDefinition(final ParameterRequest<String> request) {
  GenericResponse result;
  try {
    filterManager.removeFilter(request.getParameter());
    result = new GenericResponse();
  } catch (final Exception e) {
    log.error(e.getMessage(), e);
    result = new GenericResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
  return result;
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aal

public UserListResponse loadUsers(IdListRequest request) {
  
  try {
    
    List<User> users = new LinkedList<User>();
    for (String id : request.getObject()) {
      User user = authenticationDAO.getUserById(id);
      if (user != null) users.add(user);
    }
    return new UserListResponse(users);
  
  } catch (Exception e) {
    return new UserListResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
  
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aal

public GenericResponse storeRole(RoleRequest request) {
  try {
    Role role = request.getObject();
    authenticationDAO.storeRole(role);
    return new GenericResponse();
  } catch (Exception e) {
    return new GenericResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-solr

@Override
public IndexTermsResponse terms(final IndexTermsRequest request) {
  IndexTermsResponse result;
  try {
    final TermsResults results = searcher.terms(request.getIndexName(), request.getQuery());
    result = new IndexTermsResponse(results);
  } catch (final Exception e) {
    log.error(e.getMessage(), e);
    result = new IndexTermsResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
  return result;
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-aal

public GenericResponse storeUser(UserRequest request) {
  
  try {
    User user = request.getObject();
    user.setLastActionTime(new Date());
    authenticationDAO.storeUser(user);
    return new GenericResponse();
  } catch (Exception e) {
    return new GenericResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-content

@Override
public ParseReferenceResponse parseReference(ParseReferenceRequest request) {
  try {
    String text = request.getText();
    DocReference reference = metadataIndex.parseReference(text);
    return new ParseReferenceResponse(reference);
  } catch (MetadataIndexException e) {
    return new ParseReferenceResponse(new YaddaError("", "", e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-solr

@Override
public GenericResponse undeleteAll(final SessionAwareRequest request) {
  try {
    final IndexSession session = getSession(request);
    session.undeleteAll();
    return new GenericResponse();
  } catch (final SearchException e) {
    return new GenericResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-content

protected synchronized QueryResponse getNode(GetNodeOp op) {
  try {
    Node node = backend.getNode(op.getId());
    if (node == null)
      return new QueryResponse(null, null);
    return new QueryResponse(new Node[] { node }, null);
  } catch (Exception e) {
    return new QueryResponse(new YaddaError("", "Cannot get node", e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-content

@Override
public MatchInternalResponse matchInternal(MatchInternalRequest request) {
  try {
    metadataIndex.matchInternal(request.getFrom(), request.getUntil(), request.getTags());
    return new MatchInternalResponse();
  } catch (MetadataIndexException e) {
    return new MatchInternalResponse(new YaddaError("", "", e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-solr

@Override
public GenericResponse delete(final RemoveDocumentsRequest request) {
  try {
    getSession(request).delete(request.getDocumentIds());
    return new GenericResponse();
  } catch (final SearchException e) {
    return new GenericResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-solr

@Override
public ObjectResponse<String[]> getFieldValues(final GetFieldValuesRequest request) {
  try {
    final IndexSession session = getSession(request);
    final String[] values = session.getFieldValues(request.getDocumentId(), request.getFieldName());
    return new ObjectResponse<String[]>(values);
  } catch (final SearchException e) {
    return new ObjectResponse<String[]>(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-solr

@Override
public GenericResponse delete(final DeleteByTermRequest request) {
  try {
    final IndexSession session = getSession(request);
    session.delete(request.getField(), request.getValue());
    return new GenericResponse();
  } catch (final SearchException e) {
    return new GenericResponse(new YaddaError(ERROR_CODE, e.getMessage(), e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-content

protected synchronized EditResponse addLink(AddLinkOp op) {
  try {
    backend.addLink(op.getSrcId(), op.getDstId(), op.getType(), op.getWeight(), op.getLabel());
    return new EditResponse();
  } catch (Exception e) {
    return new EditResponse(new YaddaError("", "Cannot add link", e));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-content

protected synchronized QueryResponse iterateNodes(IterateNodesOp op) {
  try {
    Nodes results = backend.getNodes(op.getType(), op.isFetchLinks(), BUFFER, op.getResumptionToken());
    return new QueryResponse(results.getNodes(), results.getToken());
  } catch (Exception e) {
    return new QueryResponse(new YaddaError("", "Cannot iterate nodes", e));
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com