Package org.ontoware.rdf2go.model.node

Examples of org.ontoware.rdf2go.model.node.Node


      this.resource,S3B_SSCF.isInSuggested,S3B_SSCF.removedSuggested,S3B_SSCF.isIn),"SPARQL");
    if (lstIsInSuggested == null) {
      lstIsInSuggested = new ArrayList<XfoafSscfResource>();
    }
    for (QueryRow qr:results) {
      Node value = qr.getValue(results.getVariables().get(0));
      XfoafSscfResource x = XfoafSscfResource
          .getXfoafSscfResource(value.asResource().toString());
      this.lstIsInSuggested.add(x);
    }
  }
View Full Code Here


      S3B_SSCF.isIn),"SPARQL");
    if (lstIsIn == null) {
      lstIsIn = new ArrayList<XfoafSscfResource>();
    }
    for (QueryRow qr:results) {
      Node value = qr.getValue(results.getVariables().get(0));
      XfoafSscfResource x = XfoafSscfResource
          .getXfoafSscfResource(value.asResource().toString());
      this.lstIsIn.add(x);
    }
  }
View Full Code Here

   */
  public boolean checkIsImportRootDir(){
    URI predicate = RDF.type;
    ClosableIterator<Statement> it = model.findStatements(null,this.resource, predicate,null);
    while (it.hasNext()) {
      Node ret = it.next().getObject();
      if (ret.toString().equals(S3B_SSCF.ImportedResource)){
        it.close();
        return true;
      }
    }
    it.close();
View Full Code Here

     
      while(it.hasNext())
      {
        Statement st = it.next();
        Resource taggerUri = st.getSubject();
        Node creator = null;
       
        //2. get sscf person for this tagger.
        Iterator<Statement> uriIt = DbFace.getModel().findStatements(null,taggerUri,isIn ,Variable.ANY);
        while(uriIt.hasNext())
        {
          creator = uriIt.next().getObject();
          if(creator!=null)
            break;
        }
       
        if(taggerUri!=null&&creator!=null)
        {
          //3. We are ready to do some changes...
          sb.append("Changing for: ");
          sb.append(taggerUri.toString()).append(" - ").append(creator.toString()).append("<BR>");
          Iterator<Statement> toChange = DbFace.getModel().findStatements(null,null, issuedBy, taggerUri);
         
          while(toChange.hasNext())
          {
            Statement stTmp = toChange.next();         
View Full Code Here

    }

    private void handleStatement(RDFDataset result, Statement statement, URI context) {
        final Resource subject = statement.getSubject();
        final URI predicate = statement.getPredicate();
        final Node object = statement.getObject();

        if (object instanceof DatatypeLiteral) {
            final DatatypeLiteral literal = (DatatypeLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getDatatype());
        } else if (object instanceof LanguageTagLiteral) {
            final LanguageTagLiteral literal = (LanguageTagLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getLanguageTag());
        } else if (object instanceof Literal) {
            final Literal literal = (Literal) object;
            addStatement(result, context, subject, predicate, literal.getValue());
        } else {
            addStatement(result, context, subject, predicate, object.asURI());
        }
    }
View Full Code Here

        triple(sinkModel.createURI(s), sinkModel.createURI(p), sinkModel.createURI(o), graph);
    }

    private void triple(String s, String p, String value, String datatype, String language,
            String graph) {
        Node object = null;
        if (language != null) {
            object = sinkModel.createLanguageTagLiteral(value, language);
        } else if (datatype != null) {
            object = sinkModel.createDatatypeLiteral(value, sinkModel.createURI(datatype));
        } else {
View Full Code Here

    }

    private void handleStatement(RDFDataset result, Statement statement, URI context) {
        final Resource subject = statement.getSubject();
        final URI predicate = statement.getPredicate();
        final Node object = statement.getObject();

        if (object instanceof DatatypeLiteral) {
            final DatatypeLiteral literal = (DatatypeLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getDatatype());
        } else if (object instanceof LanguageTagLiteral) {
            final LanguageTagLiteral literal = (LanguageTagLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getLanguageTag());
        } else if (object instanceof Literal) {
            final Literal literal = (Literal) object;
            addStatement(result, context, subject, predicate, literal.getValue());
        } else {
            addStatement(result, context, subject, predicate, object.asURI());
        }
    }
View Full Code Here

        triple(sinkModel.createURI(s), sinkModel.createURI(p), sinkModel.createURI(o), graph);
    }

    private void triple(String s, String p, String value, String datatype, String language,
            String graph) {
        Node object = null;
        if (language != null) {
            object = sinkModel.createLanguageTagLiteral(value, language);
        } else if (datatype != null) {
            object = sinkModel.createDatatypeLiteral(value, sinkModel.createURI(datatype));
        } else {
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.node.Node

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.