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

Examples of com.hp.hpl.jena.rdf.model.Statement


    Model trustedModel = JenaUtil.getModelFromGraph(trustedGraph);
    final Resource configRes = trustedModel.getResource(configuration.getURIRef());
    try {
      GVSServerLauncher.launchGVSServer(store, new ServerBinding() {
        public InetAddress getInetAddress() {
          Statement nicStatement = configRes.getProperty(HTTPLISTENER.networkInterface);
          if (nicStatement != null) {
            try {
              return InetAddress.getByName(nicStatement.getString());
            } catch (UnknownHostException e) {
              throw new RuntimeException(e);
            }
          }
          return null;
View Full Code Here


         * (ParseException e) { throw new RuntimeException(e); }
         */
        if (moment.before(assertionTime)) {
          continue;
        }
        Statement revocationTimeStmt = assertion
            .getProperty(METAMODEL.revocationTime);
        if (revocationTimeStmt != null) {
          Literal revocationTimeLit = revocationTimeStmt.getLiteral();
          Date revocationTime = ((XSDDateTime) revocationTimeLit
              .getValue()).asCalendar().getTime();
          // not before rather than after as in the moment of
          // revocation it is revoked
          if (!moment.before(revocationTime)) {
View Full Code Here

          .asCalendar().getTime();

      if (moment.before(assertionTime)) {
        continue;
      }
      Statement revocationTimeStmt = assertion
          .getProperty(METAMODEL.revocationTime);
      if (revocationTimeStmt != null) {
        Literal revocationTimeLit = revocationTimeStmt.getLiteral();
        Date revocationTime = ((XSDDateTime) revocationTimeLit
            .getValue()).asCalendar().getTime();

        // not before rather than after as in the moment of
        // revocation it is revoked
View Full Code Here

        } else {
          if (!assertionTime.after(moment)) {
            resultDateSet.add(assertionTime);
          }
        }
        Statement revocationTimeStmt = assertion
            .getProperty(METAMODEL.revocationTime);
        if (revocationTimeStmt != null) {
          Literal revocationTimeLit = revocationTimeStmt.getLiteral();
          Date revocationTime;
          revocationTime = ((XSDDateTime) revocationTimeLit
              .getValue()).asCalendar().getTime();
          /*
           * try { revocationTime = new MillisDateFormat()
View Full Code Here

      Resource assertedComponent = assertion.getProperty(
          METAMODEL.assertedComponent).getResource();
      if (!assertedComponent.hasProperty(RDF.type, type)) {
        continue;
      }
      Statement revocationTimeStmt = assertion
          .getProperty(METAMODEL.revocationTime);
      if (revocationTimeStmt != null) {
        Literal revocationTimeLit = revocationTimeStmt.getLiteral();
        Date revocationTime = ((XSDDateTime) revocationTimeLit
            .getValue()).asCalendar().getTime();
        if (moment.equals(revocationTime)) {
          result.add(new NamedNodeImpl(assertedComponent.getURI()));
        }
View Full Code Here

   */
  private Set<Source> getTrustedSources(Resource serviceResource) {
    Set<Source> result = new HashSet<Source>();
    StmtIterator trustProrpertyStmts = serviceResource.listProperties(SERVICES.trustedSource);
    while (trustProrpertyStmts.hasNext()) {
      Statement propertyStmt = trustProrpertyStmts.nextStatement();
      result.add(new SourceImpl(propertyStmt.getResource().getURI()));
    }
    return result;
  }
View Full Code Here

    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    Resource cannedDefaultConfigResource = cannedDefaultConfigModel
        .getResource(cannedDefaultConfigURLString+"#");
    Statement cannedVersionDateStmt = cannedDefaultConfigResource
        .getRequiredProperty(DC.date);
    final Date cannedVersionDate = ((XSDDateTime) cannedVersionDateStmt
        .getLiteral().getValue()).asCalendar().getTime();
    cannedVersionDateStmt.remove();
   
    if (isDefaultConfigLoadingNeeded(store, cannedVersionDate)) {
      Clock origClock = store.getClock();
      store.setClock(new Clock() {
View Full Code Here

      Graph configGraph = configGOT.getGraph(new Date());
      Model configModel = JenaUtil.getModelFromGraph(configGraph);
      Resource httpConfigRes = configModel.createResource(configuration
          .getURIRef());
      Statement amConfigStmt = httpConfigRes
          .getProperty(WEBACCOUNTMANAGER.webAccountManagerConfiguration);
      if (amConfigStmt != null) {
        Resource amConfigRes = amConfigStmt.getResource();
        Statement smtpHostStmt = amConfigRes
            .getProperty(WEBACCOUNTMANAGER.smtpServer);
        if (smtpHostStmt != null) {
          smtpHost = smtpHostStmt.getString();
        }
        Statement fromAddressStmt = amConfigRes
            .getProperty(WEBACCOUNTMANAGER.fromAddress);
        if (fromAddressStmt != null) {
          fromAddress = fromAddressStmt.getString();
        }
      }
    }
View Full Code Here

    while (trustedSources.size() > previousTrustedSourceSize) {
      previousTrustedSourceSize = trustedSources.size();
      Model currentModel = ModelFactory.createModelForGraph(store.getGraphOverTime(trustedSources).getGraph(new Date()));
      StmtIterator seeAlsoStmt = currentModel.listStatements(null, RDFS.seeAlso, (Resource)null);
      while(seeAlsoStmt.hasNext()) {
        Statement stmt = seeAlsoStmt.nextStatement();
        RDFNode object = stmt.getObject();
        try {
          Source seeAlsoSource = new SourceImpl(((Resource)object).getURI());
          if (trustedSources.contains(seeAlsoSource)) {
            continue;
          }
View Full Code Here

    String value = ((Text) n).getNodeValue();
    value = processWhitespace(n,value,null,ctx);
    if (!value.equals("")) {
      Model m = ctx.getModel();
      Literal lit = m.createLiteral(value);
      Statement stmt = m.createStatement(subject, RDF.value, lit);
      m.add(stmt);
      if (seq!=null) seq.add(stmt.createReifiedStatement());
    }
  }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.rdf.model.Statement

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.