Examples of StoreException


Examples of br.net.woodstock.rockframework.security.store.StoreException

    super();
    try {
      this.keyStore = KeyStore.getInstance(keyStoreType.getType());
      this.keyStore.load(null, null);
    } catch (Exception e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

Examples of com.google.k2crypto.storage.StoreException

   
    // Make sure the SQLite JDBC driver is loaded
    try {
      Class.forName("org.sqlite.JDBC").newInstance();
    } catch (Exception ex) {
      throw new StoreException("SQLite JDBC not available.", ex);
    }

    // Check for unsupported components in the address and scheme.
    // (we only accept/require a scheme + path + fragment)
    checkNoAuthority(address);
View Full Code Here

Examples of com.hp.hpl.jena.gvs.StoreException

    for (RelevantMoment relevantMoment : existingRelevantMoments) {
      if (relevantMoment.assertions.contains(sourceComponent)) {
        break;
      }
      if (relevantMoment.revocations.contains(sourceComponent)) {
        throw new StoreException(
            "Assertion "+moleculeRef+" of source "+source+" not found (already revoked at "+relevantMoment.moment+" which is before "+moment+")");
      }
      if (relevantMoment.revokeAllSources.contains(source)) {
        throw new StoreException(
            "Assertion "+moleculeRef+" of source "+source+" not found (not between "+relevantMoment.moment+" and "+moment+")");
      }
    }
    RelevantMoment relevantMoment = getRelevantMoment(moment);
View Full Code Here

Examples of com.hp.hpl.jena.gvs.StoreException

  public void revokeComponent(Source source, NamedNode moleculeRef,
      Date moment) {
    Resource revokingComponentRes = getAssertionOf(source, moleculeRef,
        moment);
    if (revokingComponentRes == null) {
      throw new StoreException("Assertion not found");
    }
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(moment);
    Literal momentLit = metaModel.createTypedLiteral(new XSDDateTime(
        calendar));
View Full Code Here

Examples of com.hp.hpl.jena.gvs.StoreException

   */
  public FSSToreImpl(File storeDir, GraphCache cache) throws IOException {
    storeDir.mkdirs();
    lockFile = new File(storeDir, ".running-gvs-id");
    if (!lockFile.createNewFile()) {
      throw new StoreException(
          "Another instance seems to be still running, if not delete "
              + lockFile);
    }
    lockFile.deleteOnExit();
    File moleculeStoreDir = new File(storeDir, "moleculestore");
View Full Code Here

Examples of com.hp.hpl.jena.gvs.StoreException

    for (MaximumContextualMolecule cMolecule : contextualMolecules) {
      NamedNode componentName = moleculeStore
          .getNameOfContextualMolecule(cMolecule);// MoleculesMap.get(cMolecule);
      if (componentName == null) {
        throw new StoreException(
            "Revoking compononent unknown to the store");
      }
      metaStore.revokeComponent(source, componentName, moment);
    }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.StoreException

      Set<FunctionallyGroundedNode> functionallyGroundedNodes, Date moment) {
    for (FunctionallyGroundedNode fgNode : functionallyGroundedNodes) {
      NamedNode componentName = moleculeStore
          .getNameOfFunctionallyGroundedNode(fgNode);// fgNodesMap.get(fgNode);
      if (componentName == null) {
        throw new StoreException(
            "Revoking compononent unknown to the store");
      }
      metaStore.revokeComponent(source, componentName, moment);
    }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.StoreException

    for (TerminalMolecule tMolecule : terminalMolecules) {
      NamedNode componentName = moleculeStore
          .getNameOfTerminalMolecule(tMolecule);// tMoleculesMap.get(tMolecule);
      if (componentName == null) {
        throw new StoreException(
            "Revoking compononent unknown to the store");
      }
      metaStore.revokeComponent(source, componentName, moment);
    }
View Full Code Here

Examples of com.opensymphony.workflow.StoreException

            ps = conn.prepareStatement(sql);
            ps.setInt(1, state);
            ps.setLong(2, id);
            ps.executeUpdate();
        } catch (SQLException e) {
            throw new StoreException("Unable to update state for workflow instance #" + id + " to " + state, e);
        } finally {
            cleanup(conn, ps, null);
        }
    }
View Full Code Here

Examples of eu.planets_project.ifr.core.storage.impl.fedora.connector.StoreException

        String pid;

        pid = fedora.uri2Pid(piduri);
        boolean exists = fedora.exists(pid);
        if (!exists){
            throw new StoreException("Object does not already exist");
        }


        if (!isWritable(piduri)){
            throw new StoreException("This object is not writable");
        }

        String planetsModel;

        try {
            if (!fedora.isPlanetsObject(pid)){
                throw new StoreException("pdURI "+pid.toString()+" is not a planets compatible object");
            }
            planetsModel = fedora.getPlanetsContentModel(pid);
        } catch (DigitalObjectNotFoundException e) {
            //we have just checked that it exists...
            throw new StoreException("Object was there, but then it was gone",e);
        }

        PlanetsDatastreamType planetsDatastreamObject;
        try {
            planetsDatastreamObject = readPlanetsDatastream(planetsModel);
        } catch (ParseException e) {
            throw new StoreException(e);
        } catch (DigitalObjectNotFoundException e) {
            throw new StoreException("Object '"+pid+"' was a planets object but cannot read the content model",e);
        }
        //If so far, we have now read the datastream in as a java class



        //decode the streams for the planets object

        MetadatastreamsType metadatastreams = planetsDatastreamObject.getMetadatastreams();
        Map<String, MetadatastreamType> metamap = new HashMap<String, MetadatastreamType>();
        for (MetadatastreamType datastream: metadatastreams.getMetadatastream()){
            metamap.put(datastream.getPlanetsName(),datastream);
        }



        for (Metadata metadata : digitalObject.getMetadata()) {
            MetadatastreamType ds = metamap.get(metadata.getName());
            URI formatURI = metadata.getType();
            if (ds!=null){

                try {
                    fedora.modifyDatastream(pid,ds.getName(),metadata.getContent(),formatURI);
                } catch (ParseException e) {
                    throw new StoreException(e);
                }
            }
        }

        try {
            fedora.setObjectLabel(pid,digitalObject.getTitle());
        } catch (DigitalObjectNotFoundException e) {
            //we have just checked that it exists...
            throw new StoreException("Object was there, but then it was gone",e);
        }

        ContentdatastreamType filedatastream = planetsDatastreamObject.getContentdatastream();
        URI formatURI = digitalObject.getFormat();

        try {
            fedora.modifyDatastream(pid,filedatastream.getName(),digitalObject.getContent().getInputStream(),formatURI);
            return  fedora.pid2Uri(pid);
        } catch (ParseException e) {
            throw new StoreException(e);//cannot happen
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.