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

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


          result.add(new GVSImpersonatePermission());
          result.add(new GVSSetClockPermission());
        }
        Resource userRes = getUserResource(principal.getUserName());
        if (userRes.hasProperty(RDF.type, AUTHORIZATION.ClockMaster));
        StmtIterator impersonateStmt = userRes.listProperties(AUTHORIZATION.mayImpersonate);
        while (impersonateStmt.hasNext()) {
          result.add(new GVSImpersonatePermission(new SourceImpl(impersonateStmt.nextStatement().getResource().toString())));
        }
      }
     
View Full Code Here


          FCAGraph revokeGraphTmp = null;
          if (user != null) {
            log
                .info("Username already exist, removing previous password");
            Model revokeModel = ModelFactory.createDefaultModel();
            revokeModel.add(user
                .listProperties(ACCOUNTMANAGER.passwordSha1));
            revokeModel.add(user.listProperties(FOAF.mbox_sha1sum));
            revokeModel.add(user
                .listProperties(ACCOUNTMANAGER.userName));
            revokeGraphTmp = new FCAGraphImpl(revokeModel);
View Full Code Here

            log
                .info("Username already exist, removing previous password");
            Model revokeModel = ModelFactory.createDefaultModel();
            revokeModel.add(user
                .listProperties(ACCOUNTMANAGER.passwordSha1));
            revokeModel.add(user.listProperties(FOAF.mbox_sha1sum));
            revokeModel.add(user
                .listProperties(ACCOUNTMANAGER.userName));
            revokeGraphTmp = new FCAGraphImpl(revokeModel);
            // store.revokeGraph(identity, new
            // FCAGraphImpl(revokeModel), now);
View Full Code Here

                .info("Username already exist, removing previous password");
            Model revokeModel = ModelFactory.createDefaultModel();
            revokeModel.add(user
                .listProperties(ACCOUNTMANAGER.passwordSha1));
            revokeModel.add(user.listProperties(FOAF.mbox_sha1sum));
            revokeModel.add(user
                .listProperties(ACCOUNTMANAGER.userName));
            revokeGraphTmp = new FCAGraphImpl(revokeModel);
            // store.revokeGraph(identity, new
            // FCAGraphImpl(revokeModel), now);
          }
View Full Code Here

        }
        else if (type.endsWith("#duration") && !rdf.isLiteral()) {
          // sum of all durations
          Duration duration = null;
          Resource r = (Resource) rdf;
          for (StmtIterator si = r.listProperties(RDF.value); si.hasNext(); ) {
            Duration d = schema.getDuration(si.nextStatement().getString());
            duration = duration==null?d:duration.add(d);
          }
          if (duration!=null)
            e.appendChild(doc.createTextNode(duration.toString()));
View Full Code Here

   
  public static boolean noSchemaToXML(Document doc, RDFNode rdf, Context ctx) {
    boolean qualify = ctx.getDefaultNS()!=null;
    if (rdf instanceof Resource) {
      Resource r = (Resource) rdf;
      for (StmtIterator i = r.listProperties(); i.hasNext(); ) {
        Statement stmt = i.nextStatement();
        Property p = stmt.getPredicate();
        // ignore RDF properties eg. RDF:type
        // take the first (non-rdf) property we find as document element
        if (!p.getURI().startsWith(RDF.getURI())) {
View Full Code Here

      Resource r = (Resource) rdf;
      Model m = r.getModel();
     
      // is the resource explicitly typed
      complexType ct = null;
      for (StmtIterator si = r.listProperties(RDF.type); si.hasNext(); ) {
        Resource t = si.nextStatement().getResource();
       
        // ignore RDF types, e.g. rdf:Seq
        if (t.getURI().startsWith(RDF.getURI())) continue;       
        complexType c = ctx.getComplexType(t.getURI());
View Full Code Here

            // check for multiple paths arriving at this queue node
            if (!seen.contains( r )) {
                seen.add( r );

                // add the statements to the output model, and queue any new resources
                for (StmtIterator i = r.listProperties(); i.hasNext(); ) {
                    Statement s = i.nextStatement();

                    // don't do the occurs check now in case of reflexive statements
                    m.add( s );
View Full Code Here

 
  private void addHighDegreePropertyLinks(Model model, HypermediaControls controller) {
    // TODO: This should re-use the logic from ResourceDescription and ResourceProperty to decide where to create these links
    // Add links to RDF documents with descriptions of the blank nodes
    Resource r = model.getResource(controller.getAbsoluteIRI());
    StmtIterator it = r.listProperties();
    while (it.hasNext()) {
      Statement stmt = it.nextStatement();
      if (!stmt.getObject().isAnon()) continue;
      String pathDataURL = controller.getValuesDataURL(stmt.getPredicate());
      if (pathDataURL == null) continue;
View Full Code Here

    Resource ontRes = JenaUtil2.getFirstIndividual(model, OWL.Ontology);
    List<Statement> prexistStatements = null;
    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
//      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }
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.