See comment above about using the JCR API. This should just be:

    ValueMap properties = ResourceUtil.getValueMap(twitterResource);
    if (twitterResource.get("replication", false)) {
       .. do replication
    }