Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Resource.addProperty()


      // METAMODEL.FunctionallyGroundedNode, functionallyGroundedNode);
      File metaInfFile = new File(directory, "meta-inf");
      Model metaInfModel = ModelFactory.createDefaultModel();
      Resource componentRes = metaInfModel
          .createResource(componentDirectory.getNode().getURIRef());
      componentRes.addProperty(RDF.type,
          METAMODEL.FunctionallyGroundedNode);
      componentRes.addProperty(METAMODEL.hashCode, metaInfModel
          .createTypedLiteral(functionallyGroundedNode.hashCode()));
      componentRes.addProperty(METAMODEL.strongHashCode, metaInfModel
          .createTypedLiteral(functionallyGroundedNode
View Full Code Here


      Model metaInfModel = ModelFactory.createDefaultModel();
      Resource componentRes = metaInfModel
          .createResource(componentDirectory.getNode().getURIRef());
      componentRes.addProperty(RDF.type,
          METAMODEL.FunctionallyGroundedNode);
      componentRes.addProperty(METAMODEL.hashCode, metaInfModel
          .createTypedLiteral(functionallyGroundedNode.hashCode()));
      componentRes.addProperty(METAMODEL.strongHashCode, metaInfModel
          .createTypedLiteral(functionallyGroundedNode
              .strongHashCode()));
      for (NonTerminalMolecule molecule : functionallyGroundedNode
View Full Code Here

          .createResource(componentDirectory.getNode().getURIRef());
      componentRes.addProperty(RDF.type,
          METAMODEL.FunctionallyGroundedNode);
      componentRes.addProperty(METAMODEL.hashCode, metaInfModel
          .createTypedLiteral(functionallyGroundedNode.hashCode()));
      componentRes.addProperty(METAMODEL.strongHashCode, metaInfModel
          .createTypedLiteral(functionallyGroundedNode
              .strongHashCode()));
      for (NonTerminalMolecule molecule : functionallyGroundedNode
          .getGroundingMolecules()) {
        // storeNTMolecule doesn't add duplicate
View Full Code Here

        try {
          moleculeName = storeNTMolecule(molecule);
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
        componentRes.addProperty(METAMODEL.containsNonTerminalMolecule,
            metaInfModel.createResource(moleculeName.getURIRef()));
      }
      OutputStream metaInfOut = new FileOutputStream(metaInfFile);
      try {
        metaInfModel.write(metaInfOut, "N-TRIPLE");
View Full Code Here

    Date now = new Date();

    Model logEntryModel = ModelFactory.createDefaultModel();
    Resource downloadAttempt = logEntryModel
        .createResource(AGGREGATOR.DownloadAttempt);
    downloadAttempt.addProperty(AGGREGATOR.time, new W3CDateFormat()
        .format(now), XSDDatatype.XSDdateTime);
    downloadAttempt.addProperty(AGGREGATOR.aggregatedSource, logEntryModel
        .createResource(aggregatedSource.getURIRef()));
    downloadAttempt.addProperty(AGGREGATOR.aggregator, logEntryModel
        .createResource(identity.getURIRef()));
View Full Code Here

    Model logEntryModel = ModelFactory.createDefaultModel();
    Resource downloadAttempt = logEntryModel
        .createResource(AGGREGATOR.DownloadAttempt);
    downloadAttempt.addProperty(AGGREGATOR.time, new W3CDateFormat()
        .format(now), XSDDatatype.XSDdateTime);
    downloadAttempt.addProperty(AGGREGATOR.aggregatedSource, logEntryModel
        .createResource(aggregatedSource.getURIRef()));
    downloadAttempt.addProperty(AGGREGATOR.aggregator, logEntryModel
        .createResource(identity.getURIRef()));
    Graph logEntryGraph = JenaUtil.getGraphFromModel(logEntryModel, true);
    final StringWriter aggregationWarningWriter = new StringWriter();
View Full Code Here

        .createResource(AGGREGATOR.DownloadAttempt);
    downloadAttempt.addProperty(AGGREGATOR.time, new W3CDateFormat()
        .format(now), XSDDatatype.XSDdateTime);
    downloadAttempt.addProperty(AGGREGATOR.aggregatedSource, logEntryModel
        .createResource(aggregatedSource.getURIRef()));
    downloadAttempt.addProperty(AGGREGATOR.aggregator, logEntryModel
        .createResource(identity.getURIRef()));
    Graph logEntryGraph = JenaUtil.getGraphFromModel(logEntryModel, true);
    final StringWriter aggregationWarningWriter = new StringWriter();
    final StringWriter aggregationErrorWriter = new StringWriter();
    try {
View Full Code Here

      if (errorMessage.equals("")) {
        Graph graph = JenaUtil.getGraphFromModel(model, true);
        store.updateGraph(aggregatedSource, new FCAGraphImpl(graph));
      } else {
        if (!errorMessage.equals("")) {
          downloadAttempt.addProperty(AGGREGATOR.errorMessage, errorMessage);
        }
      }
    } catch (Throwable th) {
      if (!(th instanceof AllreadyLoggedRuntimeException)) {
        String errorMessage = th.getMessage();
View Full Code Here

      if (!(th instanceof AllreadyLoggedRuntimeException)) {
        String errorMessage = th.getMessage();
        if (errorMessage == null) {
          errorMessage = th.toString();
        }
        downloadAttempt.addProperty(AGGREGATOR.errorMessage, errorMessage);
      }
    }
    String warningMessage = aggregationWarningWriter.toString();
    if (!warningMessage.equals("")) {
      downloadAttempt.addProperty(AGGREGATOR.warningMessage, warningMessage);
View Full Code Here

        downloadAttempt.addProperty(AGGREGATOR.errorMessage, errorMessage);
      }
    }
    String warningMessage = aggregationWarningWriter.toString();
    if (!warningMessage.equals("")) {
      downloadAttempt.addProperty(AGGREGATOR.warningMessage, warningMessage);
    }

    updateWorkingGraph(store, identity, now, aggregatedSource, logEntryGraph);
    //store.assertGraph(identity, new FCAGraphImpl(logEntryGraph), now);
  }
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.