Difference between revisions of "Subgraph Extents"

From Developer Documents
Jump to navigation Jump to search
 
Line 44: Line 44:
 
* Determine the set of excluded statements by applying excluded extent descriptions on the domain set
 
* Determine the set of excluded statements by applying excluded extent descriptions on the domain set
 
* Remove the set of excluded statements from the included statement set
 
* Remove the set of excluded statements from the included statement set
 +
 +
[[Category: Database Development]]

Latest revision as of 15:56, 28 January 2011

Overview

A subgraph extent is a set of statements bound by a given set of root resources. Subgraph extents are needed in

  • Copy-paste
  • Import and export
  • Delete

Domain

A subgraph extent domain is the set of resources for which all parent resources are included in the root set. The set of parents for resource r are found by

If the preceding procedure yielded no parents then the parent set is determined by

Extent descriptions

The set of statements in a subgraph extent is determined by applying subgraph extent descriptions to the domain resources. The extent descriptions are specified in ontologies and attached to types. An extent description is implemented using the following adapter class

public interface SubgraphExtent {

    interface Callback {
        void statement(ReadGraph graph, Statement statement) throws DatabaseException;
        void value(ReadGraph graph, Resource resource, byte[] value) throws DatabaseException;
    }
	
    Set<Resource> types(ReadGraph graph) throws DatabaseException;
    void traverse(ReadGraph graph, Resource resource, Collection<Resource> domain, Callback callback) throws DatabaseException;
	
}

Extent determination procedure

  • Determine the domain set by walking IsRelatedTo from root set and the discovered domain.
  • Determine the set of extent descriptions found from root set dependencies (ontologies).
  • Divide the set of available extent descriptions into included and excluded sets.
  • Determine the set of (potentially) included statements by applying included extent descriptions on the domain set
  • Determine the set of excluded statements by applying excluded extent descriptions on the domain set
  • Remove the set of excluded statements from the included statement set