Package org.fao.oaipmh.exceptions

Examples of org.fao.oaipmh.exceptions.BadResumptionTokenException


      token = cache.getResumptionToken( GeonetworkResumptionToken.buildKey(req)  );
            if(Log.isDebugEnabled(Geonet.OAI_HARVESTER))
                Log.debug(Geonet.OAI_HARVESTER,"OAI ListRecords : using ResumptionToken :"+GeonetworkResumptionToken.buildKey(req));
     
      if (token  == null)
        throw new BadResumptionTokenException("No session for token : "+ GeonetworkResumptionToken.buildKey(req));

      result = token.getRes();
     
      //pos = result.parseToken(token);
      pos = GeonetworkResumptionToken.getPos(req);
View Full Code Here


    ListSetsResponse res = new ListSetsResponse();

    //--- we don't provide streaming for sets

    if (req.getResumptionToken() != null)
      throw new BadResumptionTokenException(req.getResumptionToken());

        final List<MetadataCategory> metadataCategories = context.getBean(MetadataCategoryRepository.class).findAll();

    for (MetadataCategory rec : metadataCategories)
    {
View Full Code Here

  //---------------------------------------------------------------------------

  public int parseToken(String token) throws BadResumptionTokenException
  {
    if (!Lib.isInteger(token))
      throw new BadResumptionTokenException("Invalid token : "+ token);

        if (ids == null) {
            throw new IllegalStateException("res.ids should not be null");
        }
    int pos = Integer.parseInt(token);

    if (pos >= ids.size())
      throw new BadResumptionTokenException("Token beyond limit : "+ token);

    this.token = token;

    return pos;
  }
View Full Code Here

  private void parseToken(String strToken) throws BadResumptionTokenException {

    String[] temp = strToken.split(SEPARATOR);

    if (temp.length != 6)
      throw new BadResumptionTokenException("unknown resumptionToken format: "+strToken);

    set = temp[0];
    prefix = temp[1];
    from =  temp[2] ;
    until = temp[3] ;
View Full Code Here

TOP

Related Classes of org.fao.oaipmh.exceptions.BadResumptionTokenException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.