Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.assembler
Class ModelExpansion

    java.lang.Object
      com.hp.hpl.jena.assembler.ModelExpansion

    public class ModelExpansion

extends java.lang.Object

The ModelExpansion code expands a model `M` against a schema `S`, returning a new model which contains

- the statements of M
- any statements (A rdfs:subClassOf B) from S where neither A nor B is a bnode.
- statements (A rdf:type T) if M contains (A P any) and S contains (P rdfs:domain T).
- statements (A rdf:type T) if M contains (any P A) and S contains (P rdfs:range T).
- statements (A rdf:type T) if (A rdf:type U) and (U rdfs:subClassOf T).

This is sufficient to allow the subjects in `M` which have properties from `S` to have enough type information for AssemblerGroup dispatch.

Author:
  kers

Constructor Summary
`ModelExpansion()`

Method Summary
`static void` | `addSubClassClosure(Model m)` Do (limited) subclass closure on `m`.
`static Model` | `withSchema(Model model, Model schema)` Answer a new model which is the aggregation of the statements of `model` the non-bnode subclass statements of `schema` the subclass closure of those statements the rdf:type statements implied by the rdfs:domain statements of `schema` and the `model` statements using that statements property similarly for rdfs:range the rdf:type statements implied by the subclass closure

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ModelExpansion

    public ModelExpansion()

Method Detail

### withSchema

    public static Model withSchema(Model model,
                                   Model schema)

  Answer a new model which is the aggregation of
  - the statements of `model`
  - the non-bnode subclass statements of `schema`
  - the subclass closure of those statements
  - the rdf:type statements implied by the rdfs:domain statements of `schema` and the `model` statements using that statements property
  - similarly for rdfs:range
  - the rdf:type statements implied by the subclass closure

### addSubClassClosure

    public static void addSubClassClosure(Model m)

  Do (limited) subclass closure on `m`.

  Those classes in `m` that appear in `subClassOf` statements are given as explicit superclasses all their indirect superclasses.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP