Package org.openxri.store

Examples of org.openxri.store.StoreInternalException


      if (moAuthoritiesDir.exists()) {
        moAuthoritiesDir.delete();
      }
    }
    catch (Exception ex) {
      throw new StoreInternalException(ex, "Error resetting store");
    }
  }
View Full Code Here


      authority.internalSetAuthorityId(authorityId);
      authority.internalSetNamespace(null);
      authority.internalSetLocalAuthService(Boolean.TRUE);
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create rootauthority.");
    }

    // done

    return(authority);
View Full Code Here

      authority.internalSetAuthorityId(authorityId);
      authority.internalSetNamespace(namespace);
      authority.internalSetLocalAuthService(Boolean.TRUE);
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create root authority.");
    }

    // create namespace

    File namespaceFile = this.getNamespaceFile(namespace);

    if (namespaceFile.exists()) {

      throw new StoreDuplicateEntryException("Namespace exists already.");
    }

    try {

      FileStore.writeLine(namespaceFile, authorityId);
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create namespace.");
    }

    // done

    return(authority);
View Full Code Here

    try {

      FileStore.deleteDir(authorityDir);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot delete authority.");
    }
  }
View Full Code Here

    try {

      authorityId = FileStore.readLine(namespaceFile);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot find namespace.");
    }

    // delete authority

    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    try {

      FileStore.deleteDir(authorityDir);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot delete authority.");
    }
  }
View Full Code Here

      try {

        authorityId = FileStore.readLine(namespaceFile);
      } catch (Exception ex) {

        throw new StoreInternalException(ex, "Cannot read root authority.");
      }

      File authorityDir = this.getAuthorityDir(authorityId);

      if (! authorityDir.exists()) {

        throw new StoreInternalException("Root authority does not exist.");
      }

      FileAuthority authority = new FileAuthority(authorityDir);

      authorities.add(authority);
View Full Code Here

      subSegment.internalSetName(subSegmentName);
      subSegment.internalSetAuthorityId(authority.getAuthorityId());
      subSegment.internalSetParentAuthorityId(parent.getAuthorityId());
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create subsegment.");
    }

    // done

    return(subSegment);
View Full Code Here

      authority.internalSetLocalAuthService(localAuthService);
      authority.internalSetRefs(refs);
      authority.internalSetServices(services);
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create rootauthority.");
    }

    // create subsegment

    File subSegmentDir = this.getSubSegmentDir(parentAuthorityDir, subSegmentName);

    if (subSegmentDir.exists()) {

      throw new StoreDuplicateEntryException("Subsegment exists already.");
    }

    FileSubSegment subSegment = new FileSubSegment(subSegmentDir);

    try {

      subSegment.internalSetName(subSegmentName);
      subSegment.internalSetAuthorityId(authority.getAuthorityId());
      subSegment.internalSetParentAuthorityId(parent.getAuthorityId());
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create subsegment.");
    }

    // done

    return(subSegment);
View Full Code Here

    try {

      FileStore.deleteDir(subSegmentDir);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot delete subsegment.");
    }
  }
View Full Code Here

    try {

      authorityId = FileStore.readLine(namespaceFile);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot find namespace.");
    }

    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {
View Full Code Here

TOP

Related Classes of org.openxri.store.StoreInternalException

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.