Package org.openrdf.model

Examples of org.openrdf.model.Value


    {
      super.meet(sp);

      Resource subj = (Resource)sp.getSubjectVar().getValue();
      URI pred = (URI)sp.getPredicateVar().getValue();
      Value obj = sp.getObjectVar().getValue();

      Resource[] ctx;
      Var contextVar = sp.getContextVar();
      if (contextVar == null || !contextVar.hasValue()) {
        ctx = new Resource[0];
View Full Code Here


    File dataDir = new File(args[0]);
    ValueStore valueStore = new ValueStore(dataDir);

    int maxID = valueStore.dataStore.getMaxID();
    for (int id = 1; id <= maxID; id++) {
      Value value = valueStore.getValue(id);
      System.out.println("[" + id + "] " + value.toString());
    }
  }
View Full Code Here

    protected double getCardinality(StatementPattern sp)
      throws StoreException
    {
      Resource subj = (Resource)getConstantValue(sp.getSubjectVar());
      URI pred = (URI)getConstantValue(sp.getPredicateVar());
      Value obj = getConstantValue(sp.getObjectVar());
      Resource context = (Resource)getConstantValue(sp.getContextVar());

      try {
        return nativeStore.cardinality(subj, pred, obj, context);
      }
View Full Code Here

  @Override
  public void meet(ValueConstant node)
    throws StoreException
  {
    Value value = node.getValue();
    if (owned != null && value instanceof BNode) {
      node.setValue(owned.getBNode((BNode) node.getValue()));
    }
  }
View Full Code Here

  @Override
  public void meet(Var node)
    throws StoreException
  {
    Value value = node.getValue();
    if (owned != null && value instanceof BNode) {
      node.setValue(owned.getBNode((BNode) node.getValue()));
    }
  }
View Full Code Here

      throw new RuntimeException("Document writing has not yet been started");
    }

    Resource subj = st.getSubject();
    URI pred = st.getPredicate();
    Value obj = st.getObject();

    // Verify that an XML namespace-qualified name can be created for the
    // predicate
    String predString = pred.toString();
    int predSplitIdx = XMLUtil.findURISplitIndex(predString);
View Full Code Here

        Cursor<? extends Statement> parentStatements = super.getStatements(subject, inheritanceProperty,
            null, true);
        try {
          Statement parentStatement;
          while ((parentStatement = parentStatements.next()) != null) {
            Value value = parentStatement.getObject();
            if (value instanceof Resource) {
              result = getPropertyResourceValue((Resource)value, predicate, false, visited, contexts);
              if (result != null) {
                break;
              }
View Full Code Here

            null, true);

        try {
          Statement parentStatement;
          while ((parentStatement = parentStatements.next()) != null) {
            Value value = parentStatement.getObject();
            if (value instanceof Resource) {
              getPropertyResourceValues(results, (Resource)value, predicate, false, visited, contexts);
            }
          }
        }
View Full Code Here

          ACL.CONTEXT);

      try {
        Statement st;
        while ((st = statements.next()) != null) {
          Value value = st.getObject();
          if (value instanceof URI) {
            roles.add((URI)value);
          }
        }
      }
View Full Code Here

  public Value objectValue()
    throws ModelException
  {
    Iterator<Value> iter = objects().iterator();
    if (iter.hasNext()) {
      Value obj = iter.next();
      if (iter.hasNext()) {
        throw new ModelException();
      }
      return obj;
    }
View Full Code Here

TOP

Related Classes of org.openrdf.model.Value

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.