while ( iter.hasNext() ) {
final Statement stmt = iter.nextStatement();
final Resource sbj = stmt.getSubject();
final Property prd = stmt.getPredicate();
final RDFNode obj = stmt.getObject();
if ( sbj.isAnon() ) {
continue;
}
if ( prd.getNameSpace().equals(RDFS.getURI()) ) {
// System.out.println(" ///////**** " +prd);
if ( RDFS.label.equals(prd) ) {
Literal objLit = (Literal) obj;
_rdfsLabels.put(sbj, objLit.getLexicalForm());
continue;
}
if ( RDFS.subPropertyOf.equals(prd)
|| RDFS.seeAlso.equals(prd)
|| RDFS.comment.equals(prd)
) {
continue;
}
}
if ( OWL.inverseOf.equals(prd) ) {
continue;
}
if ( RDFS.subClassOf.equals(prd) ) {
Resource objRsr = (Resource) obj;
_info._putSubAndSuperClazz(sbj, objRsr);
}
else if ( RDF.type.equals(prd) ) {
Resource objRsr = (Resource) obj;
if ( OWL.Ontology.equals(objRsr) ) {
_info._addOntology(sbj);
}
// TODO remove this temporary hard-coded filter
if ( OWL.Ontology.equals(objRsr)
|| OWL.ObjectProperty.equals(objRsr)
|| OWL.DatatypeProperty.equals(objRsr)
|| OWL.SymmetricProperty.equals(objRsr)
|| OWL.TransitiveProperty.equals(objRsr)
|| OWL.FunctionalProperty.equals(objRsr)
|| OWL.inverseOf.equals(objRsr)
|| OWL.Class.equals(objRsr)
|| OWL.AnnotationProperty.equals(objRsr)
|| OWL_NAMED_INDIVIDUAL.equals(objRsr)
) {
continue;
}
_info._putInstance(sbj, objRsr);
}
else {
if ( RDFS.domain.equals(prd) ) {
Resource objRsr = (Resource) obj;
_putDomain(sbj, objRsr);
}
else if ( RDFS.range.equals(prd) ) {
Resource objRsr = (Resource) obj;
_putRange(sbj, objRsr);
}
// other kind of relationship.
if ( obj.isLiteral() ) {
_putDataTypePropertyInstantiation(sbj, stmt);
}
else {
// uncategorized statement
_info._addStatement(stmt);