class PofNodesMetadata {

  public static POFMetadata retrieve(ASTQueryContainer ast)
  throws VisitorException, MalformedQueryException {
    final POFMetadata meta = new POFMetadata();
    RetrievePofASTMetadata retrieve = new RetrievePofASTMetadata();

    List<ASTPrefixDecl> prefixDeclList = ast.getPrefixDeclList();

    // Build a prefix --> IRI map
    final Map<String, String> prefixes = new LinkedHashMap<String, String>();
    for (ASTPrefixDecl prefixDecl : prefixDeclList) {
      String prefix = prefixDecl.getPrefix();
      String iri = prefixDecl.getIRI().getValue();

      prefixes.put(prefix, iri);
    }

    retrieve.visit(ast, prefixes);
    meta.pofNode = retrieve.pofNode;
    meta.pofClassAttribute = retrieve.pofClassAttribute;
    return meta;
  }

  private  PofNodesMetadata();

}