Package org.openxri.exceptions

Examples of org.openxri.exceptions.ServerException


    try {

      utf8Namespace = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(namespace));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in namespace: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority parentAuthority;

    try {

      parentAuthority = this.store.localLookup(authorityPath);

      if (parentAuthority == null) throw new ServerNotFoundException("Namespace authority " + namespace + " not found.");
    } catch (StoreException ex) {

      ServerException ex2 = new ServerInternalException("Error while finding namespace authority " + namespace + ": " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    // the big goal is to make an XRDS, consisting of one or more XRDs

    XRDS xrds = new XRDS();
    boolean ret;

    // give subclasses a chance to init the XRDS before we begin

    ret = this.initXRDS(
        xrds,
        query,
        signed);

    // if a subclass returned true, it doesn't want us to do any more work

    if (ret == true) {

      log.debug("Subclass handled XRDS completely. Returning it without any more work.");
      return(xrds);
    }

    // generate XRDs for all subsegments in the request

    String utf8Query;

    try {

      utf8Query = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(query));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in query: " + ex.getMessage(), ex);
      log.warn("", ex2);
      throw ex2;
    }

    XRISegment segment = new XRISegment(utf8Query);
View Full Code Here


        StoreMountable storeMountable = (StoreMountable) this.store;

        authorities = storeMountable.listAuthoritiesByPath(path);
      } catch (StoreException ex) {

        ServerException ex2 = new ServerInternalException("Error while listing mounted authorities.", ex);
        log.warn("", ex2);
        throw ex2;
      }
    }
View Full Code Here

TOP

Related Classes of org.openxri.exceptions.ServerException

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.