private static boolean isSpecialMeta(URI predicate) {
   return predicate.equals(NamedGraph.uuidProperty)
       || predicate.equals(NamedGraph.revisionProperty)
       || predicate.equals(NamedGraph.datasourceProperty)
       || predicate.equals(NamedGraph.hasMetadataGraphProperty)
       || predicate.equals(NamedGraph.persistedProperty)
       || predicate.equals(NamedGraph.revisionedProperty);
 }
 void handleStatement(boolean addition, Long graphId, Long subj, Long prop, Long obj)
     throws AnzoException {
   URI graphNode = getValue(graphId);
   Resource subjNode = getValue(subj);
   URI propNode = getValue(prop);
   Value objNode = getValue(obj);
   URI ngURI = graphNode;
   boolean meta = false;
   if (UriGenerator.isMetadataGraphUri(ngURI)) {
     ngURI = UriGenerator.stripEncapsulatedURI(NAMESPACES.METADATAGRAPH_PREFIX, ngURI);
     meta = true;
   }
   NamedGraphRevision ngr = ngs.get(ngURI);
   if (ngr == null) {
     throw new AnzoException(
         ExceptionConstants.DATASOURCE.NAMEDGRAPH.REVISION_NOT_FOUND, "?", ngURI.toString());
   }
   if (meta
       && (!ngr.readMeta
           && !(ngr.readGraph && subjNode.equals(ngURI) && isSpecialMeta(propNode)))) {
     return;
   } else if (!meta && !ngr.readGraph) {
     return;
   }
   if (lastNGRevision == null || !lastNGRevision.namedGraphUri.equals(ngURI)) {
     handler.handleNamedGraph(ngr.namedGraphUri, ngr.uuid, ngr.revision);
     lastNGRevision = ngr;
     if (newGraph.get(ngURI) && lastNGRevision.cache == null) {
       lastNGRevision.cache = new ArrayList<Statement>();
     }
   }
   handler.handleStatement(meta, addition, subjNode, propNode, objNode, graphNode);
   if (addition && lastNGRevision.cache != null) {
     lastNGRevision.cache.add(
         Constants.valueFactory.createStatement(subjNode, propNode, objNode, graphNode));
   }
 }