org.exist.fluent
Class Resource

java.lang.Object
  extended by org.exist.fluent.Resource
Direct Known Subclasses:
Folder.DocumentsFacet, Item, ItemList, NamedResource

public abstract class Resource
extends Object

A database object that can be further queried.

Author:
Piotr Kaminski

Method Summary
 Database database()
          Return the database to which this resource belongs.
 NamespaceMap namespaceBindings()
          Return the namespace bindings for this resource.
 QueryService query()
          Return a query service for running queries in the context of this resource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

query

public QueryService query()
Return a query service for running queries in the context of this resource. The query service will inherit this object's namespace bindings.

Returns:
a query service with this object as context

namespaceBindings

public final NamespaceMap namespaceBindings()
Return the namespace bindings for this resource. These mappings are applied to all queries and other objects derived from this one, directly or indirectly. The default namespace mapping uses an empty string key.

Returns:
the namespace mappings for this collection

database

public final Database database()
Return the database to which this resource belongs. The returned database will inherit its namespace bindings from this resource.

Returns:
the database that contains this object


Copyright (C) All rights reserved.