use of com.thinkbiganalytics.metadata.api.extension.ExtensibleEntity in project kylo by Teradata.
the class JcrExtensibleEntityProvider method getEntities.
public List<ExtensibleEntity> getEntities(String typeName) {
String qualifiedName = ((JcrExtensibleTypeProvider) this.typeProvider).ensureTypeName(typeName);
List<ExtensibleEntity> list = new ArrayList<>();
Session session = getSession();
try {
String path = EntityUtil.pathForExtensibleEntity(qualifiedName);
if (session.nodeExists(path)) {
Node typeNameNode = session.getNode(path);
NodeIterator entityItr = typeNameNode.getNodes();
while (entityItr.hasNext()) {
Node entNode = (Node) entityItr.next();
list.add(new JcrExtensibleEntity(entNode));
}
}
return list;
} catch (RepositoryException e) {
throw new MetadataRepositoryException("Failed to retrieve list of extensible entities", e);
}
}
Aggregations