Examples of listProperties()


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

   
  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

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

      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

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

            // 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

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

 
  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

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

    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

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

    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

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

    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

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

            // 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

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

          "Ian Dickinson");
      final Resource bNode = ri.nextResource();
      ri.close();

      // Rewrite it to ground form
      final int originalCount = bNode.listProperties().toList().size();
      final Resource newR = incoming
          .createResource("http://www.hp.com/people/Ian_Dickinson");
      int runningCount = 0;
      final StmtIterator si = incoming.listStatements(bNode, null,
          (RDFNode) null);
View Full Code Here

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

    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.