public void loadFromModel(Model metaModel) {
// ResIterator resIterator = metaModel.listSubjectsWithProperty(RDF.type,
// METAMODEL.Assertion);
ResIterator resIterator = metaModel.listSubjectsWithProperty(METAMODEL.asserter);
while (resIterator.hasNext()) {
Resource assertion = resIterator.nextResource();
Resource assertedComponent = assertion.getProperty(
METAMODEL.assertedComponent).getResource();
Resource type = null;
StmtIterator typeIter = assertedComponent.listProperties(RDF.type);
while (typeIter.hasNext()) {
Resource currentType = typeIter.nextStatement().getResource();
if (currentType.getNameSpace().equals(METAMODEL.getURI())) {
type = currentType;
break;
}
}
Resource assertionSource = assertion.getProperty(
METAMODEL.asserter).getResource();
Source source = new SourceImpl(assertionSource.getURI());
NamedNode component = new NamedNodeImpl(assertedComponent.getURI());
componentTypeMap.put(component, type);
SourceComponent sourceComponent = new SourceComponent(source, component);
{
//adding assertion