riNamespace + "importsFrom");
addPropertiesAndResources();
for(Resource agent : resources) {
ResIterator iters = model.listResourcesWithProperty(RDF.type,agent);
if (iters.hasNext()) {
System.out.println("The database contains resource for:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
String resourceName = null;
if(resource.getLocalName() != null) {
resourceName = resource.getLocalName();
} else if(resource.getId() != null) {
if(resource.getId().getLabelString() != null) {
resourceName = resource.getId().getLabelString();
} else {
resourceName = resource.getId().toString();
}
} else if(resource.getURI() != null) {
resourceName = resource.getURI();
}
System.out.println(" " + resourceName+" class:"+resource.getClass());
NodeIterator nodes = model.listObjectsOfProperty(resource, RDF.type);
while(nodes.hasNext()) {
RDFNode node = nodes.nextNode();
if(node.isResource()) {
System.out.println(" type " + node.asResource().getURI());
}
}
StmtIterator stmtI = model.listStatements(resource, null, (RDFNode)null);
while(stmtI.hasNext()) {
Statement statement = stmtI.nextStatement();
System.out.println(" triple "+statement.getPredicate()+" - "+statement.getObject());
}
for(Property property : propertyAccount) {
StmtIterator stmtI1 = model.listStatements(resource, property, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();
System.out.println(" OnlineAccount "+statement.getObject());
if(statement.getObject().isResource()) {
Resource onlineAccount = statement.getObject().asResource();
NodeIterator nodess = model.listObjectsOfProperty(onlineAccount, RDF.type);
while(nodess.hasNext()) {
RDFNode node = nodess.nextNode();
if(node.isResource()) {
System.out.println(" type " + node.asResource().getURI());
}
}
for(Property property2 : propertyAccountName) {
StmtIterator stmtI2 = model.listStatements(onlineAccount, property2, (RDFNode)null);
Statement statement2 = stmtI2.nextStatement();
System.out.println(" AccountName "+statement2.getObject());
}
for(Property property2 : propertyAccountProfile) {
StmtIterator stmtI2 = model.listStatements(onlineAccount, property2, (RDFNode)null);
Statement statement2 = stmtI2.nextStatement();
System.out.println(" AccountProfile "+statement2.getObject());
}
}
}
}
}
}
}
ResIterator iters = model.listSubjectsWithProperty(RDF.type,dimension);
if (iters.hasNext()) {
System.out.println("The database contains subjects of type dimension:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+Dimension were found in the database");
}
iters = model.listResourcesWithProperty(RDF.type,categoryMatching);
if (iters.hasNext()) {
System.out.println("The database contains resources of type CategoryMatching:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String "+riNamespace+
"CategoryMatching were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,fixedCommunitiesTrust);
if (iters.hasNext()) {
System.out.println("The database contains resources of type fixedCommunitiesTrust:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+" +
"FixedCommunitiesTrust were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,trustBetweenCommunities);
if (iters.hasNext()) {
System.out.println("The database contains resources of type trustBetweenCommunities:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+" +
"trustBetweenCommunities were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,correlationBetweenDimension);
if (iters.hasNext()) {
System.out.println("The database contains resources of type CorrelationBetweenDimension:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+" +
"CorrelationBetweenDimension were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,logaritmicNumericTransformer);
if (iters.hasNext()) {
System.out.println("The database contains resources of type LogaritmicNumericTransformer:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+" +
"LogaritmicNumericTransformer were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,linealNumericTransformer);
if (iters.hasNext()) {
System.out.println("The database contains resources of type linealNumericTransformer:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+" +
"linealNumericTransformer were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,sqrtNumericTransformer);
if (iters.hasNext()) {
System.out.println("The database contains resources of type SqrtNumericTransformer:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
}
} else {
System.out.println("No simple String riNamespace+" +
"SqrtNumericTransformer were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,metric);
if (iters.hasNext()) {
System.out.println("The database contains resources of type metric:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
/* identifier */
StmtIterator stmtI1 = model.listStatements(resource, identifier, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();
if(statement.getObject().isLiteral()) {
System.out.println(" identifier:"+statement.getObject());
} else if(statement.getObject().isResource()) {
System.out.println(" identifier resource " +
"impossible:"+statement.getObject());
} else {
System.out.println(" identifier no literal no resource");
}
}
/* hasDimension */
stmtI1 = model.listStatements(resource, hasDimension, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();
if(statement.getObject().isLiteral()) {
System.out.println(" hasDimension impossible:"+statement.getObject());
} else if(statement.getObject().isResource()) {
System.out.println(" hasDimension resource:"+statement.getObject());
Resource dimResource = statement.getObject().asResource();
StmtIterator stmtI2 = model.listStatements(dimResource,
(Property)null, (RDFNode)null);
while(stmtI2.hasNext()) {
Statement statement2 = stmtI2.nextStatement();
System.out.println(" "+statement2.getPredicate().getLocalName()
+" "+statement2.getObject());
}
} else {
System.out.println(" hasDimension no literal no resource");
}
}
/* hasScale */
stmtI1 = model.listStatements(resource, hasScale, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();
if(statement.getObject().isLiteral()) {
System.out.println(" hasScale impossible:"+statement.getObject());
} else if(statement.getObject().isResource()) {
System.out.println(" hasScale resource:"+statement.getObject());
Resource scaResource = statement.getObject().asResource();
StmtIterator stmtI2 = model.listStatements(scaResource,
(Property)null, (RDFNode)null);
while(stmtI2.hasNext()) {
Statement statement2 = stmtI2.nextStatement();
System.out.println(" "+statement2.getPredicate().getLocalName()
+" "+statement2.getObject());
}
} else {
System.out.println(" hasScale no literal no resource");
}
}
}
} else {
System.out.println("No simple String riNamespace+" +
"metric were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,collectingSystem);
if (iters.hasNext()) {
System.out.println("The database contains resources of type collectingSystem:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
/* name */
StmtIterator stmtI1 = model.listStatements(resource, name, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();
if(statement.getObject().isLiteral()) {
System.out.println(" name:"+statement.getObject());
} else if(statement.getObject().isResource()) {
System.out.println(" name resource " +
"impossible:"+statement.getObject());
} else {
System.out.println(" name no literal no resource");
}
}
/* uriFormat */
stmtI1 = model.listStatements(resource, uriFormat, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();
if(statement.getObject().isLiteral()) {
System.out.println(" uriFormat:"+statement.getObject());
} else if(statement.getObject().isResource()) {
System.out.println(" uriFormat resource impossible:"
+statement.getObject());
} else {
System.out.println(" uriFormat no literal no resource");
}
}
}
} else {
System.out.println("No simple String riNamespace+" +
"collectingSystem were found in the database");
}
iters = model.listSubjectsWithProperty(RDF.type,community);
if (iters.hasNext()) {
System.out.println("The database contains resources of type community:");
while (iters.hasNext()) {
Resource resource = iters.nextResource();
System.out.println(" " + resource.getLocalName());
/* identifier */
StmtIterator stmtI1 = model.listStatements(resource, identifier, (RDFNode)null);
while(stmtI1.hasNext()) {
Statement statement = stmtI1.nextStatement();